@@ -173,9 +173,9 @@ |
||
| 173 | 173 | |
| 174 | 174 | /** |
| 175 | 175 | * @param $textParts |
| 176 | - * @param $variables |
|
| 177 | - * @param $haveVariables |
|
| 178 | - * @param $terms |
|
| 176 | + * @param integer $variables |
|
| 177 | + * @param integer $haveVariables |
|
| 178 | + * @param integer $terms |
|
| 179 | 179 | * @return string |
| 180 | 180 | */ |
| 181 | 181 | protected function formatting($textParts, $variables, $haveVariables, $terms) |
@@ -166,6 +166,9 @@ |
||
| 166 | 166 | return $this->toRenderTypeValue; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | + /** |
|
| 170 | + * @param \stdClass $data |
|
| 171 | + */ |
|
| 169 | 172 | private function renderPage($data) |
| 170 | 173 | { |
| 171 | 174 | if (empty($data->page)) { |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | public function rendersEmptyVariables($data) |
| 188 | 188 | { |
| 189 | - if($this->toRenderType === "variable" && |
|
| 189 | + if ($this->toRenderType === "variable" && |
|
| 190 | 190 | (!isset($data->{$this->toRenderTypeValue}) || empty($data->{$this->toRenderTypeValue}))) { |
| 191 | 191 | return true; |
| 192 | 192 | } else if ($this->toRenderType === "macro") { |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | private function normalizeDateRange($page) |
| 200 | 200 | { |
| 201 | 201 | if (preg_match("/^(\d+)--(\d+)$/", trim($page), $matches)) { |
| 202 | - return $matches[1]."-".$matches[2]; |
|
| 202 | + return $matches[1] . "-" . $matches[2]; |
|
| 203 | 203 | } |
| 204 | 204 | return $page; |
| 205 | 205 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | list($from, $to) = $ranges; |
| 25 | 25 | |
| 26 | - if (!empty($pageRangeFormat) ) { |
|
| 26 | + if (!empty($pageRangeFormat)) { |
|
| 27 | 27 | |
| 28 | 28 | switch ($pageRangeFormat) { |
| 29 | 29 | case PageRangeFormats::MINIMAL: |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | break; |
| 32 | 32 | case PageRangeFormats::MINIMAL_TWO: |
| 33 | 33 | if (strlen($to) > 2) { |
| 34 | - $resTo = self::renderMinimal($from, $to, strlen($to)-2); |
|
| 34 | + $resTo = self::renderMinimal($from, $to, strlen($to) - 2); |
|
| 35 | 35 | } else { |
| 36 | 36 | $resTo = $to; |
| 37 | 37 | } |