@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | - * @return array of service aliases |
|
| 94 | + * @return integer[] of service aliases |
|
| 95 | 95 | */ |
| 96 | 96 | public function getKeys() |
| 97 | 97 | { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | - * @return array of active service aliases |
|
| 102 | + * @return integer[] of active service aliases |
|
| 103 | 103 | */ |
| 104 | 104 | public function getActiveKeys() |
| 105 | 105 | { |
@@ -262,6 +262,9 @@ |
||
| 262 | 262 | return $this->mailerApi->sendMessage($message, null, null, $textBody, $html); |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | + /** |
|
| 266 | + * @param string $notificationType |
|
| 267 | + */ |
|
| 265 | 268 | private function generateEmailSubject($notificationType, array $templateArgs = []) |
| 266 | 269 | { |
| 267 | 270 | $siteName = $this->variableApi->getSystemVar('sitename'); |
@@ -110,6 +110,9 @@ discard block |
||
| 110 | 110 | $this->passwordApi = $passwordApi; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | + /** |
|
| 114 | + * @param TranslatorInterface $translator |
|
| 115 | + */ |
|
| 113 | 116 | public function setTranslator($translator) |
| 114 | 117 | { |
| 115 | 118 | $this->translator = $translator; |
@@ -273,8 +276,8 @@ discard block |
||
| 273 | 276 | /** |
| 274 | 277 | * Convert errors to string and add current line. |
| 275 | 278 | * @param $errors |
| 276 | - * @param $type |
|
| 277 | - * @param $line |
|
| 279 | + * @param string $type |
|
| 280 | + * @param integer $line |
|
| 278 | 281 | * @return string |
| 279 | 282 | */ |
| 280 | 283 | private function locateErrors($errors, $type, $line) |
@@ -96,6 +96,9 @@ |
||
| 96 | 96 | return $this->mailerApi->sendMessage($message, $subject, $body, $altBody, $html); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | + /** |
|
| 100 | + * @param string $notificationType |
|
| 101 | + */ |
|
| 99 | 102 | private function generateEmailSubject($notificationType, array $templateArgs = []) |
| 100 | 103 | { |
| 101 | 104 | $siteName = $this->variableApi->getSystemVar('sitename'); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function getInstallerClass() |
| 55 | 55 | { |
| 56 | 56 | $ns = $this->getNamespace(); |
| 57 | - $class = $ns.'\\'.substr($ns, strrpos($ns, '\\') + 1, strlen($ns)).'Installer'; |
|
| 57 | + $class = $ns . '\\' . substr($ns, strrpos($ns, '\\') + 1, strlen($ns)) . 'Installer'; |
|
| 58 | 58 | |
| 59 | 59 | return $class; |
| 60 | 60 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function getLocalePath() |
| 78 | 78 | { |
| 79 | - return $this->getPath().'/Resources/locale'; |
|
| 79 | + return $this->getPath() . '/Resources/locale'; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function getViewsPath() |
| 88 | 88 | { |
| 89 | - return $this->getPath().'/Resources/views'; |
|
| 89 | + return $this->getPath() . '/Resources/views'; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function getConfigPath() |
| 98 | 98 | { |
| 99 | - return $this->getPath().'/Resources/config'; |
|
| 99 | + return $this->getPath() . '/Resources/config'; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -144,9 +144,9 @@ discard block |
||
| 144 | 144 | $type = $this->getNameType(); |
| 145 | 145 | $typeLower = strtolower($type); |
| 146 | 146 | if (null === $this->extension) { |
| 147 | - $basename = preg_replace('/'.$type.'/', '', $this->getName()); |
|
| 147 | + $basename = preg_replace('/' . $type . '/', '', $this->getName()); |
|
| 148 | 148 | |
| 149 | - $class = $this->getNamespace().'\\DependencyInjection\\'.$basename.'Extension'; |
|
| 149 | + $class = $this->getNamespace() . '\\DependencyInjection\\' . $basename . 'Extension'; |
|
| 150 | 150 | if (class_exists($class)) { |
| 151 | 151 | $extension = new $class(); |
| 152 | 152 | |
@@ -92,6 +92,9 @@ discard block |
||
| 92 | 92 | return false; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | + /** |
|
| 96 | + * @param string $file |
|
| 97 | + */ |
|
| 95 | 98 | public function getFileContents($file) |
| 96 | 99 | { |
| 97 | 100 | return file_get_contents($file); |
@@ -142,6 +145,10 @@ discard block |
||
| 142 | 145 | return true; |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $type |
|
| 150 | + * @param boolean $indexByShortName |
|
| 151 | + */ |
|
| 145 | 152 | private function getMetaData($type, $indexByShortName) |
| 146 | 153 | { |
| 147 | 154 | $array = []; |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | /** |
| 168 | 168 | * Set filterstring. |
| 169 | 169 | * |
| 170 | - * @param mixed $filter Filter string or array |
|
| 170 | + * @param string $filter Filter string or array |
|
| 171 | 171 | * |
| 172 | 172 | * @return void |
| 173 | 173 | */ |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | // Get filter1 ... filterN |
| 127 | 127 | while (true) { |
| 128 | - $filterURLName = $this->filterKey."$i"; |
|
| 128 | + $filterURLName = $this->filterKey . "$i"; |
|
| 129 | 129 | $filterStr = $this->request->query->filter( |
| 130 | 130 | $filterURLName, |
| 131 | 131 | '', |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if (!isset($this->filter) || empty($this->filter)) { |
| 154 | 154 | $filter = $this->getFiltersFromInput(); |
| 155 | 155 | if (is_array($filter) && count($filter) > 0) { |
| 156 | - $this->filter = "(".implode(')*(', $filter).")"; |
|
| 156 | + $this->filter = "(" . implode(')*(', $filter) . ")"; |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | public function setFilter($filter) |
| 175 | 175 | { |
| 176 | 176 | if (is_array($filter)) { |
| 177 | - $this->filter = "(".implode(')*(', $filter).")"; |
|
| 177 | + $this->filter = "(" . implode(')*(', $filter) . ")"; |
|
| 178 | 178 | } else { |
| 179 | 179 | $this->filter = $filter; |
| 180 | 180 | } |
@@ -221,9 +221,9 @@ discard block |
||
| 221 | 221 | } elseif (substr($filter, 0, 1) == ',') { |
| 222 | 222 | $this->filter .= $filter; |
| 223 | 223 | } elseif (substr($filter, 0, 1) == '*') { |
| 224 | - $this->filter .= ','.(substr($filter, 1)); |
|
| 224 | + $this->filter .= ',' . (substr($filter, 1)); |
|
| 225 | 225 | } else { |
| 226 | - $this->filter .= ','.($filter); |
|
| 226 | + $this->filter .= ',' . ($filter); |
|
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | |
@@ -243,9 +243,9 @@ discard block |
||
| 243 | 243 | } elseif (substr($filter, 0, 1) == '*') { |
| 244 | 244 | $this->filter .= $filter; |
| 245 | 245 | } elseif (substr($filter, 0, 1) == ',') { |
| 246 | - $this->filter .= '*'.(substr($filter, 1)); |
|
| 246 | + $this->filter .= '*' . (substr($filter, 1)); |
|
| 247 | 247 | } else { |
| 248 | - $this->filter .= '*'.($filter); |
|
| 248 | + $this->filter .= '*' . ($filter); |
|
| 249 | 249 | } |
| 250 | 250 | } |
| 251 | 251 | |
@@ -349,9 +349,11 @@ |
||
| 349 | 349 | break; |
| 350 | 350 | } |
| 351 | 351 | } |
| 352 | - if (null === $or) { // make new or Object |
|
| 352 | + if (null === $or) { |
|
| 353 | +// make new or Object |
|
| 353 | 354 | $or = new Orx(); |
| 354 | - if (null !== $and) { // add existing and |
|
| 355 | + if (null !== $and) { |
|
| 356 | +// add existing and |
|
| 355 | 357 | $this->addBtoA($or, $and); |
| 356 | 358 | } |
| 357 | 359 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * Returns the operators the plugin can handle. |
| 24 | 24 | * |
| 25 | - * @return array Operators |
|
| 25 | + * @return string[] Operators |
|
| 26 | 26 | */ |
| 27 | 27 | public function availableOperators() |
| 28 | 28 | { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * @param string $date Date string |
| 99 | 99 | * @param string $type Period type |
| 100 | 100 | * |
| 101 | - * @return array Start and end of the period |
|
| 101 | + * @return integer[] Start and end of the period |
|
| 102 | 102 | */ |
| 103 | 103 | private function makePeriod($date, $type) |
| 104 | 104 | { |
@@ -176,7 +176,7 @@ |
||
| 176 | 176 | if (preg_match('~^(year|month|week|day|hour|min):\s*(.*)$~i', $value, $res)) { |
| 177 | 177 | $type = strtolower($res[1]); |
| 178 | 178 | if (strlen($res[2]) == 4) { |
| 179 | - $res[2] = "01.01.".$res[2]; |
|
| 179 | + $res[2] = "01.01." . $res[2]; |
|
| 180 | 180 | } |
| 181 | 181 | $time = strtotime($res[2]); |
| 182 | 182 | } elseif (preg_match('~(year|month|week|day|hour|min|tomorrow)~', $value, $res)) { |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | /** |
| 100 | 100 | * Generates payload. |
| 101 | 101 | * |
| 102 | - * @return array |
|
| 102 | + * @return string |
|
| 103 | 103 | */ |
| 104 | 104 | protected function generatePayload() |
| 105 | 105 | { |