Completed
Branch master (b2c48e)
by
unknown
15:28
created
src/Models/Model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->setConnection($connection);
59 59
         $this->setTable($table);
60 60
 
61
-        if (! empty($array)) {
61
+        if (!empty($array)) {
62 62
             $this->setProperties($array);
63 63
         }
64 64
     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function __set($property, $value)
89 89
     {
90
-        if (! is_scalar($value)) {
90
+        if (!is_scalar($value)) {
91 91
             throw new AssignmentException("Only scalar values can be assigned to the {$property} property.");
92 92
         }
93 93
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public static function destroy($number)
109 109
     {
110
-        if (! is_int($number)) {
110
+        if (!is_int($number)) {
111 111
             throw new InvalidArgumentException("The parameter {$number} is not an integer. An integer is required instead.");
112 112
         }
113 113
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public static function find($number)
129 129
     {
130
-        if (! is_int($number)) {
130
+        if (!is_int($number)) {
131 131
             throw new InvalidArgumentException("The parameter {$number} is not an integer. An integer is required instead.");
132 132
         }
133 133
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $hasAttributes = false;
174 174
 
175 175
         foreach ($this->_attributes as $key => $value) {
176
-            if (! is_null($value)) {
176
+            if (!is_null($value)) {
177 177
                 $hasAttributes = true;
178 178
             }
179 179
         }
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function save()
190 190
     {
191
-        if (! $this->hasAttributes()) {
191
+        if (!$this->hasAttributes()) {
192 192
             throw new RuntimeException(get_class($this).' model has nothing to persist to the database.');
193 193
         }
194 194
 
195
-        $pk = (empty($this->_attributes[self::$_primaryKey])) ? 'NULL' :  $this->_attributes[self::$_primaryKey];
195
+        $pk = (empty($this->_attributes[self::$_primaryKey])) ? 'NULL' : $this->_attributes[self::$_primaryKey];
196 196
 
197 197
         //$record = self::$_connection->findRecord(self::$_table, (string) $pk);
198 198
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     public function setProperties($array)
222 222
     {
223 223
         foreach ($this->_attributes as $key => $value) {
224
-            if (! empty($array[$key])) {
224
+            if (!empty($array[$key])) {
225 225
                 $this->_attributes[$key] = $array[$key];
226 226
             }
227 227
         }
Please login to merge, or discard this patch.