Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * MagicallyInvokedMethod interface implementation file |
| 4 | * @package Code\Simplify |
| 5 | * @author Felipe Gaspar <felipesouzalimagaspar@gmail.com> |
| 6 | */ |
| 7 | declare(strict_types=1); |
| 8 | namespace Code\Simplify; |
| 9 | /** |
| 10 | * MagicallyInvokedMethod is an interface for methods invoked with a little bit of magic |
| 11 | */ |
| 12 | interface MagicallyInvokedMethod { |
| 13 | /** |
| 14 | * Invokes a method from an instance with the given parameters |
| 15 | * @access public |
| 16 | * @param object $instance Object on which the method will be invoked |
| 17 | * @param string $name Method name |
| 18 | * @param array $arguments Method arguments |
| 19 | * @return mixed The return varies according to the invoked method |
| 20 | */ |
| 21 | public function invoke(object $instance, string $name, array $arguments = []) : mixed; |
| 22 | /** |
| 23 | * Checks if the called method has the matching signature |
| 24 | * @access public |
| 25 | * @param string $name Method name |
| 26 | * @param array $arguments Method arguments |
| 27 | * @return bool The called method has the matching signature or not |
| 28 | */ |
| 29 | public function verifySignature(string $name, array $arguments = []) : bool; |
| 30 | } |