@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | protected static function createTypes(array $types) |
| 90 | 90 | { |
| 91 | 91 | return array_map( |
| 92 | - function ($type) { |
|
| 92 | + function($type) { |
|
| 93 | 93 | return (object)['profile' => self::MF2_PROFILE_URI, 'name' => $type]; |
| 94 | 94 | }, $types |
| 95 | 95 | ); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | protected static function createProperty(array $propertyValues) |
| 124 | 124 | { |
| 125 | 125 | return array_map( |
| 126 | - function ($propertyValue) { |
|
| 126 | + function($propertyValue) { |
|
| 127 | 127 | if (is_array($propertyValue)) { |
| 128 | 128 | return isset($propertyValue['type']) ? self::createItem($propertyValue) : $propertyValue; |
| 129 | 129 | } |
@@ -183,7 +183,7 @@ |
||
| 183 | 183 | return; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - $propertyValues =& $this->offsetGet($iri); |
|
| 186 | + $propertyValues = & $this->offsetGet($iri); |
|
| 187 | 187 | $propertyValues = array_merge($propertyValues, $values); |
| 188 | 188 | } |
| 189 | 189 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | /** |
| 120 | 120 | * Return the current IRI key |
| 121 | 121 | * |
| 122 | - * @return string IRI key |
|
| 122 | + * @return \stdClass IRI key |
|
| 123 | 123 | */ |
| 124 | 124 | public function key() |
| 125 | 125 | { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | /** |
| 168 | 168 | * Return whether a property exists |
| 169 | 169 | * |
| 170 | - * @param \stdClass|string $iri IRI |
|
| 170 | + * @param \stdClass $iri IRI |
|
| 171 | 171 | * @return boolean Property exists |
| 172 | 172 | */ |
| 173 | 173 | public function offsetExists($iri) |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | /** |
| 237 | 237 | * Set a particular property |
| 238 | 238 | * |
| 239 | - * @param \stdClass|string $iri IRI |
|
| 239 | + * @param \stdClass $iri IRI |
|
| 240 | 240 | * @param array $value Property values |
| 241 | 241 | */ |
| 242 | 242 | public function offsetSet($iri, $value) |
@@ -112,14 +112,14 @@ |
||
| 112 | 112 | return (object)[ |
| 113 | 113 | 'format' => $this->getFormat(), |
| 114 | 114 | 'types' => array_map( |
| 115 | - function ($type) { |
|
| 115 | + function($type) { |
|
| 116 | 116 | return $type->profile.$type->name; |
| 117 | 117 | }, |
| 118 | 118 | $this->getType() |
| 119 | 119 | ), |
| 120 | 120 | 'properties' => $this->getProperties()->export(), |
| 121 | 121 | 'items' => array_map( |
| 122 | - function (ItemInterface $item) { |
|
| 122 | + function(ItemInterface $item) { |
|
| 123 | 123 | return $item->export(); |
| 124 | 124 | }, |
| 125 | 125 | $this->getChildren() |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $profiledName = $iri->profile.$iri->name; |
| 107 | 107 | $cursor = $this->nameToCursor[$profiledName]; |
| 108 | 108 | $propertyList[$profiledName] = array_map( |
| 109 | - function (ExportableInterface $value) { |
|
| 109 | + function(ExportableInterface $value) { |
|
| 110 | 110 | return $value->export(); |
| 111 | 111 | }, $this->values[$cursor] |
| 112 | 112 | ); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | { |
| 149 | 149 | return (object)[ |
| 150 | 150 | 'items' => array_map( |
| 151 | - function (ItemInterface $item) { |
|
| 151 | + function(ItemInterface $item) { |
|
| 152 | 152 | return $item->toObject(); |
| 153 | 153 | }, $this->items |
| 154 | 154 | ) |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | if (count($types)) { |
| 192 | 192 | return array_filter( |
| 193 | 193 | $this->items, |
| 194 | - function (ItemInterface $item) use ($types) { |
|
| 194 | + function(ItemInterface $item) use ($types) { |
|
| 195 | 195 | return $item->isOfType(...$types); |
| 196 | 196 | } |
| 197 | 197 | ); |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | /** |
| 145 | 145 | * Return the item types |
| 146 | 146 | * |
| 147 | - * @return \stdClass[] Item types |
|
| 147 | + * @return string[] Item types |
|
| 148 | 148 | */ |
| 149 | 149 | public function getType() |
| 150 | 150 | { |