Completed
Push — master ( 146206...b36f87 )
by Andreas
02:11
created
src/Service/SyllableCounterFactory.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@
 block discarded – undo
37 37
     {
38 38
         $o = new Options();
39 39
         $o->setDefaultLocale($locale)
40
-          ->setRightMin(2)
41
-          ->setLeftMin(2)
42
-          ->setWordMin(4)
43
-          ->setTokenizers('Whitespace','Punctuation');
40
+            ->setRightMin(2)
41
+            ->setLeftMin(2)
42
+            ->setWordMin(4)
43
+            ->setTokenizers('Whitespace','Punctuation');
44 44
 
45 45
         $hyphenator = new Hyphenator();
46 46
         $hyphenator->setOptions($o);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
           ->setRightMin(2)
41 41
           ->setLeftMin(2)
42 42
           ->setWordMin(4)
43
-          ->setTokenizers('Whitespace','Punctuation');
43
+          ->setTokenizers('Whitespace', 'Punctuation');
44 44
 
45 45
         $hyphenator = new Hyphenator();
46 46
         $hyphenator->setOptions($o);
Please login to merge, or discard this patch.
src/Calculator/WordCounter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Util/SyllableFilter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
                 $tokens->replace($token, []);
48 48
                 continue;
49 49
             }
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
             $syllables = array();
55 55
             for ($i = 1; $i <= $length; $i++) {
56 56
                 $currPattern = mb_substr($pattern, $i, 1);
57
-                if ( $i < $this->_options->getLeftMin() ) {
57
+                if ($i < $this->_options->getLeftMin()) {
58 58
                     continue;
59 59
                 }
60
-                if ( $i > $length - $this->_options->getRightMin() ) {
60
+                if ($i > $length - $this->_options->getRightMin()) {
61 61
                     continue;
62 62
                 }
63 63
                 if (0 == $currPattern) {
64 64
                     continue;
65 65
                 }
66
-                if ( 0 === (int) $currPattern % 2 ) {
66
+                if (0 === (int) $currPattern % 2) {
67 67
                     continue;
68 68
                 }
69
-                $sylable = mb_substr($string, $lastOne, $i-$lastOne);
69
+                $sylable = mb_substr($string, $lastOne, $i - $lastOne);
70 70
                 $lastOne = $i;
71 71
                 $syllables[] = $sylable;
72 72
             }
Please login to merge, or discard this patch.