@@ -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 | { |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * Checks if a header exists by the given case-insensitive name. |
75 | 75 | * |
76 | 76 | * @param string $name Case-insensitive header field name. |
77 | - * @return bool Returns true if any header names match the given header |
|
77 | + * @return boolean|null Returns true if any header names match the given header |
|
78 | 78 | * name using a case-insensitive string comparison. Returns false if |
79 | 79 | * no matching header name is found in the message. |
80 | 80 | */ |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * Checks if a header exists by the given case-insensitive name. |
75 | 75 | * |
76 | 76 | * @param string $name Case-insensitive header field name. |
77 | - * @return bool Returns true if any header names match the given header |
|
77 | + * @return boolean|null Returns true if any header names match the given header |
|
78 | 78 | * name using a case-insensitive string comparison. Returns false if |
79 | 79 | * no matching header name is found in the message. |
80 | 80 | */ |
@@ -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 { |
@@ -52,13 +52,13 @@ |
||
52 | 52 | 'daysInMonth' => 't', |
53 | 53 | 'timestamp' => 'U', |
54 | 54 | ]): |
55 | - return (int)$this->format($formats[$name]); |
|
55 | + return (int) $this->format($formats[$name]); |
|
56 | 56 | case $name === 'weekOfMonth': |
57 | - return (int)ceil($this->day / static::DAYS_PER_WEEK); |
|
57 | + return (int) ceil($this->day / static::DAYS_PER_WEEK); |
|
58 | 58 | case $name === 'age': |
59 | - return (int)$this->diffInYears(); |
|
59 | + return (int) $this->diffInYears(); |
|
60 | 60 | case $name === 'quarter': |
61 | - return (int)ceil($this->month / 3); |
|
61 | + return (int) ceil($this->month / 3); |
|
62 | 62 | case $name === 'offset': |
63 | 63 | return $this->getOffset(); |
64 | 64 | case $name === 'offsetHours': |
@@ -132,7 +132,7 @@ |
||
132 | 132 | public function getProvider($provider) |
133 | 133 | { |
134 | 134 | $name = is_string($provider) ? $provider : get_class($provider); |
135 | - return \Nip_Helper_Arrays::first($this->providers, function ($value) use ($name) { |
|
135 | + return \Nip_Helper_Arrays::first($this->providers, function($value) use ($name) { |
|
136 | 136 | return $value instanceof $name; |
137 | 137 | }); |
138 | 138 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | protected function registerLoader() |
47 | 47 | { |
48 | - $this->getContainer()->share('translation.loader', function () { |
|
48 | + $this->getContainer()->share('translation.loader', function() { |
|
49 | 49 | $backend = $this->createFileBackend(); |
50 | 50 | return $backend; |
51 | 51 | }); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | protected function registerLanguages() |
57 | 57 | { |
58 | - $this->getContainer()->share('translation.languages', function () { |
|
58 | + $this->getContainer()->share('translation.languages', function() { |
|
59 | 59 | return $this->getLanguages(); |
60 | 60 | }); |
61 | 61 | } |