Passed
Push — develop ( 2e13c6...4720f2 )
by Henry
03:10
created
src/Models/ActiveRecord.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@
 block discarded – undo
84 84
     
85 85
     
86 86
     /**
87
-    * @var array $validators Validation checks
88
-    */
87
+     * @var array $validators Validation checks
88
+     */
89 89
     public static $validators = [];
90 90
 
91 91
     /**
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
 
728 728
             // create new or update existing
729 729
             if ($this->_isPhantom) {
730
-                DB::nonQuery((new Insert())->setTable(static::$tableName)->set($set), null, [static::class,'handleException']);
730
+                DB::nonQuery((new Insert())->setTable(static::$tableName)->set($set), null, [static::class, 'handleException']);
731 731
                 $primaryKey = $this->getPrimaryKey();
732 732
                 $insertID = DB::insertID();
733 733
                 $fields = static::getClassFields();
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
             } elseif (count($set)) {
742 742
                 DB::nonQuery((new Update())->setTable(static::$tableName)->set($set)->where(
743 743
                     sprintf('`%s` = %u', static::_cn($this->getPrimaryKey()), $this->getPrimaryKeyValue())
744
-                ), null, [static::class,'handleException']);
744
+                ), null, [static::class, 'handleException']);
745 745
 
746 746
                 $this->_isUpdated = true;
747 747
             }
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
                 $recordValues = $this->_prepareRecordValues();
774 774
                 $set = static::_mapValuesToSet($recordValues);
775 775
 
776
-                DB::nonQuery((new Insert())->setTable(static::getHistoryTable())->set($set), null, [static::class,'handleException']);
776
+                DB::nonQuery((new Insert())->setTable(static::getHistoryTable())->set($set), null, [static::class, 'handleException']);
777 777
             }
778 778
         }
779 779
 
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
      */
789 789
     public static function delete($id): bool
790 790
     {
791
-        DB::nonQuery((new Delete())->setTable(static::$tableName)->where(sprintf('`%s` = %u', static::_cn(static::$primaryKey ? static::$primaryKey : 'ID'), $id)), null, [static::class,'handleException']);
791
+        DB::nonQuery((new Delete())->setTable(static::$tableName)->where(sprintf('`%s` = %u', static::_cn(static::$primaryKey ? static::$primaryKey : 'ID'), $id)), null, [static::class, 'handleException']);
792 792
 
793 793
         return DB::affectedRows() > 0;
794 794
     }
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
     {
842 842
         static::init();
843 843
         if (!static::fieldExists($field)) {
844
-            throw new Exception('getColumnName called on nonexisting column: ' . get_called_class().'->'.$field);
844
+            throw new Exception('getColumnName called on nonexisting column: '.get_called_class().'->'.$field);
845 845
         }
846 846
 
847 847
         return static::$_classFields[get_called_class()][$field]['columnName'];
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
             // clear buffer (required for the next query to work without running fetchAll first
1009 1009
             $Statement->closeCursor();
1010 1010
 
1011
-            return $Connection->query((string)$query); // now the query should finish with no error
1011
+            return $Connection->query((string) $query); // now the query should finish with no error
1012 1012
         } else {
1013 1013
             return DB::handleException($e, $query, $queryLog);
1014 1014
         }
@@ -1107,8 +1107,8 @@  discard block
 block discarded – undo
1107 1107
 
1108 1108
                     // skip these because they are built in
1109 1109
                     if (in_array($property->getName(), [
1110
-                        '_classFields','_classRelationships','_classBeforeSave','_classAfterSave','_fieldsDefined','_relationshipsDefined','_eventsDefined','_record','_validator'
1111
-                        ,'_validationErrors','_isDirty','_isValid','fieldSetMapper','_convertedValues','_originalValues','_isPhantom','_wasPhantom','_isNew','_isUpdated','_relatedObjects'
1110
+                        '_classFields', '_classRelationships', '_classBeforeSave', '_classAfterSave', '_fieldsDefined', '_relationshipsDefined', '_eventsDefined', '_record', '_validator'
1111
+                        ,'_validationErrors', '_isDirty', '_isValid', 'fieldSetMapper', '_convertedValues', '_originalValues', '_isPhantom', '_wasPhantom', '_isNew', '_isUpdated', '_relatedObjects'
1112 1112
                     ])) {
1113 1113
                         continue;
1114 1114
                     }
@@ -1302,7 +1302,7 @@  discard block
 block discarded – undo
1302 1302
                 case 'boolean':
1303 1303
                     {
1304 1304
                         if (!isset($this->_convertedValues[$field])) {
1305
-                            $this->_convertedValues[$field] = (bool)$value;
1305
+                            $this->_convertedValues[$field] = (bool) $value;
1306 1306
                         }
1307 1307
 
1308 1308
                         return $this->_convertedValues[$field];
@@ -1538,7 +1538,7 @@  discard block
 block discarded – undo
1538 1538
             foreach ($order as $key => $value) {
1539 1539
                 if (is_string($key)) {
1540 1540
                     $columnName = static::_cn($key);
1541
-                    $direction = strtoupper($value)=='DESC' ? 'DESC' : 'ASC';
1541
+                    $direction = strtoupper($value) == 'DESC' ? 'DESC' : 'ASC';
1542 1542
                 } else {
1543 1543
                     $columnName = static::_cn($value);
1544 1544
                     $direction = 'ASC';
Please login to merge, or discard this patch.
src/Models/Auth/Session.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             $Session->setFields($sessionData);
114 114
             if (function_exists('fastcgi_finish_request')) {
115 115
                 // @codeCoverageIgnoreStart
116
-                register_shutdown_function(function ($Session) {
116
+                register_shutdown_function(function($Session) {
117 117
                     $Session->save();
118 118
                 }, $Session);
119 119
             // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.