1 | <?php |
||
9 | class NonCallableObject extends LogicException implements ExceptionInterface |
||
10 | { |
||
11 | private const ERROR_TEMPLATE = <<<'ERROR' |
||
12 | The given object %s#%s is not designed to allow any undefined or inaccessible methods to be called. |
||
13 | |||
14 | You tried to call a method called "%s". |
||
15 | |||
16 | Perhaps you made a typo in the method name, or tried to call an inaccessible method? |
||
17 | ERROR; |
||
18 | |||
19 | /** |
||
20 | * @param object $object |
||
21 | * @throws TypeError |
||
22 | */ |
||
23 | 9 | public static function fromAttemptedCall($object, string $method) : self |
|
38 | } |
||
39 |