@@ -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 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | /** |
| 170 | 170 | * Return whether a property exists |
| 171 | 171 | * |
| 172 | - * @param \stdClass|Iri|string $iri IRI |
|
| 172 | + * @param Iri $iri IRI |
|
| 173 | 173 | * |
| 174 | 174 | * @return boolean Property exists |
| 175 | 175 | */ |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | /** |
| 244 | 244 | * Set a particular property |
| 245 | 245 | * |
| 246 | - * @param \stdClass|Iri|string $iri IRI |
|
| 246 | + * @param Iri $iri IRI |
|
| 247 | 247 | * @param array $value Property values |
| 248 | 248 | */ |
| 249 | 249 | public function offsetSet($iri, $value) |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | /** |
| 260 | 260 | * Get a particular property |
| 261 | 261 | * |
| 262 | - * @param \stdClass|Iri|string $iri IRI |
|
| 262 | + * @param Iri $iri IRI |
|
| 263 | 263 | * |
| 264 | 264 | * @return array Property values |
| 265 | 265 | * @throws OutOfBoundsException If the property name is unknown |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | { |
| 187 | 187 | return (object)[ |
| 188 | 188 | 'items' => array_map( |
| 189 | - function (ItemInterface $item) { |
|
| 189 | + function(ItemInterface $item) { |
|
| 190 | 190 | return $item->toObject(); |
| 191 | 191 | }, |
| 192 | 192 | $this->items |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | if (count($types)) { |
| 231 | 231 | return array_filter( |
| 232 | 232 | $this->items, |
| 233 | - function (ItemInterface $item) use ($types) { |
|
| 233 | + function(ItemInterface $item) use ($types) { |
|
| 234 | 234 | return $item->isOfType(...$types); |
| 235 | 235 | } |
| 236 | 236 | ); |
@@ -130,8 +130,7 @@ |
||
| 130 | 130 | { |
| 131 | 131 | $iri = IriFactory::create( |
| 132 | 132 | (($profile === null) || is_object($name)) ? |
| 133 | - $name : |
|
| 134 | - (object)[ |
|
| 133 | + $name : (object)[ |
|
| 135 | 134 | 'profile' => $profile, |
| 136 | 135 | 'name' => $name |
| 137 | 136 | ] |
@@ -107,14 +107,14 @@ |
||
| 107 | 107 | 'language' => $this->getLanguage(), |
| 108 | 108 | 'value' => $this->getValue(), |
| 109 | 109 | 'types' => array_map( |
| 110 | - function ($type) { |
|
| 110 | + function($type) { |
|
| 111 | 111 | return $type->profile.$type->name; |
| 112 | 112 | }, |
| 113 | 113 | $this->getType() |
| 114 | 114 | ), |
| 115 | 115 | 'properties' => $this->getProperties()->export(), |
| 116 | 116 | 'items' => array_map( |
| 117 | - function (ItemInterface $item) { |
|
| 117 | + function(ItemInterface $item) { |
|
| 118 | 118 | return $item->export(); |
| 119 | 119 | }, |
| 120 | 120 | $this->getChildren() |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | $profiledName = strval($iri); |
| 108 | 108 | $cursor = $this->nameToCursor[$profiledName]; |
| 109 | 109 | $propertyList[$profiledName] = array_map( |
| 110 | - function (ExportableInterface $value) { |
|
| 110 | + function(ExportableInterface $value) { |
|
| 111 | 111 | return $value->export(); |
| 112 | 112 | }, |
| 113 | 113 | $this->values[$cursor] |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | // Run through all <link> elements with a `rel` attribute |
| 73 | 73 | /** @var \DOMElement $linkType */ |
| 74 | 74 | foreach ($xpath->query('//*[local-name(.) = "link" or local-name(.) = "a"][@rel]') as $linkType) { |
| 75 | - $item = [ |
|
| 75 | + $item = [ |
|
| 76 | 76 | 'type' => $this->parseLinkType($linkType->getAttribute('rel')), |
| 77 | 77 | 'id' => $linkType->getAttribute('id') ?: null, |
| 78 | 78 | 'properties' => $this->parseProperties($linkType), |