| @@ -13,6 +13,10 @@ | ||
| 13 | 13 |  { | 
| 14 | 14 | protected $imagesDir; | 
| 15 | 15 | |
| 16 | + /** | |
| 17 | + * @param \CloudControl\Cms\storage\Repository $repository | |
| 18 | + * @param string $imagesDir | |
| 19 | + */ | |
| 16 | 20 | public function __construct($repository, $imagesDir) | 
| 17 | 21 |      { | 
| 18 | 22 | parent::__construct($repository); | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | 70 | /** | 
| 71 | - * @param $request | |
| 71 | + * @param Request $request | |
| 72 | 72 | * @param CmsComponent $cmsComponent | 
| 73 | 73 | */ | 
| 74 | 74 | private function newRoute($request, $cmsComponent) | 
| @@ -83,7 +83,7 @@ discard block | ||
| 83 | 83 | } | 
| 84 | 84 | |
| 85 | 85 | /** | 
| 86 | - * @param $request | |
| 86 | + * @param Request $request | |
| 87 | 87 | * @param CmsComponent $cmsComponent | 
| 88 | 88 | */ | 
| 89 | 89 | private function deleteRoute($request, $cmsComponent) | 
| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 | * @param string $imagePath | 
| 77 | 77 | * @param bool $getExtension | 
| 78 | 78 | * | 
| 79 | - * @return bool|int|string | |
| 79 | + * @return integer | |
| 80 | 80 | */ | 
| 81 | 81 | public function getImageMimeType($imagePath, $getExtension = false) | 
| 82 | 82 |          { | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | } | 
| 150 | 150 | |
| 151 | 151 | /** | 
| 152 | - * @param $pathToBitmapFile | |
| 152 | + * @param string $pathToBitmapFile | |
| 153 | 153 | * | 
| 154 | 154 | * @return string | 
| 155 | 155 | */ | 
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 | } | 
| 166 | 166 | |
| 167 | 167 | /** | 
| 168 | - * @param $header | |
| 168 | + * @param string $header | |
| 169 | 169 | * | 
| 170 | 170 | * @return array | 
| 171 | 171 | */ | 
| @@ -195,14 +195,14 @@ discard block | ||
| 195 | 195 | * Loop through the data in the body of the bitmap | 
| 196 | 196 | * file and calculate each individual pixel based on the | 
| 197 | 197 | * bytes | 
| 198 | - * @param $bodySize | |
| 199 | - * @param $x | |
| 198 | + * @param integer $bodySize | |
| 199 | + * @param integer $x | |
| 200 | 200 | * @param $width | 
| 201 | - * @param $usePadding | |
| 202 | - * @param $y | |
| 201 | + * @param boolean $usePadding | |
| 202 | + * @param integer $y | |
| 203 | 203 | * @param $height | 
| 204 | - * @param $body | |
| 205 | - * @param $image | |
| 204 | + * @param string $body | |
| 205 | + * @param resource $image | |
| 206 | 206 | */ | 
| 207 | 207 | private function loopThroughBodyAndCalculatePixels($bodySize, $x, $width, $usePadding, $y, $height, $body, $image) | 
| 208 | 208 |          { | 
| @@ -10,6 +10,10 @@ discard block | ||
| 10 | 10 |  { | 
| 11 | 11 | protected $filesDir; | 
| 12 | 12 | |
| 13 | + /** | |
| 14 | + * @param \CloudControl\Cms\storage\Repository $repository | |
| 15 | + * @param string $filesDir | |
| 16 | + */ | |
| 13 | 17 | public function __construct($repository, $filesDir) | 
| 14 | 18 |      { | 
| 15 | 19 | parent::__construct($repository); | 
| @@ -102,7 +106,7 @@ discard block | ||
| 102 | 106 | } | 
| 103 | 107 | |
| 104 | 108 | /** | 
| 105 | - * @return mixed | |
| 109 | + * @return string | |
| 106 | 110 | */ | 
| 107 | 111 | public function getFilesDir() | 
| 108 | 112 |      { | 
| @@ -45,7 +45,7 @@ | ||
| 45 | 45 |          { | 
| 46 | 46 | $this->template = $template; | 
| 47 | 47 | $this->request = $request; | 
| 48 | - $this->parameters = (array)$parameters; | |
| 48 | + $this->parameters = (array) $parameters; | |
| 49 | 49 | $this->matchedSitemapItem = $matchedSitemapItem; | 
| 50 | 50 | } | 
| 51 | 51 | |
| @@ -88,6 +88,7 @@ discard block | ||
| 88 | 88 | * | 
| 89 | 89 | * @param bool $obClean | 
| 90 | 90 | * @param null | Application $application | 
| 91 | + * @param Application $application | |
| 91 | 92 | * | 
| 92 | 93 | * @return string | 
| 93 | 94 | * @throws \Exception | 
| @@ -157,7 +158,7 @@ discard block | ||
| 157 | 158 | } | 
| 158 | 159 | |
| 159 | 160 | /** | 
| 160 | - * @param $template | |
| 161 | + * @param string $template | |
| 161 | 162 | * @param $application | 
| 162 | 163 | * @return string | 
| 163 | 164 | */ | 
| @@ -163,7 +163,7 @@ | ||
| 163 | 163 |          if (isset($_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID])) { | 
| 164 | 164 | $this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID]; | 
| 165 | 165 |          } else { | 
| 166 | - $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string)microtime(true); | |
| 166 | + $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID] = (string) microtime(true); | |
| 167 | 167 | $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName]['submitted'] = false; | 
| 168 | 168 | $this->formId = $_SESSION[self::SESSION_PARAMETER_FORM_COMPONENT][$this->formParameterName][self::PARAMETER_FORM_ID]; | 
| 169 | 169 | } | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | * submitting the form | 
| 150 | 150 | * | 
| 151 | 151 | * @param $postValues | 
| 152 | - * @param $storage | |
| 152 | + * @param Storage $storage | |
| 153 | 153 | */ | 
| 154 | 154 | protected function postSubmit($postValues, $storage) | 
| 155 | 155 |      { | 
| @@ -320,7 +320,7 @@ discard block | ||
| 320 | 320 | } | 
| 321 | 321 | |
| 322 | 322 | /** | 
| 323 | - * @param $form | |
| 323 | + * @param string|null $form | |
| 324 | 324 | */ | 
| 325 | 325 | private function setFormParameter($form) | 
| 326 | 326 |      { | 
| @@ -26,7 +26,7 @@ discard block | ||
| 26 | 26 | */ | 
| 27 | 27 | public function __construct($template, Request $request, $parameters, $matchedSitemapItem) | 
| 28 | 28 |      { | 
| 29 | - $this->parameters = (array)$parameters; | |
| 29 | + $this->parameters = (array) $parameters; | |
| 30 | 30 | $this->checkParameters(); | 
| 31 | 31 | |
| 32 | 32 | $lang = substr(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : $this->defaultLanguage, 0, 2); | 
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | unset($this->parameters['languageParameterName']); | 
| 64 | 64 | } | 
| 65 | 65 |          if (isset($this->parameters['forceRedirect'])) { | 
| 66 | - $this->forceRedirect = (bool)$this->parameters['forceRedirect']; | |
| 66 | + $this->forceRedirect = (bool) $this->parameters['forceRedirect']; | |
| 67 | 67 | unset($this->parameters['forceRedirect']); | 
| 68 | 68 | } | 
| 69 | 69 | } | 
| @@ -105,7 +105,7 @@ | ||
| 105 | 105 | /** | 
| 106 | 106 | * Detect if the language is switched manually | 
| 107 | 107 | * | 
| 108 | - * @param $request | |
| 108 | + * @param Request $request | |
| 109 | 109 | */ | 
| 110 | 110 | private function checkLanguageSwitch($request) | 
| 111 | 111 |      { | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | */ | 
| 52 | 52 | public function SetPreserveAspectRatio($bool) | 
| 53 | 53 |          { | 
| 54 | - $this->_preserveAspectRatio = (bool)$bool; | |
| 54 | + $this->_preserveAspectRatio = (bool) $bool; | |
| 55 | 55 | return $this; | 
| 56 | 56 | } | 
| 57 | 57 | |
| @@ -20,7 +20,7 @@ | ||
| 20 | 20 | public static function slugify($str, $replace = array(), $delimiter = '-') | 
| 21 | 21 |      { | 
| 22 | 22 |          if (!empty($replace)) { | 
| 23 | - $str = str_replace((array)$replace, ' ', $str); | |
| 23 | + $str = str_replace((array) $replace, ' ', $str); | |
| 24 | 24 | } | 
| 25 | 25 | |
| 26 | 26 |          $clean = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $str); |