@@ -86,14 +86,14 @@ discard block |
||
86 | 86 | $crawler->addHTMLContent($content, 'UTF-8'); |
87 | 87 | |
88 | 88 | $properties = []; |
89 | - foreach(['name', 'property'] as $t) |
|
89 | + foreach (['name', 'property'] as $t) |
|
90 | 90 | { |
91 | 91 | // Get all meta-tags starting with "og:" |
92 | 92 | $ogMetaTags = $crawler->filter("meta[{$t}^='og:']"); |
93 | 93 | // Create clean property array |
94 | 94 | $props = Linq::from($ogMetaTags) |
95 | 95 | ->select( |
96 | - function (\DOMElement $tag) use ($t) { |
|
96 | + function(\DOMElement $tag) use ($t) { |
|
97 | 97 | $name = strtolower(trim($tag->getAttribute($t))); |
98 | 98 | $value = trim($tag->getAttribute("content")); |
99 | 99 | return new Property($name, $value); |
@@ -107,13 +107,12 @@ discard block |
||
107 | 107 | // Create new object of the correct type |
108 | 108 | $typeProperty = Linq::from($properties) |
109 | 109 | ->firstOrNull( |
110 | - function (Property $property) { |
|
110 | + function(Property $property) { |
|
111 | 111 | return $property->key === Property::TYPE; |
112 | 112 | } |
113 | 113 | ); |
114 | 114 | switch ($typeProperty !== null ? $typeProperty->value : null) { |
115 | - default: |
|
116 | - $object = new Website(); |
|
115 | + default : $object = new Website(); |
|
117 | 116 | break; |
118 | 117 | } |
119 | 118 |