Completed
Push — master ( 111737...5430e3 )
by Andreas
09:48
created
src/Service/WordsWithNSyllablesOnlyCounterFactory.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,6 @@
 block discarded – undo
28 28
 
29 29
 use Org\Heigl\Hyphenator\Hyphenator;
30 30
 use Org\Heigl\Hyphenator\Options;
31
-use Org_Heigl\TextStatistics\Calculator\WordsWithNSyllablesCounter;
32
-use Org_Heigl\TextStatistics\Util\WordsWithNSyllablesFilter;
33 31
 
34 32
 class WordsWithNSyllablesCounterFactory
35 33
 {
Please login to merge, or discard this patch.
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.
src/Service/WordsWithNSyllablesCounterFactory.php 1 patch
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.
src/Util/WordsWithNSyllablesFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
                 $tokens->replace($token, []);
54 54
                 continue;
55 55
             }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 if (0 === (int) $currPattern % 2) {
73 73
                     continue;
74 74
                 }
75
-                $sylable = mb_substr($string, $lastOne, $i-$lastOne);
75
+                $sylable = mb_substr($string, $lastOne, $i - $lastOne);
76 76
                 $lastOne = $i;
77 77
                 $syllables[] = $sylable;
78 78
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $wordsWithNSyllables = [];
101 101
         foreach ($tokens as $token) {
102
-            if (! $token->getHyphenatedContent()) {
102
+            if (!$token->getHyphenatedContent()) {
103 103
                 continue;
104 104
             }
105 105
 
Please login to merge, or discard this patch.
src/Util/WordsWithNSyllablesOnlyFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
                 $tokens->replace($token, []);
54 54
                 continue;
55 55
             }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 if (0 === (int) $currPattern % 2) {
73 73
                     continue;
74 74
                 }
75
-                $sylable = mb_substr($string, $lastOne, $i-$lastOne);
75
+                $sylable = mb_substr($string, $lastOne, $i - $lastOne);
76 76
                 $lastOne = $i;
77 77
                 $syllables[] = $sylable;
78 78
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $wordsWithNSyllables = [];
101 101
         foreach ($tokens as $token) {
102
-            if (! $token->getHyphenatedContent()) {
102
+            if (!$token->getHyphenatedContent()) {
103 103
                 continue;
104 104
             }
105 105
 
Please login to merge, or discard this patch.
src/Calculator/WordMaxSyllablesCounter.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/Calculator/FleschReadingEaseCalculatorGerman.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@
 block discarded – undo
38 38
  */
39 39
 class FleschReadingEaseCalculatorGerman extends FleschReadingEaseCalculator
40 40
 {
41
-     /**
42
-     * Do the actual calculation of a statistic
43
-     *
44
-     * @param Text $text
45
-     *
46
-     * @return mixed
47
-     */
41
+        /**
42
+         * Do the actual calculation of a statistic
43
+         *
44
+         * @param Text $text
45
+         *
46
+         * @return mixed
47
+         */
48 48
     public function calculate(Text $text)
49 49
     {
50 50
         return 180 -
Please login to merge, or discard this patch.
src/Calculator/WordsWithNCharsCounter.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.