From 1f886de7fd0c13fe08cf1fb3e71789493d3e47c4 Mon Sep 17 00:00:00 2001 From: Peter Gribanov Date: Fri, 31 Mar 2017 14:17:37 +0300 Subject: [PATCH] not return self in adjustment methods --- src/Service/NavigateRange.php | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/src/Service/NavigateRange.php b/src/Service/NavigateRange.php index 83eb2fe..34dbdb8 100644 --- a/src/Service/NavigateRange.php +++ b/src/Service/NavigateRange.php @@ -56,11 +56,10 @@ public function getRightOffset() private function buildOffset() { if ($this->left_offset < 0) { - $this - ->definitionOffset() - ->adjustmentLargeLeftOffset() - ->adjustmentLargeRightOffset() - ->adjustmentLowerLeftOffset(); + $this->definitionOffset(); + $this->adjustmentLargeLeftOffset(); + $this->adjustmentLargeRightOffset(); + $this->adjustmentLowerLeftOffset(); } return $this; @@ -68,21 +67,15 @@ private function buildOffset() /** * Definition of offset to the left and to the right of the selected page. - * - * @return self */ private function definitionOffset() { $this->left_offset = (int) floor(($this->config->getMaxNavigate() - 1) / 2); $this->right_offset = (int) ceil(($this->config->getMaxNavigate() - 1) / 2); - - return $this; } /** * Adjustment, if the offset is too large left. - * - * @return self */ private function adjustmentLargeLeftOffset() { @@ -91,14 +84,10 @@ private function adjustmentLargeLeftOffset() $this->left_offset = $this->left_offset - $offset; $this->right_offset = $this->right_offset + $offset; } - - return $this; } /** * Adjustment, if the offset is too large right. - * - * @return self */ private function adjustmentLargeRightOffset() { @@ -111,21 +100,15 @@ private function adjustmentLargeRightOffset() $this->left_offset = $this->left_offset + $offset; $this->right_offset = $this->right_offset - $offset; } - - return $this; } /** * Left offset should point not lower of the first page. - * - * @return self */ private function adjustmentLowerLeftOffset() { if ($this->left_offset >= $this->config->getCurrentPage()) { $this->left_offset = $this->config->getCurrentPage() - 1; } - - return $this; } }