@@ -179,7 +179,7 @@ |
||
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
| 182 | - * @param callable|Closure $p |
|
| 182 | + * @param Closure $p |
|
| 183 | 183 | */ |
| 184 | 184 | public function forAll(Closure $p) |
| 185 | 185 | { |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * ArrayCollection constructor. |
| 20 | 20 | * @param array $elements |
| 21 | 21 | */ |
| 22 | - public function __construct(array $elements = []) |
|
| 22 | + public function __construct(array $elements = [ ]) |
|
| 23 | 23 | { |
| 24 | 24 | $this->elements = $elements; |
| 25 | 25 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function add($value) |
| 48 | 48 | { |
| 49 | - $this->elements[] = $value; |
|
| 49 | + $this->elements[ ] = $value; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function clear() |
| 56 | 56 | { |
| 57 | - $this->elements = []; |
|
| 57 | + $this->elements = [ ]; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function containsKey($key) |
| 90 | 90 | { |
| 91 | - return isset($this->elements[$key]) || array_key_exists($key, $this->elements); |
|
| 91 | + return isset($this->elements[ $key ]) || array_key_exists($key, $this->elements); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | public function offsetGet($offset) |
@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function get($key) |
| 104 | 104 | { |
| 105 | - if (isset($this->elements[$key])) { |
|
| 106 | - return $this->elements[$key]; |
|
| 105 | + if (isset($this->elements[ $key ])) { |
|
| 106 | + return $this->elements[ $key ]; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | return null; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function set($key, $element) |
| 122 | 122 | { |
| 123 | - $this->elements[$key] = $element; |
|
| 123 | + $this->elements[ $key ] = $element; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | public function offsetUnset($offset) |
@@ -130,9 +130,9 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | public function remove($key) |
| 132 | 132 | { |
| 133 | - if (isset($this->elements[$key]) || array_key_exists($key, $this->elements)) { |
|
| 134 | - $removed = $this->elements[$key]; |
|
| 135 | - unset($this->elements[$key]); |
|
| 133 | + if (isset($this->elements[ $key ]) || array_key_exists($key, $this->elements)) { |
|
| 134 | + $removed = $this->elements[ $key ]; |
|
| 135 | + unset($this->elements[ $key ]); |
|
| 136 | 136 | |
| 137 | 137 | return $removed; |
| 138 | 138 | } |
@@ -168,10 +168,10 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | protected function extractProperties($propertyFetchMethod) |
| 170 | 170 | { |
| 171 | - $values = []; |
|
| 171 | + $values = [ ]; |
|
| 172 | 172 | $this->forAll( |
| 173 | - function ($entry) use (&$values, $propertyFetchMethod) { |
|
| 174 | - $values[] = $entry->{$propertyFetchMethod}(); |
|
| 173 | + function($entry) use (&$values, $propertyFetchMethod) { |
|
| 174 | + $values[ ] = $entry->{$propertyFetchMethod}(); |
|
| 175 | 175 | } |
| 176 | 176 | ); |
| 177 | 177 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * @return \string[] |
|
| 78 | + * @return string[] |
|
| 79 | 79 | */ |
| 80 | 80 | public function getTags() |
| 81 | 81 | { |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | public function find(NoteId $id) |
| 27 | 27 | { |
| 28 | 28 | return $this->filter( |
| 29 | - function (Note $note) use ($id) { |
|
| 29 | + function(Note $note) use ($id) { |
|
| 30 | 30 | return $note->getId() === $id; |
| 31 | 31 | } |
| 32 | 32 | ); |