Passed
Push — main ( f3a02f...f6abf4 )
by Sammy
02:15
created
TightModel.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@
 block discarded – undo
266 266
 
267 267
         if ($Query->is_success()) {
268 268
             foreach ($Query->ret_obj(get_called_class()) as $rec) {
269
-                  $ret[$rec->get($pk_name)] = $rec;
269
+                    $ret[$rec->get($pk_name)] = $rec;
270 270
             }
271 271
         }
272 272
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function __toString()
16 16
     {
17
-        return static::class_short_name() . ' #' . $this->get_id();
17
+        return static::class_short_name().' #'.$this->get_id();
18 18
     }
19 19
 
20 20
     // public function traceable(): bool
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $extraction_table = $extraction_class::table();
40 40
         foreach ($extraction_table->columns() as $column_name => $column) {
41
-            $probe_name = $extraction_class::table_alias() . '_' . $column_name;
41
+            $probe_name = $extraction_class::table_alias().'_'.$column_name;
42 42
 
43 43
             if (!is_null($probe_res = $this->get($probe_name))) {
44 44
                 $extract_model->set($column_name, $probe_res);
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         $ret = [];
245 245
         $pk_name = implode('_', array_keys($Query->table()->primary_keys()));
246 246
 
247
-        if (count($pks = $Query->table()->primary_keys()) > 1) {
247
+        if (count($pks = $Query->table()->primary_keys())>1) {
248 248
             $concat_pk = sprintf('CONCAT(%s) as %s', implode(',', $pks), $pk_name);
249 249
             $Query->select_also([$concat_pk]);
250 250
         }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      */
285 285
     public static function table_alias(): string
286 286
     {
287
-        return defined(get_called_class() . '::TABLE_ALIAS') ? static::TABLE_ALIAS : static::model_type();
287
+        return defined(get_called_class().'::TABLE_ALIAS') ? static::TABLE_ALIAS : static::model_type();
288 288
     }
289 289
 
290 290
     public static function class_short_name()
Please login to merge, or discard this patch.
TightModelSelector.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,9 +96,9 @@
 block discarded – undo
96 96
         if (!empty($date_stop)) {
97 97
             $this->statement()->aw_lte($this->model()->event_field(), $date_stop, $this->statement()->table_label(), ':filter_date_stop');
98 98
         }
99
-      //
100
-      // if(empty($options['order_by']))
101
-      //   $this->statement()->order_by([$this->model()->event_field(), 'DESC']);
99
+        //
100
+        // if(empty($options['order_by']))
101
+        //   $this->statement()->order_by([$this->model()->event_field(), 'DESC']);
102 102
     }
103 103
 
104 104
     public function filter_with_ids($ids)
Please login to merge, or discard this patch.
TableModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function import($assoc_data)
42 42
     {
43 43
         if (!is_array($assoc_data)) {
44
-            throw new \Exception(__FUNCTION__ . '(assoc_data) parm is not an array');
44
+            throw new \Exception(__FUNCTION__.'(assoc_data) parm is not an array');
45 45
         }
46 46
 
47 47
         // shove it all up in model, god will sort them out
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         if ($table_name === false) {
70 70
             $calling_class = $reflect->getShortName();
71
-            if (defined($const_name = 'TABLE_' . strtoupper($calling_class))) {
71
+            if (defined($const_name = 'TABLE_'.strtoupper($calling_class))) {
72 72
                 $table_name = constant($const_name);
73 73
             } else {
74 74
                 $table_name = strtolower($calling_class);
Please login to merge, or discard this patch.
RelationManyToMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public static function otm($k = null)
68 68
     {
69 69
         $type = static::model_type();
70
-        $d = ['t' => $type . 's_models', 'k' => $type . '_id', 'a' => $type . 's_otm'];
70
+        $d = ['t' => $type.'s_models', 'k' => $type.'_id', 'a' => $type.'s_otm'];
71 71
         return is_null($k) ? $d : $d[$k];
72 72
     }
73 73
 }
Please login to merge, or discard this patch.