Passed
Push — main ( 207c72...2c3242 )
by Sammy
01:26
created
TightModel.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
             if (!is_null($probe_res = $this->get($probe_name))) {
46 46
                 $extract_model->set($column_name, $probe_res);
47
-            } elseif (!$column->is_nullable() && $ignore_nullable===false) {
47
+            } elseif (!$column->is_nullable() && $ignore_nullable === false) {
48 48
                 return null;
49 49
             }
50 50
         }
@@ -97,15 +97,15 @@  discard block
 block discarded – undo
97 97
     public function save($operator_id, $tracer = null) : ?array
98 98
     {
99 99
         try {
100
-            if (!empty($errors=$this->search_and_execute_trait_methods('before_save'))) {
100
+            if (!empty($errors = $this->search_and_execute_trait_methods('before_save'))) {
101 101
                 return $errors;
102 102
             }
103 103
 
104
-            if (!empty($errors=$this->before_save())) {
104
+            if (!empty($errors = $this->before_save())) {
105 105
                 return $errors;
106 106
             }
107 107
 
108
-            if (!empty($errors=$this->validate())) { // Model level validation
108
+            if (!empty($errors = $this->validate())) { // Model level validation
109 109
                 return $errors;
110 110
             }
111 111
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 
116 116
             if ($table_row->is_altered()) { // someting to save ?
117
-                if (!empty($persistence_errors=$table_row->persist())) { // validate and persist
117
+                if (!empty($persistence_errors = $table_row->persist())) { // validate and persist
118 118
                     $errors = [];
119 119
                     foreach ($persistence_errors as $column_name => $err) {
120 120
                         $errors[sprintf('MODEL_%s_FIELD_%s', static::model_type(), $column_name)] = $err;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     */
214 214
     public static function one($arg1, $arg2 = null)
215 215
     {
216
-        $mixed_info = is_null($arg2)? $arg1 : [$arg1=>$arg2];
216
+        $mixed_info = is_null($arg2) ? $arg1 : [$arg1=>$arg2];
217 217
 
218 218
         $unique_identifiers = get_called_class()::table()->match_uniqueness($mixed_info);
219 219
 
Please login to merge, or discard this patch.
TableToModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function get_id($mode = null)
18 18
     {
19 19
         $primary_key = static::table()->auto_incremented_primary_key();
20
-        if (is_null($primary_key) && count($pks = static::table()->primary_keys())==1) {
20
+        if (is_null($primary_key) && count($pks = static::table()->primary_keys()) == 1) {
21 21
             $primary_key = current($pks);
22 22
         }
23 23
 
Please login to merge, or discard this patch.