@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function onlyOne() |
| 71 | 71 | { |
| 72 | - $serious = $this->findMostSerious(); |
|
| 72 | + $serious = $this->findMostSerious(); |
|
| 73 | 73 | if (!empty($serious)) { |
| 74 | 74 | return $this->show($serious); |
| 75 | 75 | } |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | self::ALERT => 2, |
| 87 | 87 | self::MESSAGE => 1, |
| 88 | 88 | ]; |
| 89 | - $serious = array_reduce( |
|
| 89 | + $serious = array_reduce( |
|
| 90 | 90 | $this->messages, |
| 91 | - function ($carry, $msg) use ($msgScores) { |
|
| 91 | + function($carry, $msg) use ($msgScores) { |
|
| 92 | 92 | $myScore = $msgScores[$msg['type']]; |
| 93 | 93 | $msg['score'] = $myScore; |
| 94 | 94 | return $myScore > $carry['score'] ? $msg : $carry; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function getIterator() |
| 121 | 121 | { |
| 122 | - foreach($this->messages as $message) { |
|
| 122 | + foreach ($this->messages as $message) { |
|
| 123 | 123 | yield $message['type'] => $message['message']; |
| 124 | 124 | } |
| 125 | 125 | } |