@@ -137,7 +137,7 @@ |
||
137 | 137 | |
138 | 138 | /** |
139 | 139 | * @deprecated |
140 | - * @param $condition |
|
140 | + * @param string $condition |
|
141 | 141 | * @param string $scenario |
142 | 142 | * @return RecordInterface|null |
143 | 143 | */ |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | $query = $recordClass::find(); |
67 | 67 | |
68 | - if($criteria) { |
|
68 | + if ($criteria) { |
|
69 | 69 | |
70 | 70 | QueryHelper::configure( |
71 | 71 | $query, |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | // Do we need to set properties too |
124 | 124 | if ($properties) { |
125 | 125 | |
126 | - if(!is_array($properties)) { |
|
126 | + if (!is_array($properties)) { |
|
127 | 127 | $properties = ArrayHelper::toArray($properties, [], false); |
128 | 128 | } |
129 | 129 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** |
30 | 30 | * prefixSessionData. |
31 | 31 | * |
32 | - * @return callable |
|
32 | + * @return \Closure |
|
33 | 33 | */ |
34 | 34 | public static function prefixSessionData() |
35 | 35 | { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public static function prefixSessionData() |
35 | 35 | { |
36 | - return function ($message) { |
|
36 | + return function($message) { |
|
37 | 37 | $request = Craft::$app->getRequest(); |
38 | 38 | $ip = $request instanceof Request ? $request->getUserIP() : '-'; |
39 | 39 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * Create a new object |
49 | 49 | * |
50 | 50 | * @param $config |
51 | - * @param null $instanceOf |
|
51 | + * @param string $instanceOf |
|
52 | 52 | * @return ObjectInterface |
53 | 53 | * @throws InvalidConfigurationException |
54 | 54 | */ |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $object = new $class(); |
63 | 63 | |
64 | 64 | // Populate |
65 | - if($config) { |
|
65 | + if ($config) { |
|
66 | 66 | static::populate($object, $config); |
67 | 67 | } |
68 | 68 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | *******************************************/ |
126 | 126 | |
127 | 127 | /** |
128 | - * @param array $config |
|
128 | + * @param \flipbox\spark\records\Interfaces\RecordInterface $config |
|
129 | 129 | * @param string $scenario |
130 | 130 | * @return ModelInterface |
131 | 131 | */ |
@@ -68,7 +68,7 @@ |
||
68 | 68 | *******************************************/ |
69 | 69 | |
70 | 70 | /** |
71 | - * @param array $config |
|
71 | + * @param \flipbox\spark\records\Interfaces\RecordInterface $config |
|
72 | 72 | * @return ObjectInterface |
73 | 73 | */ |
74 | 74 | public function create($config = []) |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use flipbox\spark\exceptions\InvalidRecordException; |
16 | 16 | use flipbox\spark\exceptions\RecordNotFoundException; |
17 | 17 | use flipbox\spark\helpers\ArrayHelper; |
18 | -use flipbox\spark\helpers\RecordHelper; |
|
19 | 18 | use flipbox\spark\Records\interfaces\RecordInterface; |
20 | 19 | use yii\base\Component as BaseComponent; |
21 | 20 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
49 | - * @param array $config |
|
49 | + * @param \flipbox\spark\records\Interfaces\RecordWithHandleInterface $config |
|
50 | 50 | * @param string $scenario |
51 | 51 | * @return ModelWithHandleInterface |
52 | 52 | */ |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | public abstract function findByRecord(RecordInterface $record, $scenario = ModelHelper::SCENARIO_SAVE); |
47 | 47 | |
48 | 48 | /** |
49 | - * @param array $config |
|
49 | + * @param \flipbox\spark\records\Interfaces\RecordWithIdInterface $config |
|
50 | 50 | * @param string $scenario |
51 | 51 | * @return ModelWithIdInterface |
52 | 52 | */ |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | /** |
122 | 122 | * @param $id |
123 | 123 | * @param string $scenario |
124 | - * @return ModelWithIdInterface|null |
|
124 | + * @return null|ModelInterface |
|
125 | 125 | */ |
126 | 126 | public function findById($id, $scenario = ModelHelper::SCENARIO_SAVE) |
127 | 127 | { |
@@ -28,13 +28,13 @@ |
||
28 | 28 | *******************************************/ |
29 | 29 | |
30 | 30 | /** |
31 | - * @param array $config |
|
31 | + * @param ModelWithIdInterface $config |
|
32 | 32 | * @return ModelEvent |
33 | 33 | */ |
34 | 34 | abstract protected function createEvent($config = []); |
35 | 35 | |
36 | 36 | /** |
37 | - * @param $condition |
|
37 | + * @param string $condition |
|
38 | 38 | * @param string $scenario |
39 | 39 | * @return RecordWithIdInterface |
40 | 40 | */ |