@@ -54,7 +54,7 @@ |
||
| 54 | 54 | { |
| 55 | 55 | $tokens = $this->tokenizer->tokenize($text->getPlainText()); |
| 56 | 56 | foreach ($tokens as $token) { |
| 57 | - if (! $token instanceof WordToken) { |
|
| 57 | + if (!$token instanceof WordToken) { |
|
| 58 | 58 | $tokens->replace($token, []); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function run(t\TokenRegistry $tokens) |
| 50 | 50 | { |
| 51 | 51 | foreach ($tokens as $token) { |
| 52 | - if (! $token instanceof t\WordToken) { |
|
| 52 | + if (!$token instanceof t\WordToken) { |
|
| 53 | 53 | continue; |
| 54 | 54 | } |
| 55 | 55 | $string = $token->getFilteredContent(); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if (0 === (int) $currPattern % 2) { |
| 72 | 72 | continue; |
| 73 | 73 | } |
| 74 | - $sylable = mb_substr($string, $lastOne, $i-$lastOne); |
|
| 74 | + $sylable = mb_substr($string, $lastOne, $i - $lastOne); |
|
| 75 | 75 | $lastOne = $i; |
| 76 | 76 | $syllables[] = $sylable; |
| 77 | 77 | } |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | $wordsWithNSyllables = []; |
| 100 | 100 | foreach ($tokens as $token) { |
| 101 | - if (! $token instanceof t\WordToken) { |
|
| 101 | + if (!$token instanceof t\WordToken) { |
|
| 102 | 102 | continue; |
| 103 | 103 | } |
| 104 | - if (! $token->getHyphenatedContent()) { |
|
| 104 | + if (!$token->getHyphenatedContent()) { |
|
| 105 | 105 | continue; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public function run(t\TokenRegistry $tokens) |
| 44 | 44 | { |
| 45 | 45 | foreach ($tokens as $token) { |
| 46 | - if (! $token instanceof t\WordToken) { |
|
| 46 | + if (!$token instanceof t\WordToken) { |
|
| 47 | 47 | continue; |
| 48 | 48 | } |
| 49 | 49 | $string = $token->getFilteredContent(); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (0 === (int) $currPattern % 2) { |
| 66 | 66 | continue; |
| 67 | 67 | } |
| 68 | - $sylable = mb_substr($string, $lastOne, $i-$lastOne); |
|
| 68 | + $sylable = mb_substr($string, $lastOne, $i - $lastOne); |
|
| 69 | 69 | $lastOne = $i; |
| 70 | 70 | $syllables[] = $sylable; |
| 71 | 71 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | $syllables = []; |
| 90 | 90 | foreach ($tokens as $token) { |
| 91 | - if (! $token instanceof t\WordToken) { |
|
| 91 | + if (!$token instanceof t\WordToken) { |
|
| 92 | 92 | continue; |
| 93 | 93 | } |
| 94 | 94 | foreach ($token->getHyphenatedContent() as $syllable) { |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | { |
| 58 | 58 | $tokens = $this->tokenizer->tokenize($text->getPlainText()); |
| 59 | 59 | foreach ($tokens as $token) { |
| 60 | - if (! $token instanceof WordToken) { |
|
| 60 | + if (!$token instanceof WordToken) { |
|
| 61 | 61 | $tokens->replace($token, []); |
| 62 | 62 | } |
| 63 | 63 | if (mb_strlen($token->getFilteredContent()) < $this->minChars) { |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $maxSyllables = 0; |
| 62 | 62 | |
| 63 | 63 | foreach ($tokens as $token) { |
| 64 | - if (! $token instanceof WordToken) { |
|
| 64 | + if (!$token instanceof WordToken) { |
|
| 65 | 65 | continue; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function run(t\TokenRegistry $tokens) |
| 50 | 50 | { |
| 51 | 51 | foreach ($tokens as $token) { |
| 52 | - if (! $token instanceof t\WordToken) { |
|
| 52 | + if (!$token instanceof t\WordToken) { |
|
| 53 | 53 | continue; |
| 54 | 54 | } |
| 55 | 55 | $string = $token->getFilteredContent(); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if (0 === (int) $currPattern % 2) { |
| 72 | 72 | continue; |
| 73 | 73 | } |
| 74 | - $sylable = mb_substr($string, $lastOne, $i-$lastOne); |
|
| 74 | + $sylable = mb_substr($string, $lastOne, $i - $lastOne); |
|
| 75 | 75 | $lastOne = $i; |
| 76 | 76 | $syllables[] = $sylable; |
| 77 | 77 | } |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | $wordsWithNSyllables = []; |
| 100 | 100 | foreach ($tokens as $token) { |
| 101 | - if (! $token instanceof t\WordToken) { |
|
| 101 | + if (!$token instanceof t\WordToken) { |
|
| 102 | 102 | continue; |
| 103 | 103 | } |
| 104 | - if (! $token->getHyphenatedContent()) { |
|
| 104 | + if (!$token->getHyphenatedContent()) { |
|
| 105 | 105 | continue; |
| 106 | 106 | } |
| 107 | 107 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $plain = $text->getPlainText(); |
| 38 | 38 | $hash = sha1($plain); |
| 39 | 39 | |
| 40 | - if (! isset(static::$cache[$hash])) { |
|
| 40 | + if (!isset(static::$cache[$hash])) { |
|
| 41 | 41 | $result = parent::calculate($text); |
| 42 | 42 | static::$cache[$hash] = $result; |
| 43 | 43 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $plain = $text->getPlainText(); |
| 38 | 38 | $hash = sha1($plain); |
| 39 | 39 | |
| 40 | - if (! isset(static::$cache[$hash])) { |
|
| 40 | + if (!isset(static::$cache[$hash])) { |
|
| 41 | 41 | $result = parent::calculate($text); |
| 42 | 42 | static::$cache[$hash] = $result; |
| 43 | 43 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $plain = $text->getPlainText(); |
| 38 | 38 | $hash = sha1($plain); |
| 39 | 39 | |
| 40 | - if (! isset(static::$cache[$hash])) { |
|
| 40 | + if (!isset(static::$cache[$hash])) { |
|
| 41 | 41 | $result = parent::calculate($text); |
| 42 | 42 | static::$cache[$hash] = $result; |
| 43 | 43 | } |