@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public static function prefixSessionData() |
| 32 | 32 | { |
| 33 | - return function () { |
|
| 33 | + return function() { |
|
| 34 | 34 | $request = Craft::$app->getRequest(); |
| 35 | 35 | $ip = $request instanceof Request ? $request->getUserIP() : '-'; |
| 36 | 36 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | /** |
| 154 | 154 | * Identify whether in cached by string |
| 155 | 155 | * |
| 156 | - * @param $string |
|
| 156 | + * @param string $string |
|
| 157 | 157 | * @param int|null $siteId |
| 158 | 158 | * @return bool |
| 159 | 159 | */ |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | *******************************************/ |
| 210 | 210 | |
| 211 | 211 | /** |
| 212 | - * @param null $string |
|
| 212 | + * @param string $string |
|
| 213 | 213 | * @throws ElementNotFoundException |
| 214 | 214 | */ |
| 215 | 215 | protected function notFoundByStringException($string = null) |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | abstract protected function findByRecord(Record $record, string $toScenario = null): BaseModel; |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @param array $config |
|
| 42 | + * @param RecordWithId $config |
|
| 43 | 43 | * @param string|null $toScenario |
| 44 | 44 | * @return BaseModel|ModelWithId |
| 45 | 45 | */ |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * @param int $id |
| 54 | 54 | * @param string|null $toScenario |
| 55 | - * @return ModelWithId|null |
|
| 55 | + * @return null|BaseModel |
|
| 56 | 56 | */ |
| 57 | 57 | public function findById(int $id, string $toScenario = null) |
| 58 | 58 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * @param int $id |
| 103 | 103 | * @param string|null $toScenario |
| 104 | - * @return ModelWithId|null |
|
| 104 | + * @return null|BaseModel |
|
| 105 | 105 | */ |
| 106 | 106 | public function freshFindById(int $id, string $toScenario = null) |
| 107 | 107 | { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | abstract protected function findByRecord(Record $record, string $toScenario = null): BaseModel; |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * @param array $config |
|
| 43 | + * @param Record $config |
|
| 44 | 44 | * @param string|null $toScenario |
| 45 | 45 | * @return BaseModel |
| 46 | 46 | */ |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | public function findRecordByModel(BaseModel $model) |
| 101 | 101 | { |
| 102 | 102 | |
| 103 | - if($record = parent::findRecordByModel($model)) { |
|
| 103 | + if ($record = parent::findRecordByModel($model)) { |
|
| 104 | 104 | return $record; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | public function findRecordByModel(BaseModel $model) |
| 101 | 101 | { |
| 102 | 102 | |
| 103 | - if($record = parent::findRecordByModel($model)) { |
|
| 103 | + if ($record = parent::findRecordByModel($model)) { |
|
| 104 | 104 | return $record; |
| 105 | 105 | } |
| 106 | 106 | |