@@ -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 | */ |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @param Model $model |
| 81 | - * @return Model|null|Response |
|
| 81 | + * @return Model|null |
|
| 82 | 82 | */ |
| 83 | 83 | protected function handleModel(Model $model) |
| 84 | 84 | { |
@@ -10,11 +10,11 @@ |
||
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | 12 | use craft\helpers\ArrayHelper; |
| 13 | +use craft\web\Controller; |
|
| 13 | 14 | use flipbox\guardian\views\ViewInterface; |
| 14 | 15 | use yii\base\ActionFilter; |
| 15 | 16 | use yii\base\Exception; |
| 16 | 17 | use yii\base\Model; |
| 17 | -use craft\web\Controller; |
|
| 18 | 18 | use yii\web\Response; |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -9,10 +9,10 @@ |
||
| 9 | 9 | namespace flipbox\spark\filters; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | +use flipbox\spark\helpers\ControllerHelper; |
|
| 12 | 13 | use yii\base\ActionFilter; |
| 13 | 14 | use yii\web\Controller; |
| 14 | 15 | use yii\web\Response; |
| 15 | -use flipbox\spark\helpers\ControllerHelper; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @author Flipbox Factory <[email protected]> |
@@ -9,10 +9,10 @@ |
||
| 9 | 9 | namespace flipbox\spark\services; |
| 10 | 10 | |
| 11 | 11 | use craft\helpers\Json as JsonHelper; |
| 12 | +use flipbox\spark\Records\Record; |
|
| 12 | 13 | use flipbox\spark\exceptions\ObjectNotFoundException; |
| 13 | 14 | use flipbox\spark\helpers\ArrayHelper; |
| 14 | 15 | use flipbox\spark\helpers\ObjectHelper; |
| 15 | -use flipbox\spark\Records\Record; |
|
| 16 | 16 | use yii\base\Component; |
| 17 | 17 | use yii\base\InvalidConfigException; |
| 18 | 18 | use yii\base\Object as BaseObject; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | public function init() |
| 36 | 36 | { |
| 37 | 37 | $this->js = [ |
| 38 | - 'Actions'.$this->dotJs() |
|
| 38 | + 'Actions' . $this->dotJs() |
|
| 39 | 39 | ]; |
| 40 | 40 | |
| 41 | 41 | parent::init(); |