Completed
Push — master ( 78a8ff...f55562 )
by Christopher
02:55
created
ActiveRecord.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,19 +181,19 @@  discard block
 block discarded – undo
181 181
             return 0;
182 182
         }
183 183
 
184
-        if(($condition = $this->getOldPrimaryKey(true)) !== $this->getPrimaryKey(true)) {
184
+        if (($condition = $this->getOldPrimaryKey(true)) !== $this->getPrimaryKey(true)) {
185 185
             // TODO Change DN
186 186
             static::getDb()->rename($condition, $newRdn, $newParent, true);
187
-            if (!$this->refresh()){
187
+            if (!$this->refresh()) {
188 188
                 Yii::info('Model not refresh.', __METHOD__);
189 189
                 return false;
190 190
             }
191 191
         }
192 192
         
193 193
         foreach ($values as $key => $value) {
194
-            if(empty ($this->getOldAttribute($key)) && $value === ''){
194
+            if (empty ($this->getOldAttribute($key)) && $value === '') {
195 195
                 unset($values[$key]);
196
-            } else if($value === ''){
196
+            } else if ($value === '') {
197 197
                 $attributes[] = ['attrib'  => $key, 'modtype' => LDAP_MODIFY_BATCH_REMOVE];
198 198
             } else if (empty ($this->getOldAttribute($key))) {
199 199
                 $attributes[] = ['attrib'  => $key, 'modtype' => LDAP_MODIFY_BATCH_ADD, 'values' => [$value]];
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public static function updateAll($attributes, $condition = '')
238 238
     {
239
-        if(is_array($condition)){
239
+        if (is_array($condition)) {
240 240
             $condition = $condition['dn'];
241 241
         }        
242 242
         
Please login to merge, or discard this patch.
DataReader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,10 +71,10 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function __construct(Connection $conn, $results, $config = [])
73 73
     {
74
-        $this->_conn   = $conn;
74
+        $this->_conn = $conn;
75 75
         $this->_results = $results;
76 76
 
77
-        if(is_array($this->_results)){
77
+        if (is_array($this->_results)) {
78 78
             foreach ($this->_results as $result) {
79 79
                 $this->_count += $this->_conn->countEntries($result);
80 80
                 $this->setEntries($result);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param resource $result
99 99
      * @return void
100 100
      */
101
-    protected function setEntries($result){
101
+    protected function setEntries($result) {
102 102
         $identifier = $this->_conn->getFirstEntry($result);
103 103
 
104 104
         while (false !== $identifier) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function close()
137 137
     {
138
-        if(is_array($this->_results)){
138
+        if (is_array($this->_results)) {
139 139
             foreach ($this->_results as $result) {
140 140
                 $this->_conn->freeResult($result);
141 141
             }
Please login to merge, or discard this patch.
FilterBuilder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
             return '('.$this->operator[$operator].'('.implode(") (", $parts).')'.implode($other).')';
133 133
         } else if (!empty($other)) {
134 134
             return '('.$this->operator[$operator].implode($other).')';
135
-        }else {
135
+        } else {
136 136
             return '';
137 137
         }
138 138
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
             return '('.$this->operator[$operator].'('.implode(") (", $parts).')'.implode($other).')';
133 133
         } else if (!empty($other)) {
134 134
             return '('.$this->operator[$operator].implode($other).')';
135
-        }else {
135
+        } else {
136 136
             return '';
137 137
         }
138 138
     }
Please login to merge, or discard this patch.