@@ -69,9 +69,9 @@ |
||
69 | 69 | public function getPercent() |
70 | 70 | { |
71 | 71 | if (!$this->percent && ($frequencies = $this->getFrequency())) { |
72 | - $ratio = max($frequencies) / 100; |
|
72 | + $ratio = max($frequencies)/100; |
|
73 | 73 | foreach ($frequencies as $word => $frequency) { |
74 | - $this->percent[$word] = $frequency / $ratio; |
|
74 | + $this->percent[$word] = $frequency/$ratio; |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 |
@@ -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 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | // удаляем слова из последовательности |
88 | 88 | $key = $this->getText()->key(); |
89 | 89 | for ($i = 1; $i < count($sequence); ++$i) { |
90 | - $this->getText()->seek($key + $i); |
|
90 | + $this->getText()->seek($key+$i); |
|
91 | 91 | $this->getText()->remove(); |
92 | 92 | } |
93 | 93 | $this->getText()->seek($key); |