@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | //Searching for the page break tag |
| 87 | 87 | $breakTagPosition = strpos($text, "<!-- EndOfExcerptBlogOc -->"); |
| 88 | - if($breakTagPosition > 0){ |
|
| 88 | + if ($breakTagPosition > 0) { |
|
| 89 | 89 | return $this->completeDom(substr($text, 0, $breakTagPosition)); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $string = preg_split('/(<img[^>]+\>)|(<p[^>]+\>)|(<span[^>]+\>)|\s/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); |
| 94 | 94 | |
| 95 | 95 | //The preg split can return false, probably will never happen but just in case. |
| 96 | - if(!$string) |
|
| 96 | + if (!$string) |
|
| 97 | 97 | { |
| 98 | 98 | throw new \Error("excerpt generation failed"); |
| 99 | 99 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $trimmed .= $string[$wordCounter]; |
| 107 | 107 | if ($wordCounter < $count - 1) { |
| 108 | 108 | $trimmed .= " "; |
| 109 | - } else { |
|
| 109 | + }else { |
|
| 110 | 110 | $trimmed .= "[...]"; |
| 111 | 111 | } |
| 112 | 112 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $result = true; |
| 147 | 147 | foreach ($strings as $string) |
| 148 | 148 | { |
| 149 | - if(!$this->isAlphaNum($string)) |
|
| 149 | + if (!$this->isAlphaNum($string)) |
|
| 150 | 150 | { |
| 151 | 151 | $result = false; |
| 152 | 152 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | */ |
| 162 | 162 | public function isHexa(string $string):bool |
| 163 | 163 | { |
| 164 | - return preg_match("/[\da-f]/",$string); |
|
| 164 | + return preg_match("/[\da-f]/", $string); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |