@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | protected function getPreviousWord($shift = 1) |
78 | 78 | { |
79 | - return $this->getNextWord($shift * -1); |
|
79 | + return $this->getNextWord($shift*-1); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $position = $this->getText()->key(); |
92 | 92 | |
93 | 93 | try { |
94 | - $this->getText()->seek($position + $shift); |
|
94 | + $this->getText()->seek($position+$shift); |
|
95 | 95 | } catch (\OutOfBoundsException $e) { |
96 | 96 | return null; |
97 | 97 | } |
@@ -70,9 +70,9 @@ |
||
70 | 70 | public function getPercent() |
71 | 71 | { |
72 | 72 | if (empty($this->percent) && ($frequencies = $this->getFrequency())) { |
73 | - $ratio = max($frequencies) / 100; |
|
73 | + $ratio = max($frequencies)/100; |
|
74 | 74 | foreach ($frequencies as $word => $frequency) { |
75 | - $this->percent[$word] = $frequency / $ratio; |
|
75 | + $this->percent[$word] = $frequency/$ratio; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 |
@@ -86,7 +86,7 @@ |
||
86 | 86 | // удаляем слова из последовательности |
87 | 87 | $key = $this->getText()->key(); |
88 | 88 | for ($i = 1; $i < $sequence_length; ++$i) { |
89 | - $this->getText()->seek($key + $i); |
|
89 | + $this->getText()->seek($key+$i); |
|
90 | 90 | $this->getText()->remove(); |
91 | 91 | } |
92 | 92 | $this->getText()->seek($key); |