| @@ 71-80 (lines=10) @@ | ||
| 68 | * | |
| 69 | * @return LifecycleEvents | |
| 70 | */ | |
| 71 | public function __call($event, $args) | |
| 72 |     { | |
| 73 |         if (array_key_exists($event, $this->events)) { | |
| 74 | array_unshift($args, $event); | |
| 75 | ||
| 76 | return call_user_func_array([$this, 'add'], $args); | |
| 77 | } | |
| 78 | ||
| 79 |         throw new InvalidArgumentException('Fluent builder method ['.$event.'] does not exist'); | |
| 80 | } | |
| 81 | ||
| 82 | /** | |
| 83 | * @param string $event | |
| @@ 61-70 (lines=10) @@ | ||
| 58 | * | |
| 59 | * @return LifecycleEvents | |
| 60 | */ | |
| 61 | public function __call($method, $args) | |
| 62 |     { | |
| 63 |         if (array_key_exists($method, $this->events)) { | |
| 64 | array_unshift($args, $method); | |
| 65 | ||
| 66 | return call_user_func_array([$this, 'add'], $args); | |
| 67 | } | |
| 68 | ||
| 69 |         throw new InvalidArgumentException('Fluent builder method ['.$method.'] does not exist'); | |
| 70 | } | |
| 71 | ||
| 72 | /** | |
| 73 | * @param string $event | |