@@ -56,23 +56,23 @@ |
||
56 | 56 | |
57 | 57 | private function analyzeURL(string $url) : void |
58 | 58 | { |
59 | - if(stristr($url, 'tel:') !== false) |
|
59 | + if (stristr($url, 'tel:') !== false) |
|
60 | 60 | { |
61 | 61 | return; |
62 | 62 | } |
63 | 63 | |
64 | 64 | $placeholders = $this->safeguard->getPlaceholders(); |
65 | 65 | |
66 | - foreach($placeholders as $placeholder) |
|
66 | + foreach ($placeholders as $placeholder) |
|
67 | 67 | { |
68 | 68 | $command = $placeholder->getCommand(); |
69 | 69 | |
70 | - if(!$command->supportsURLEncoding()) |
|
70 | + if (!$command->supportsURLEncoding()) |
|
71 | 71 | { |
72 | 72 | continue; |
73 | 73 | } |
74 | 74 | |
75 | - if(strstr($url, $placeholder->getReplacementText()) !== false && !$command->isURLDecoded()) |
|
75 | + if (strstr($url, $placeholder->getReplacementText()) !== false && !$command->isURLDecoded()) |
|
76 | 76 | { |
77 | 77 | $command->setURLEncoding(true); |
78 | 78 | break; |
@@ -23,25 +23,25 @@ discard block |
||
23 | 23 | */ |
24 | 24 | trait Mailcode_Traits_Formatting_HTMLHighlighting |
25 | 25 | { |
26 | - /** |
|
27 | - * Stored this way so we can use isset() instead |
|
28 | - * of using in_array, which is some magnitudes slower. |
|
29 | - * The boolean value is not used otherwise. |
|
30 | - * |
|
31 | - * @var array<string,bool> |
|
32 | - */ |
|
26 | + /** |
|
27 | + * Stored this way so we can use isset() instead |
|
28 | + * of using in_array, which is some magnitudes slower. |
|
29 | + * The boolean value is not used otherwise. |
|
30 | + * |
|
31 | + * @var array<string,bool> |
|
32 | + */ |
|
33 | 33 | private $excludeTags = array( |
34 | 34 | 'style' => true, // NOTE: style tags are excluded natively on the parser level. |
35 | 35 | 'script' => true |
36 | 36 | ); |
37 | 37 | |
38 | - /** |
|
39 | - * Adds an HTML tag name to the list of tags within which |
|
40 | - * commands may not be highlighted. |
|
41 | - * |
|
42 | - * @param string $tagName Case insensitive. |
|
43 | - * @return $this |
|
44 | - */ |
|
38 | + /** |
|
39 | + * Adds an HTML tag name to the list of tags within which |
|
40 | + * commands may not be highlighted. |
|
41 | + * |
|
42 | + * @param string $tagName Case insensitive. |
|
43 | + * @return $this |
|
44 | + */ |
|
45 | 45 | public function excludeTag(string $tagName) |
46 | 46 | { |
47 | 47 | $tagName = strtolower($tagName); |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | return $this; |
52 | 52 | } |
53 | 53 | |
54 | - /** |
|
55 | - * Adds several exluded tag names at once. |
|
56 | - * |
|
57 | - * @param string[] $tagNames |
|
58 | - * @return $this |
|
59 | - */ |
|
54 | + /** |
|
55 | + * Adds several exluded tag names at once. |
|
56 | + * |
|
57 | + * @param string[] $tagNames |
|
58 | + * @return $this |
|
59 | + */ |
|
60 | 60 | public function excludeTags(array $tagNames) |
61 | 61 | { |
62 | 62 | foreach($tagNames as $tagName) |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | return $this; |
68 | 68 | } |
69 | 69 | |
70 | - /** |
|
71 | - * Whether the specified tag name is in the exlusion list. |
|
72 | - * |
|
73 | - * @param string $tagName |
|
74 | - * @return bool |
|
75 | - */ |
|
70 | + /** |
|
71 | + * Whether the specified tag name is in the exlusion list. |
|
72 | + * |
|
73 | + * @param string $tagName |
|
74 | + * @return bool |
|
75 | + */ |
|
76 | 76 | public function isTagExcluded(string $tagName) : bool |
77 | 77 | { |
78 | 78 | $tagName = strtolower($tagName); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | */ |
60 | 60 | public function excludeTags(array $tagNames) |
61 | 61 | { |
62 | - foreach($tagNames as $tagName) |
|
62 | + foreach ($tagNames as $tagName) |
|
63 | 63 | { |
64 | 64 | $this->excludeTag((string)$tagName); |
65 | 65 | } |