@@ -62,7 +62,7 @@ discard block  | 
                                                    ||
| 62 | 62 | $word = $this->latinWords[rand(0, count($this->latinWords) - 1)];  | 
                                                        
| 63 | 63 | |
| 64 | 64 | // make sure next word is different  | 
                                                        
| 65 | -        if($word == $this->lastWord) { | 
                                                        |
| 65 | +        if ($word == $this->lastWord) { | 
                                                        |
| 66 | 66 | return $this->randomWord();  | 
                                                        
| 67 | 67 | }  | 
                                                        
| 68 | 68 | |
@@ -80,18 +80,18 @@ discard block  | 
                                                    ||
| 80 | 80 | $sentence = array();  | 
                                                        
| 81 | 81 | |
| 82 | 82 | $commaPos = rand(3, $length - 4);  | 
                                                        
| 83 | -        for($i = 0; $i < $length; $i++) { | 
                                                        |
| 83 | +        for ($i = 0; $i < $length; $i++) { | 
                                                        |
| 84 | 84 | $word = $this->randomWord();  | 
                                                        
| 85 | 85 | |
| 86 | 86 | // 50% chance of adding a comma to sentences longer than 6 words  | 
                                                        
| 87 | -            if($i == $commaPos && $length > 6 && rand(0,1) == 1) { | 
                                                        |
| 87 | +            if ($i == $commaPos && $length > 6 && rand(0, 1) == 1) { | 
                                                        |
| 88 | 88 | $word .= ',';  | 
                                                        
| 89 | 89 | }  | 
                                                        
| 90 | 90 | |
| 91 | 91 | $sentence[] = $word;  | 
                                                        
| 92 | 92 | }  | 
                                                        
| 93 | 93 | |
| 94 | -        return ucfirst(implode(' ', $sentence)) . '.'; | 
                                                        |
| 94 | +        return ucfirst(implode(' ', $sentence)).'.'; | 
                                                        |
| 95 | 95 | }  | 
                                                        
| 96 | 96 | |
| 97 | 97 | /**  | 
                                                        
@@ -105,7 +105,7 @@ discard block  | 
                                                    ||
| 105 | 105 | |
| 106 | 106 | //If there are less than MIN_WORDS_PER_SENTENCE words left, add them to the current sentence  | 
                                                        
| 107 | 107 | $rest = $wordCount - ($usedWordsCount + $length);  | 
                                                        
| 108 | -        if($rest < $this::MIN_WORDS_PER_SENTENCE) { | 
                                                        |
| 108 | +        if ($rest < $this::MIN_WORDS_PER_SENTENCE) { | 
                                                        |
| 109 | 109 | $length += $rest;  | 
                                                        
| 110 | 110 | }  | 
                                                        
| 111 | 111 | |
@@ -124,7 +124,7 @@ discard block  | 
                                                    ||
| 124 | 124 | $usedWordsCount = 0;  | 
                                                        
| 125 | 125 | $sentences = array();  | 
                                                        
| 126 | 126 | |
| 127 | -        if($startLipsum) { | 
                                                        |
| 127 | +        if ($startLipsum) { | 
                                                        |
| 128 | 128 | $sentences[] = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';  | 
                                                        
| 129 | 129 | $usedWordsCount += 8;  | 
                                                        
| 130 | 130 | }  | 
                                                        
@@ -151,15 +151,15 @@ discard block  | 
                                                    ||
| 151 | 151 | protected function createParagraphs($sentences, $paragraphCount, $sentencesPerParagraph, $textAlign)  | 
                                                        
| 152 | 152 |      { | 
                                                        
| 153 | 153 | $paragraphs = array();  | 
                                                        
| 154 | -        for($i = 0; $i < $paragraphCount; $i++) { | 
                                                        |
| 154 | +        for ($i = 0; $i < $paragraphCount; $i++) { | 
                                                        |
| 155 | 155 | $length = $sentencesPerParagraph;  | 
                                                        
| 156 | 156 | |
| 157 | -            if($i == ($paragraphCount - 1)) { | 
                                                        |
| 157 | +            if ($i == ($paragraphCount - 1)) { | 
                                                        |
| 158 | 158 | $length = null;  | 
                                                        
| 159 | 159 | }  | 
                                                        
| 160 | 160 | |
| 161 | 161 |              $paragraphSentences = implode(' ', array_slice($sentences, $i * $sentencesPerParagraph, $length)); | 
                                                        
| 162 | - $paragraphs[] = '<p style="text-align: ' . $textAlign . ';">' . $paragraphSentences . '</p>';  | 
                                                        |
| 162 | + $paragraphs[] = '<p style="text-align: '.$textAlign.';">'.$paragraphSentences.'</p>';  | 
                                                        |
| 163 | 163 | }  | 
                                                        
| 164 | 164 | |
| 165 | 165 | return $paragraphs;  |