PluginProbe
Elementor Website Builder – more than just a page builder / 3.27.4
Elementor Website Builder – more than just a page builder v3.27.4
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / vendor_prefixed / php-di / invoker / src / Exception / NotCallableException.php

NotCallableException.php in Elementor Website Builder – more than just a page builder 3.27.4, at vendor_prefixed/php-di/invoker/src/Exception/NotCallableException.php

30 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare (strict_types=1);
4 namespace ElementorDeps\Invoker\Exception;
5
6 /**
7 * The given callable is not actually callable.
8 */
9 class NotCallableException extends InvocationException
10 {
11 /**
12 * @param mixed $value
13 */
14 public static function fromInvalidCallable($value, bool $containerEntry = \false) : self
15 {
16 if (\is_object($value)) {
17 $message = \sprintf('Instance of %s is not a callable', \get_class($value));
18 } elseif (\is_array($value) && isset($value[0], $value[1])) {
19 $class = \is_object($value[0]) ? \get_class($value[0]) : $value[0];
20 $extra = \method_exists($class, '__call') || \method_exists($class, '__callStatic') ? ' A __call() or __callStatic() method exists but magic methods are not supported.' : '';
21 $message = \sprintf('%s::%s() is not a callable.%s', $class, $value[1], $extra);
22 } elseif ($containerEntry) {
23 $message = \var_export($value, \true) . ' is neither a callable nor a valid container entry';
24 } else {
25 $message = \var_export($value, \true) . ' is not a callable';
26 }
27 return new self($message);
28 }
29 }
30