name(); $routingKey = $queue->bindings()->routingKey(); foreach ($map as $eventClass => $config) { $match = null; if (! empty($config['queues'] ?? [])) { $match = in_array($queueName, $config['queues'], true); } if (! empty($config['routing_keys'] ?? [])) { $match = is_null($match) ? true : $match; $match = $match && in_array($routingKey, $config['routing_keys'], true); } if (is_null($match)) { return $this->app->make($eventClass, $payload); } if (is_bool($match) && $match) { return $this->app->make($eventClass, $payload); } } throw new AssociatedEventNotFound(json_encode($payload)); } }