Completed
Push — master ( e626ab...d9cefb )
by Christian
02:00
created
Category
Classes/CV/Lipsum/TypoScript/LipsumImplementation.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $word = $this->latinWords[rand(0, count($this->latinWords) - 1)];
45 45
 
46 46
         // make sure next word is different
47
-        if($word == $this->lastWord) {
47
+        if ($word == $this->lastWord) {
48 48
             return $this->randomWord();
49 49
         }
50 50
 
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         $sentence = array();
61 61
 
62 62
         $commaPos = rand(3, $length - 4);
63
-        for($i = 0; $i < $length; $i++) {
63
+        for ($i = 0; $i < $length; $i++) {
64 64
             $word = $this->randomWord();
65 65
 
66 66
             // 50% chance of adding a comma to sentences longer than 6 words
67
-            if($i == $commaPos && $length > 6 && rand(0,1) == 1) {
67
+            if ($i == $commaPos && $length > 6 && rand(0, 1) == 1) {
68 68
                 $word .= ',';
69 69
             }
70 70
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         //If there are less than MIN_WORDS_PER_SENTENCE words left, add them to the current sentence
86 86
         $rest = $wordCount - ($usedWordsCount + $length);
87
-        if($rest < $this::MIN_WORDS_PER_SENTENCE) {
87
+        if ($rest < $this::MIN_WORDS_PER_SENTENCE) {
88 88
             $length += $rest;
89 89
         }
90 90
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $usedWordsCount = 0;
102 102
         $sentences = array();
103 103
 
104
-        if($startLipsum) {
104
+        if ($startLipsum) {
105 105
             $sentences[] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
106 106
             $usedWordsCount += 8;
107 107
         }
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
      */
127 127
     protected function createParagraphs($sentences, $paragraphCount, $sentencesPerParagraph, $textAlign) {
128 128
         $paragraphs = array();
129
-        for($i = 0; $i < $paragraphCount; $i++) {
129
+        for ($i = 0; $i < $paragraphCount; $i++) {
130 130
             $length = $sentencesPerParagraph;
131 131
 
132
-            if($i == ($paragraphCount - 1)) {
132
+            if ($i == ($paragraphCount - 1)) {
133 133
                 $length = null;
134 134
             }
135 135
 
Please login to merge, or discard this patch.