/** * */ function test_plugin() { $this->setExpectedException(\RuntimeException::class, 'Unresolvable plugin: foo'); Unresolvable::plugin('foo'); }
/** * @param $config * @param array $args * @param callable $callback * @param int $c * @return array|callable|Plugin|null|object|Resolvable|string */ protected function resolvable($config, array $args = [], callable $callback = null, $c = 0) { return !$config instanceof Resolvable ? $config : ($c > Arg::MAX_RECURSION ? Unresolvable::plugin($config) : $this->resolvable($this->solve($config, $args, $callback), $args, $callback, ++$c)); }
/** * @param string $name * @return array|\Traversable|null */ protected function listeners($name) { return isset($this->events[$name]) ? $this->events[$name] : Unresolvable::plugin($name); }
/** * @param string $name * @return array|\Traversable|null */ protected function listeners($name) { return $this->events[$name] ?? Unresolvable::plugin($name); }