@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @param $type |
|
| 33 | + * @param string $type |
|
| 34 | 34 | * @return $this |
| 35 | 35 | */ |
| 36 | 36 | public function getType($type) |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * @param string $path |
| 75 | - * @return bool |
|
| 75 | + * @return Model |
|
| 76 | 76 | */ |
| 77 | 77 | public function setResourceFromFile($path) |
| 78 | 78 | { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | - * @return bool |
|
| 134 | + * @return Model |
|
| 135 | 135 | */ |
| 136 | 136 | public function save() |
| 137 | 137 | { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @return mixed |
|
| 39 | + * @return null|string |
|
| 40 | 40 | */ |
| 41 | 41 | public function getTypeValue() |
| 42 | 42 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | 135 | * @param FPDI $pdf |
| 136 | - * @param $value |
|
| 136 | + * @param null|string $value |
|
| 137 | 137 | * @return int|string |
| 138 | 138 | */ |
| 139 | 139 | protected function pdfXPosition($pdf, $value) |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | 160 | * @param FPDI $pdf |
| 161 | - * @param $value |
|
| 161 | + * @param null|string $value |
|
| 162 | 162 | * @return int|string |
| 163 | 163 | */ |
| 164 | 164 | protected function pdfYPosition($pdf, $value) |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | return $valueType; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - return '<<'.$this->field.'>>'; |
|
| 83 | + return '<<' . $this->field . '>>'; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @param $model |
|
| 18 | + * @param \ByTIC\Common\Records\Record $model |
|
| 19 | 19 | * @return null |
| 20 | 20 | */ |
| 21 | 21 | public function getValue($model) |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | abstract public function getModelExample(); |
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | - * @param $model |
|
| 90 | + * @param Record $model |
|
| 91 | 91 | */ |
| 92 | 92 | public function download($model) |
| 93 | 93 | { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function getName() |
| 34 | 34 | { |
| 35 | - return $this->getManager()->getLabel('title.singular').' #'.$this->id; |
|
| 35 | + return $this->getManager()->getLabel('title.singular') . ' #' . $this->id; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | public function getFile() |
| 52 | 52 | { |
| 53 | 53 | $file = $this->getNewFile(); |
| 54 | - $fileName = $this->getFileNameDefault().'.pdf'; |
|
| 54 | + $fileName = $this->getFileNameDefault() . '.pdf'; |
|
| 55 | 55 | $file->setName($fileName); |
| 56 | 56 | |
| 57 | 57 | return $file; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->pdfDrawGuidelines($pdf); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $pdf->Output($this->getFileNameFromModel($model).'.pdf', 'D'); |
|
| 100 | + $pdf->Output($this->getFileNameFromModel($model) . '.pdf', 'D'); |
|
| 101 | 101 | die(); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -151,8 +151,8 @@ discard block |
||
| 151 | 151 | header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1'); |
| 152 | 152 | header('Pragma: public'); |
| 153 | 153 | header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past |
| 154 | - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 155 | - header('Content-Disposition: attachment; filename="'.basename($file).'";'); |
|
| 154 | + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 155 | + header('Content-Disposition: attachment; filename="' . basename($file) . '";'); |
|
| 156 | 156 | header("Content-Transfer-Encoding: Binary"); |
| 157 | 157 | readfile($file); |
| 158 | 158 | die(); |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | if ($model->demo === true) { |
| 171 | 171 | $this->pdfDrawGuidelines($pdf); |
| 172 | 172 | } |
| 173 | - $fileName = $this->getFileNameFromModel($model).'.pdf'; |
|
| 173 | + $fileName = $this->getFileNameFromModel($model) . '.pdf'; |
|
| 174 | 174 | if (is_dir($directory)) { |
| 175 | - return $pdf->Output($directory.$fileName, 'F'); |
|
| 175 | + return $pdf->Output($directory . $fileName, 'F'); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return false; |
@@ -232,7 +232,7 @@ |
||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
| 235 | - * @return bool|mixed |
|
| 235 | + * @return null|false |
|
| 236 | 236 | */ |
| 237 | 237 | public function update() |
| 238 | 238 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | protected $defaultValue = null; |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * @param $name |
|
| 45 | + * @param string $name |
|
| 46 | 46 | * @return Property |
| 47 | 47 | * @throws Exception |
| 48 | 48 | */ |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | - * @return mixed |
|
| 109 | + * @return string |
|
| 110 | 110 | */ |
| 111 | 111 | public function getName() |
| 112 | 112 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | - * @return mixed |
|
| 135 | + * @return string |
|
| 136 | 136 | */ |
| 137 | 137 | public function getField() |
| 138 | 138 | { |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | - * @param RecordManager|RecordsTrait $manager |
|
| 159 | + * @param RecordsTrait $manager |
|
| 160 | 160 | */ |
| 161 | 161 | public function setManager($manager) |
| 162 | 162 | { |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | /** |
| 285 | - * @param null $type |
|
| 285 | + * @param string|null $type |
|
| 286 | 286 | * @return string |
| 287 | 287 | */ |
| 288 | 288 | public function getItemClass($type = null) |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | $items = $this->getItems(); |
| 52 | 52 | if (!$this->hasItem($name)) { |
| 53 | 53 | throw new Exception( |
| 54 | - 'Bad Item ['.$name.'] for smart property |
|
| 55 | - ['.$this->getManager()->getController().']['.$this->getName().']'); |
|
| 54 | + 'Bad Item [' . $name . '] for smart property |
|
| 55 | + ['.$this->getManager()->getController() . '][' . $this->getName() . ']'); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | return $items[$name]; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | protected function getItemsNamesFromManager() |
| 99 | 99 | { |
| 100 | - $methodName = 'get'.$this->getName().'Names'; |
|
| 100 | + $methodName = 'get' . $this->getName() . 'Names'; |
|
| 101 | 101 | if (method_exists($this->getManager(), $methodName)) { |
| 102 | 102 | return $this->getManager()->$methodName(); |
| 103 | 103 | } |
@@ -198,12 +198,12 @@ discard block |
||
| 198 | 198 | */ |
| 199 | 199 | public function generateItemsDirectory() |
| 200 | 200 | { |
| 201 | - $methodName = 'get'.$this->getName().'ItemsDirectory'; |
|
| 201 | + $methodName = 'get' . $this->getName() . 'ItemsDirectory'; |
|
| 202 | 202 | if (method_exists($this->getManager(), $methodName)) { |
| 203 | 203 | return $this->getManager()->$methodName(); |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - return $this->generateManagerDirectory().DIRECTORY_SEPARATOR.$this->generatePropertyDirectory(); |
|
| 206 | + return $this->generateManagerDirectory() . DIRECTORY_SEPARATOR . $this->generatePropertyDirectory(); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | /** |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | { |
| 290 | 290 | $type = $type ? $type : $this->getDefaultValue(); |
| 291 | 291 | |
| 292 | - return $this->getPropertyItemsRootNamespace().inflector()->classify($type); |
|
| 292 | + return $this->getPropertyItemsRootNamespace() . inflector()->classify($type); |
|
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | */ |
| 330 | 330 | protected function getDefaultValueFromManager() |
| 331 | 331 | { |
| 332 | - $method = 'getDefault'.$this->getName(); |
|
| 332 | + $method = 'getDefault' . $this->getName(); |
|
| 333 | 333 | if (method_exists($this->getManager(), $method)) { |
| 334 | 334 | return $this->getManager()->{$method}(); |
| 335 | 335 | } |
@@ -353,11 +353,11 @@ discard block |
||
| 353 | 353 | */ |
| 354 | 354 | protected function getPropertyItemsRootNamespace() |
| 355 | 355 | { |
| 356 | - $method = 'get'.$this->getName().'ItemsRootNamespace'; |
|
| 356 | + $method = 'get' . $this->getName() . 'ItemsRootNamespace'; |
|
| 357 | 357 | if (method_exists($this->getManager(), $method)) { |
| 358 | 358 | return $this->getManager()->{$method}(); |
| 359 | 359 | } |
| 360 | - return $this->getManager()->getModelNamespace().$this->getLabel().'\\'; |
|
| 360 | + return $this->getManager()->getModelNamespace() . $this->getLabel() . '\\'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | $items = $this->getItems(); |
| 371 | 371 | |
| 372 | 372 | foreach ($items as $type) { |
| 373 | - $method = 'get'.ucfirst($name); |
|
| 373 | + $method = 'get' . ucfirst($name); |
|
| 374 | 374 | if (method_exists($type, $method)) { |
| 375 | 375 | $return[] = $type->$method(); |
| 376 | 376 | } else { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * @param $action |
|
| 64 | + * @param string $action |
|
| 65 | 65 | * @param array $params |
| 66 | 66 | * @param null $module |
| 67 | 67 | * @return mixed |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @return mixed |
|
| 125 | + * @return string |
|
| 126 | 126 | */ |
| 127 | 127 | public function getName() |
| 128 | 128 | { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | abstract public function newQuery($type = 'select'); |
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | - * @param $query |
|
| 29 | + * @param AbstractQuery $query |
|
| 30 | 30 | * @param array $params |
| 31 | 31 | * @return RecordTrait |
| 32 | 32 | */ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | abstract public function getModelNamespace(); |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | - * @param $name |
|
| 61 | + * @param string $name |
|
| 62 | 62 | * @param array $params |
| 63 | 63 | * @return mixed |
| 64 | 64 | */ |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | protected $smartProperties = []; |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * @param $name |
|
| 27 | + * @param string $name |
|
| 28 | 28 | * @return PropertyValue |
| 29 | 29 | */ |
| 30 | 30 | public function getSmartProperty($name) |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | - * @param $name |
|
| 110 | - * @param $value |
|
| 111 | - * @return bool|void |
|
| 109 | + * @param string $name |
|
| 110 | + * @param boolean $value |
|
| 111 | + * @return null|false |
|
| 112 | 112 | */ |
| 113 | 113 | public function updateSmartProperty($name, $value) |
| 114 | 114 | { |