@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public abstract function findByRecord(RecordInterface $record); |
45 | 45 | |
46 | 46 | /** |
47 | - * @param array $config |
|
47 | + * @param \flipbox\spark\records\Interfaces\RecordWithIdInterface $config |
|
48 | 48 | * @return ObjectInterface |
49 | 49 | */ |
50 | 50 | public abstract function create($config = []); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * @param $handle |
58 | - * @return ModelWithIdInterface|null |
|
58 | + * @return \flipbox\spark\objects\Interfaces\ObjectInterface|null |
|
59 | 59 | */ |
60 | 60 | public function freshFindByHandle($handle) |
61 | 61 | { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | /** |
81 | 81 | * @param $handle |
82 | - * @return ModelWithIdInterface|null |
|
82 | + * @return null|\flipbox\spark\objects\Interfaces\ObjectInterface |
|
83 | 83 | * @throws ObjectNotFoundException |
84 | 84 | */ |
85 | 85 | public function freshGetByHandle($handle) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | /** |
104 | 104 | * @param $handle |
105 | - * @return ModelWithIdInterface|null |
|
105 | + * @return \flipbox\spark\objects\Interfaces\ObjectInterface|null |
|
106 | 106 | */ |
107 | 107 | public function findByHandle($handle) |
108 | 108 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | /** |
143 | 143 | * @param $handle |
144 | - * @return ModelWithIdInterface|null |
|
144 | + * @return null|\flipbox\spark\objects\Interfaces\ObjectInterface |
|
145 | 145 | * @throws ObjectNotFoundException |
146 | 146 | */ |
147 | 147 | public function getByHandle($handle) |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public abstract function findByRecord(RecordInterface $record); |
45 | 45 | |
46 | 46 | /** |
47 | - * @param array $config |
|
47 | + * @param \flipbox\spark\records\Interfaces\RecordWithIdInterface $config |
|
48 | 48 | * @return ObjectInterface |
49 | 49 | */ |
50 | 50 | public abstract function create($config = []); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | /** |
57 | 57 | * @param $id |
58 | - * @return ModelWithIdInterface|null |
|
58 | + * @return \flipbox\spark\objects\Interfaces\ObjectInterface|null |
|
59 | 59 | */ |
60 | 60 | public function freshFindById($id) |
61 | 61 | { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | /** |
81 | 81 | * @param $id |
82 | - * @return ModelWithIdInterface|null |
|
82 | + * @return null|\flipbox\spark\objects\Interfaces\ObjectInterface |
|
83 | 83 | * @throws ObjectNotFoundException |
84 | 84 | */ |
85 | 85 | public function freshGetById($id) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | /** |
104 | 104 | * @param $id |
105 | - * @return ModelWithIdInterface|null |
|
105 | + * @return \flipbox\spark\objects\Interfaces\ObjectInterface|null |
|
106 | 106 | */ |
107 | 107 | public function findById($id) |
108 | 108 | { |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | /** |
143 | 143 | * @param $id |
144 | - * @return ModelWithIdInterface|null |
|
144 | + * @return null|\flipbox\spark\objects\Interfaces\ObjectInterface |
|
145 | 145 | * @throws ObjectNotFoundException |
146 | 146 | */ |
147 | 147 | public function getById($id) |
@@ -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 |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * prefixSessionData. |
31 | 31 | * |
32 | - * @return callable |
|
32 | + * @return \Closure |
|
33 | 33 | */ |
34 | 34 | public static function prefixSessionData() |
35 | 35 | { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * @param Module $module |
72 | 72 | * @param array $config |
73 | 73 | * |
74 | - * @return array |
|
74 | + * @return callable |
|
75 | 75 | */ |
76 | 76 | public static function getDispatchDefinition(Module $module, array $config = []) |
77 | 77 | { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public static function resolveSiteId(int $siteId = null): int |
24 | 24 | { |
25 | 25 | |
26 | - if(is_null($siteId)) { |
|
26 | + if (is_null($siteId)) { |
|
27 | 27 | |
28 | 28 | $siteId = Craft::$app->getSites()->currentSite->id; |
29 | 29 |
@@ -25,12 +25,12 @@ |
||
25 | 25 | { |
26 | 26 | |
27 | 27 | // No bueno |
28 | - if(empty($config)) { |
|
28 | + if (empty($config)) { |
|
29 | 29 | return $query; |
30 | 30 | } |
31 | 31 | |
32 | 32 | // Force array |
33 | - if(!is_array($config)) { |
|
33 | + if (!is_array($config)) { |
|
34 | 34 | $config = ArrayHelper::toArray($config, [], false); |
35 | 35 | } |
36 | 36 |
@@ -106,7 +106,7 @@ |
||
106 | 106 | public static function conditionToCriteria($condition) |
107 | 107 | { |
108 | 108 | |
109 | - if(empty($condition)){ |
|
109 | + if (empty($condition)) { |
|
110 | 110 | return $condition; |
111 | 111 | } |
112 | 112 |
@@ -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 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * @param $model |
|
72 | + * @param ModelInterface $model |
|
73 | 73 | * @return ModelInterface |
74 | 74 | */ |
75 | 75 | public static function copy($model) |
@@ -34,7 +34,7 @@ |
||
34 | 34 | /** |
35 | 35 | * @param $identifier |
36 | 36 | * @param string $scenario |
37 | - * @return ModelWithHandleInterface|null |
|
37 | + * @return null|ModelInterface |
|
38 | 38 | */ |
39 | 39 | public function find($identifier, $scenario = ModelHelper::SCENARIO_SAVE) |
40 | 40 | { |