| Total Complexity | 4 | 
| Total Lines | 51 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 4 | class Collection | ||
| 5 | { | ||
| 6 | /** | ||
| 7 | * @var array | ||
| 8 | */ | ||
| 9 | protected $routes = []; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @return array | ||
| 13 | */ | ||
| 14 | 6 | public function getRoutes() | |
| 15 |     { | ||
| 16 | 6 | return $this->routes; | |
| 17 | } | ||
| 18 | |||
| 19 | /** | ||
| 20 | * @param $route | ||
| 21 | * @param $action | ||
| 22 | * @param null $name | ||
|  | |||
| 23 | * @param array $options | ||
| 24 | * @return Collection | ||
| 25 | */ | ||
| 26 | 1 | public function post($route, $name, $action, $options = []) | |
| 27 |     { | ||
| 28 | 1 | return $this->add($route, $name, $action, array_merge(['method' => 'POST'], $options)); | |
| 29 | } | ||
| 30 | |||
| 31 | /** | ||
| 32 | * @param $route | ||
| 33 | * @param $action | ||
| 34 | * @param null $name | ||
| 35 | * @param array $options | ||
| 36 | * @return Collection | ||
| 37 | */ | ||
| 38 | 6 | public function get($route, $name, $action, $options = []) | |
| 39 |     { | ||
| 40 | 6 | return $this->add($route, $name, $action, array_merge(['method' => 'GET'], $options)); | |
| 41 | } | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @param $route | ||
| 45 | * @param $name | ||
| 46 | * @param $action | ||
| 47 | * @param array $options | ||
| 48 | * @return $this | ||
| 49 | */ | ||
| 50 | 6 | protected function add($route, $name, $action, $options = []) | |
| 55 | } | ||
| 56 | } | ||
| 57 |