Passed
Push — master ( 36ec95...f2dea1 )
by Nate
07:31
created
src/services/ModelByHandle.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@
 block discarded – undo
186 186
      * Find an existing cache by handle
187 187
      *
188 188
      * @param string $handle
189
-     * @return null
189
+     * @return null|ModelWithHandle
190 190
      */
191 191
     public function findCacheByHandle(string $handle)
192 192
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
     public function find($identifier, string $toScenario = null)
44 44
     {
45 45
 
46
-        if($model = parent::find($identifier, $toScenario)) {
46
+        if ($model = parent::find($identifier, $toScenario)) {
47 47
             return $model;
48 48
         }
49 49
 
50
-        if(!is_string($identifier)) {
50
+        if (!is_string($identifier)) {
51 51
             return null;
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/helpers/LoggingHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/services/Model.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      *******************************************/
63 63
 
64 64
     /**
65
-     * @param array $config
65
+     * @param Record $config
66 66
      * @param string|null $toScenario
67 67
      * @throws InvalidConfigException
68 68
      * @return BaseModel
Please login to merge, or discard this patch.
src/services/traits/ModelTrait.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -8,13 +8,8 @@
 block discarded – undo
8 8
 
9 9
 namespace flipbox\spark\services\traits;
10 10
 
11
-use Craft;
12
-use flipbox\spark\exceptions\RecordNotFoundException;
13
-use flipbox\spark\helpers\QueryHelper;
14
-use flipbox\spark\helpers\RecordHelper;
15 11
 use flipbox\spark\models\Model;
16 12
 use flipbox\spark\records\Record;
17
-use yii\db\ActiveQuery;
18 13
 
19 14
 /**
20 15
  * @package flipbox\spark\services\traits
Please login to merge, or discard this patch.
src/services/traits/ObjectTrait.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use flipbox\spark\exceptions\RecordNotFoundException;
13 13
 use flipbox\spark\helpers\QueryHelper;
14 14
 use flipbox\spark\helpers\RecordHelper;
15
-use flipbox\spark\models\Model;
16 15
 use flipbox\spark\records\Record;
17 16
 use yii\db\ActiveQuery;
18 17
 
Please login to merge, or discard this patch.
src/services/traits/ModelSave.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $isNew = (null === $model->id);
59 59
 
60 60
         // a 'beforeSave' event
61
-        if(!$this->beforeSave($model, $isNew)) {
61
+        if (!$this->beforeSave($model, $isNew)) {
62 62
             return false;
63 63
         }
64 64
 
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 
160 160
         Craft::info(sprintf(
161 161
             "Model '%s' with ID '%s' was saved successfully.",
162
-            (string) get_class($model),
163
-            (string) $model->id
162
+            (string)get_class($model),
163
+            (string)$model->id
164 164
         ), __METHOD__);
165 165
 
166 166
     }
Please login to merge, or discard this patch.
src/services/traits/ModelDelete.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
 
49 49
         // a 'beforeSave' event
50
-        if(!$this->beforeDelete($model)) {
50
+        if (!$this->beforeDelete($model)) {
51 51
             return false;
52 52
         }
53 53
 
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 
129 129
         Craft::info(sprintf(
130 130
             "Model '%s' with ID '%s' was deleted successfully.",
131
-            (string) get_class($model),
132
-            (string) $model->id
131
+            (string)get_class($model),
132
+            (string)$model->id
133 133
         ), __METHOD__);
134 134
 
135 135
     }
Please login to merge, or discard this patch.