@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | 'author_id' => $flightDamage->getAuthor()->getId() |
36 | 36 | ]; |
37 | 37 | |
38 | - if($flightDamage->getId()){ |
|
38 | + if ($flightDamage->getId()) { |
|
39 | 39 | $this->update($flightDamage->getId()->getId(), $fields); |
40 | 40 | return $flightDamage->getId()->getId(); |
41 | 41 | } |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @throws \Exception |
52 | 52 | */ |
53 | - public function getById(DamageId $id){ |
|
53 | + public function getById(DamageId $id) { |
|
54 | 54 | $damage = $this->get($id->getId()); |
55 | 55 | |
56 | - if(null === $damage){ |
|
56 | + if (null === $damage) { |
|
57 | 57 | throw new \Exception('Damage not found'); |
58 | 58 | } |
59 | 59 |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @throws \Exception |
31 | 31 | */ |
32 | - public function add(Route $route){ |
|
33 | - if(isset($this->routes[$route->getName()])){ |
|
32 | + public function add(Route $route) { |
|
33 | + if (isset($this->routes[$route->getName()])) { |
|
34 | 34 | throw new \Exception('Route exists'); |
35 | 35 | } |
36 | 36 | |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @throws \Exception |
44 | 44 | */ |
45 | - public function load(array $routes){ |
|
46 | - foreach($routes as $currentRoute){ |
|
45 | + public function load(array $routes) { |
|
46 | + foreach ($routes as $currentRoute) { |
|
47 | 47 | $this->add($currentRoute); |
48 | 48 | } |
49 | 49 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function __invoke($name) |
57 | 57 | { |
58 | - if(!isset($this->routes[$name])){ |
|
58 | + if (!isset($this->routes[$name])) { |
|
59 | 59 | throw new \Exception('Route not found'); |
60 | 60 | } |
61 | 61 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * |
66 | 66 | * @return bool |
67 | 67 | */ |
68 | - public function match($route){ |
|
68 | + public function match($route) { |
|
69 | 69 | return $this->name === $route; |
70 | 70 | } |
71 | 71 |