@@ -20,6 +20,7 @@ |
||
20 | 20 | |
21 | 21 | /** |
22 | 22 | * {@inheritDoc} |
23 | + * @param \Nip\Records\AbstractModels\Record $element |
|
23 | 24 | */ |
24 | 25 | public function add($element, $key = null) |
25 | 26 | { |
@@ -109,7 +109,7 @@ |
||
109 | 109 | |
110 | 110 | /** |
111 | 111 | * @param Record $record |
112 | - * @param null $index |
|
112 | + * @param string $index |
|
113 | 113 | */ |
114 | 114 | public function add($record, $index = null) |
115 | 115 | { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | */ |
39 | 39 | public function offsetSet($offset, $value) |
40 | 40 | { |
41 | - if ( ! isset($offset)) { |
|
41 | + if (!isset($offset)) { |
|
42 | 42 | $this->add($value); |
43 | 43 | return; |
44 | 44 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function toArray() |
19 | 19 | { |
20 | - return array_map(function ($value) { |
|
20 | + return array_map(function($value) { |
|
21 | 21 | return $value instanceof AbstractCollection ? $value->toArray() : $value; |
22 | 22 | }, $this->items); |
23 | 23 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | function jsonSerialize() |
33 | 33 | { |
34 | - return array_map(function ($value) { |
|
34 | + return array_map(function($value) { |
|
35 | 35 | if ($value instanceof JsonSerializable) { |
36 | 36 | return $value->jsonSerialize(); |
37 | 37 | } else { |