@@ -23,10 +23,11 @@ |
||
23 | 23 | |
24 | 24 | public function addElement(string $name, string $url = null): self |
25 | 25 | { |
26 | - if ($url) |
|
27 | - $this->elements[$url] = $name; |
|
28 | - else |
|
29 | - array_push($this->elements, $name); |
|
26 | + if ($url) { |
|
27 | + $this->elements[$url] = $name; |
|
28 | + } else { |
|
29 | + array_push($this->elements, $name); |
|
30 | + } |
|
30 | 31 | return $this; |
31 | 32 | } |
32 | 33 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $position = 0; |
40 | 40 | foreach ($this->elements as $url => $name) { |
41 | 41 | $position++; |
42 | - $element = sprintf(self::HTML_SPAN, $name) . sprintf(self::HTML_META_POSITION, $position); |
|
42 | + $element = sprintf(self::HTML_SPAN, $name).sprintf(self::HTML_META_POSITION, $position); |
|
43 | 43 | if (!is_numeric($url)) { |
44 | 44 | $element = sprintf(self::HTML_A, $url, $element); |
45 | 45 | } |