@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $encodedUrl = preg_replace_callback( |
24 | 24 | '%[^:/@?&=#]+%usD', |
25 | - function ($matches) { |
|
25 | + function($matches) { |
|
26 | 26 | return rawurlencode($matches[0]); |
27 | 27 | }, |
28 | 28 | $url |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if (!empty($url['query'])) { |
66 | 66 | parse_str($url['query'], $query); |
67 | 67 | |
68 | - array_walk($query, function (&$val, &$var) { |
|
68 | + array_walk($query, function(&$val, &$var) { |
|
69 | 69 | $var = rawurlencode($var); |
70 | 70 | $val = rawurlencode($val); |
71 | 71 | }); |
@@ -98,6 +98,9 @@ |
||
98 | 98 | return $this; |
99 | 99 | } |
100 | 100 | |
101 | + /** |
|
102 | + * @param string $name |
|
103 | + */ |
|
101 | 104 | public function getAttribute($name) |
102 | 105 | { |
103 | 106 | return isset($this->attributes[$name]) ? $this->attributes[$name] : null; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | /** |
27 | 27 | * ArrayType constructor. |
28 | 28 | * |
29 | - * @param $name |
|
29 | + * @param string $name |
|
30 | 30 | * @param $dataType |
31 | 31 | */ |
32 | 32 | public function __construct($name, $dataType) |
@@ -4,7 +4,6 @@ |
||
4 | 4 | namespace Wszetko\Sitemap\Items\DataTypes; |
5 | 5 | |
6 | 6 | use Wszetko\Sitemap\Interfaces\DataType; |
7 | -use Wszetko\Sitemap\Traits\Domain; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Class ArrayType |
@@ -79,7 +79,7 @@ |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | - * @return array|null |
|
82 | + * @return string[] |
|
83 | 83 | */ |
84 | 84 | public function getAllowedValues(): ?array |
85 | 85 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | namespace Wszetko\Sitemap\Items\DataTypes; |
5 | 5 | |
6 | 6 | use Wszetko\Sitemap\Helpers\Url; |
7 | -use Wszetko\Sitemap\Traits\Domain; |
|
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Class URLType |
@@ -3,8 +3,6 @@ |
||
3 | 3 | |
4 | 4 | namespace Wszetko\Sitemap\Items; |
5 | 5 | |
6 | -use InvalidArgumentException; |
|
7 | - |
|
8 | 6 | /** |
9 | 7 | * Class HrefLang |
10 | 8 | * |
@@ -138,7 +138,7 @@ |
||
138 | 138 | */ |
139 | 139 | public function __call($name, $arguments) |
140 | 140 | { |
141 | - $operation = substr($name, 0 ,3); |
|
141 | + $operation = substr($name, 0, 3); |
|
142 | 142 | $property = lcfirst(substr($name, 3)); |
143 | 143 | |
144 | 144 | if (property_exists($this, $property) && |