PluginProbe ʕ •ᴥ•ʔ
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More / 2.11.0
Reviews Feed – Add Testimonials and Customer Reviews From Google Reviews, Yelp, TripAdvisor, and More v2.11.0
2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.7 2.6.8 2.6.5 2.6.4 2.6.3 2.6.2 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1 1.1.1 1.1.2 1.2.0 2.0 2.1.0 2.1.1 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5.0 2.5.1
reviews-feed / vendor / php-di / invoker / src / Exception / NotCallableException.php
reviews-feed / vendor / php-di / invoker / src / Exception Last commit date
InvocationException.php 1 week ago NotCallableException.php 1 week ago NotEnoughParametersException.php 1 week ago
NotCallableException.php
30 lines
1 <?php
2
3
4 namespace SmashBalloon\Reviews\Vendor\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