@@ -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 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | // удаляем слова из последовательности |
88 | 88 | $key = $this->getText()->key(); |
89 | 89 | for ($i = 1; $i < $sequence_length; ++$i) { |
90 | - $this->getText()->offsetUnset($key + $i); |
|
90 | + $this->getText()->offsetUnset($key+$i); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | return true; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | protected function getPreviousWord($shift = 1) |
76 | 76 | { |
77 | - return $this->getText()->offsetGet($this->getText()->key() + $shift * -1); |
|
77 | + return $this->getText()->offsetGet($this->getText()->key()+$shift*-1); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -86,6 +86,6 @@ discard block |
||
86 | 86 | */ |
87 | 87 | protected function getNextWord($shift = 1) |
88 | 88 | { |
89 | - return $this->getText()->offsetGet($this->getText()->key() + $shift); |
|
89 | + return $this->getText()->offsetGet($this->getText()->key()+$shift); |
|
90 | 90 | } |
91 | 91 | } |