@@ -57,7 +57,7 @@ |
||
| 57 | 57 | /** |
| 58 | 58 | * Return a new dispatcher containing the given element. |
| 59 | 59 | * |
| 60 | - * @param mixed $element |
|
| 60 | + * @param MiddlewareInterface $element |
|
| 61 | 61 | * @return DispatcherInterface |
| 62 | 62 | */ |
| 63 | 63 | public function withElement($element): DispatcherInterface |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | 74 | * @param $lang |
| 75 | - * @return mixed|string |
|
| 75 | + * @return string |
|
| 76 | 76 | */ |
| 77 | 77 | public function changeLangURL($lang) |
| 78 | 78 | {
|
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | /** |
| 169 | - * @param $lang |
|
| 170 | - * @return mixed|string |
|
| 169 | + * @param string $lang |
|
| 170 | + * @return string |
|
| 171 | 171 | */ |
| 172 | 172 | public function getLanguageCode($lang) |
| 173 | 173 | {
|
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | /** |
| 182 | 182 | * gets the default language to be used when translating |
| 183 | - * @return string $language |
|
| 183 | + * @return boolean $language |
|
| 184 | 184 | */ |
| 185 | 185 | public function getDefaultLanguage() |
| 186 | 186 | {
|
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * |
| 242 | 242 | * @param bool|string $slug |
| 243 | 243 | * @param bool|string $language |
| 244 | - * @return string |
|
| 244 | + * @return boolean |
|
| 245 | 245 | */ |
| 246 | 246 | public function hasTranslation($slug = false, $language = false) |
| 247 | 247 | {
|
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | - * @param $directory |
|
| 165 | + * @param string $directory |
|
| 166 | 166 | */ |
| 167 | 167 | public function setCachePath($directory) |
| 168 | 168 | { |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | |
| 374 | 374 | /** |
| 375 | 375 | * @param $word |
| 376 | - * @return mixed |
|
| 376 | + * @return string |
|
| 377 | 377 | */ |
| 378 | 378 | protected function doCamelize($word) |
| 379 | 379 | { |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | |
| 383 | 383 | /** |
| 384 | 384 | * @param $word |
| 385 | - * @return mixed |
|
| 385 | + * @return string |
|
| 386 | 386 | */ |
| 387 | 387 | protected function doHyphenize($word) |
| 388 | 388 | { |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | |
| 418 | 418 | /** |
| 419 | 419 | * @param $word |
| 420 | - * @return mixed |
|
| 420 | + * @return string |
|
| 421 | 421 | */ |
| 422 | 422 | public function pluralize($word) |
| 423 | 423 | { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | - * @param array $path |
|
| 46 | + * @param string[] $path |
|
| 47 | 47 | * @param bool $locale |
| 48 | 48 | * @return bool|mixed |
| 49 | 49 | */ |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * @param $locale |
|
| 93 | + * @param string $locale |
|
| 94 | 94 | */ |
| 95 | 95 | public function setCurrent($locale) |
| 96 | 96 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * @param bool $url |
| 54 | - * @return mixed |
|
| 54 | + * @return string |
|
| 55 | 55 | */ |
| 56 | 56 | public function getURL($url = false) |
| 57 | 57 | {
|
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * Compile path for this section from a given path of current section |
| 69 | 69 | * |
| 70 | 70 | * @param bool $path |
| 71 | - * @return bool|mixed |
|
| 71 | + * @return string |
|
| 72 | 72 | */ |
| 73 | 73 | public function compilePath($path = false) |
| 74 | 74 | {
|
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
| 123 | - * @return mixed |
|
| 123 | + * @return string |
|
| 124 | 124 | */ |
| 125 | 125 | public function getName() |
| 126 | 126 | {
|
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * |
| 34 | 34 | * @param string $name |
| 35 | 35 | * @param array $arguments |
| 36 | - * @return mixed |
|
| 36 | + * @return \Nip\Helpers\AbstractHelper|null |
|
| 37 | 37 | */ |
| 38 | 38 | public function __call($name, $arguments) |
| 39 | 39 | {
|
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * @param $name |
|
| 49 | + * @param string $name |
|
| 50 | 50 | * @return \Nip\Helpers\AbstractHelper |
| 51 | 51 | */ |
| 52 | 52 | public function getHelper($name) |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * @return null |
|
| 132 | + * @return string |
|
| 133 | 133 | */ |
| 134 | 134 | public function getManagerName() |
| 135 | 135 | {
|
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | /** |
| 165 | 165 | * @param string $class |
| 166 | - * @return mixed |
|
| 166 | + * @return RecordManager |
|
| 167 | 167 | * @throws Exception |
| 168 | 168 | */ |
| 169 | 169 | protected function getManagerInstance($class) |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | /** |
| 304 | 304 | * Clone the relations records from a sibling |
| 305 | 305 | * @param self $from |
| 306 | - * @return self |
|
| 306 | + * @return \Nip\Records\Traits\Relations\HasRelationsRecordTrait |
|
| 307 | 307 | */ |
| 308 | 308 | public function cloneRelations($from) |
| 309 | 309 | {
|
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * @param $name |
|
| 91 | + * @param string $name |
|
| 92 | 92 | * @param $arguments |
| 93 | 93 | * @return bool |
| 94 | 94 | */ |
@@ -106,10 +106,10 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | - * @param $action |
|
| 109 | + * @param string $action |
|
| 110 | 110 | * @param array $params |
| 111 | 111 | * @param null $module |
| 112 | - * @return mixed |
|
| 112 | + * @return string|null |
|
| 113 | 113 | */ |
| 114 | 114 | public function compileURL($action, $params = [], $module = null) |
| 115 | 115 | {
|
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | /** |
| 245 | - * @param $name |
|
| 246 | - * @return mixed |
|
| 245 | + * @param string $name |
|
| 246 | + * @return \Nip\Helpers\AbstractHelper |
|
| 247 | 247 | */ |
| 248 | 248 | public function getHelper($name) |
| 249 | 249 | {
|
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | /** |
| 435 | - * @param null $class |
|
| 435 | + * @param string $class |
|
| 436 | 436 | * @return string |
| 437 | 437 | */ |
| 438 | 438 | public function generateModelClass($class = null) |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | * Finds Records using params array |
| 549 | 549 | * |
| 550 | 550 | * @param array $params |
| 551 | - * @return mixed |
|
| 551 | + * @return RecordCollection |
|
| 552 | 552 | */ |
| 553 | 553 | public function findByParams($params = []) |
| 554 | 554 | {
|
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | /** |
| 581 | 581 | * @param int $count |
| 582 | - * @return mixed |
|
| 582 | + * @return RecordCollection |
|
| 583 | 583 | */ |
| 584 | 584 | public function findLast($count = 9) |
| 585 | 585 | {
|
@@ -592,7 +592,7 @@ discard block |
||
| 592 | 592 | * Inserts a Record into the database |
| 593 | 593 | * @param Record $model |
| 594 | 594 | * @param array|bool $onDuplicate |
| 595 | - * @return mixed |
|
| 595 | + * @return integer |
|
| 596 | 596 | */ |
| 597 | 597 | public function insert($model, $onDuplicate = false) |
| 598 | 598 | {
|
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | /** |
| 606 | - * @param $model |
|
| 606 | + * @param Record $model |
|
| 607 | 607 | * @param $onDuplicate |
| 608 | 608 | * @return InsertQuery |
| 609 | 609 | */ |
@@ -658,7 +658,7 @@ discard block |
||
| 658 | 658 | } |
| 659 | 659 | |
| 660 | 660 | /** |
| 661 | - * @param null $foreignKey |
|
| 661 | + * @param string $foreignKey |
|
| 662 | 662 | */ |
| 663 | 663 | public function setForeignKey($foreignKey) |
| 664 | 664 | {
|
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $class = ucfirst(inflector()->singularize($class)); |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | - return implode($nsParts, '\\').'\\'.$class; |
|
| 452 | + return implode($nsParts, '\\') . '\\' . $class; |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | return ucfirst(inflector()->singularize($class)); |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | foreach ($fields as $field) {
|
| 487 | - $params['where'][$field.'-UNQ'] = ["$field = ?", $item->{$field}];
|
|
| 487 | + $params['where'][$field . '-UNQ'] = ["$field = ?", $item->{$field}];
|
|
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | $pk = $this->getPrimaryKey(); |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | {
|
| 673 | 673 | $singularize = inflector()->singularize($this->getController()); |
| 674 | 674 | |
| 675 | - return $this->getPrimaryKey()."_".inflector()->underscore($singularize); |
|
| 675 | + return $this->getPrimaryKey() . "_" . inflector()->underscore($singularize); |
|
| 676 | 676 | } |
| 677 | 677 | |
| 678 | 678 | /** |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | protected $_item; |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | - * @param Relation|HasCollectionResults $relation |
|
| 24 | + * @param HasCollectionResults $relation |
|
| 25 | 25 | */ |
| 26 | 26 | public function initFromRelation($relation) |
| 27 | 27 | {
|
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * @return null|RecordManager|RecordsTrait |
|
| 143 | + * @return null|RecordManager |
|
| 144 | 144 | */ |
| 145 | 145 | public function getRecordManager() |
| 146 | 146 | { |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * @param RecordManager|RecordsTrait $recordManager |
|
| 151 | + * @param RecordsTrait $recordManager |
|
| 152 | 152 | */ |
| 153 | 153 | public function setRecordManager($recordManager) |
| 154 | 154 | { |