| @@ -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) | 
| @@ -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] | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | ] | 
| 86 | 86 | ] | 
| 87 | 87 | ]; | 
| 88 | - $item = $itemFactory($rawItem); | |
| 88 | + $item = $itemFactory($rawItem); | |
| 89 | 89 | $this->assertInstanceOf(Item::class, $item); | 
| 90 | 90 | $this->assertEquals( | 
| 91 | 91 |              [MicroformatsFactory::MF2_PROFILE_URI.'alias-property' => [new StringValue('value')]], | 
| @@ -168,7 +168,7 @@ discard block | ||
| 168 | 168 | ] | 
| 169 | 169 | ] | 
| 170 | 170 | ]; | 
| 171 | - $item = $itemFactory($rawItem); | |
| 171 | + $item = $itemFactory($rawItem); | |
| 172 | 172 | $this->assertInstanceOf(Item::class, $item); | 
| 173 | 173 | $this->assertEquals([], $item->getProperties()->export()); | 
| 174 | 174 | } | 
| @@ -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), | 
| @@ -107,7 +107,7 @@ | ||
| 107 | 107 | public function testMicroformatsExtraction() | 
| 108 | 108 |      { | 
| 109 | 109 |          $microformatsTests = ComposerLocator::getPath('mf2/tests').DIRECTORY_SEPARATOR.'tests'. | 
| 110 | - DIRECTORY_SEPARATOR.'microformats-v2'.DIRECTORY_SEPARATOR; | |
| 110 | + DIRECTORY_SEPARATOR.'microformats-v2'.DIRECTORY_SEPARATOR; | |
| 111 | 111 | |
| 112 | 112 | $this->getAndTestMicroformatsExtractionBase( | 
| 113 | 113 | $microformatsTests.'h-product'.DIRECTORY_SEPARATOR.'aggregate.html' |