Completed
Push — master ( f69da3...1ada0c )
by Christopher
02:13
created
ActiveRecord.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
             return 0;
188 188
         }
189 189
 
190
-        if(($condition = $this->getOldPrimaryKey(true)) !== $this->getPrimaryKey(true)) {
190
+        if (($condition = $this->getOldPrimaryKey(true)) !== $this->getPrimaryKey(true)) {
191 191
             // TODO Change DN
192 192
 //            static::getDb()->rename($condition, $newRdn, $newParent, true);
193 193
 //            if (!$this->refresh()){
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
         }
198 198
         
199 199
         foreach ($values as $key => $value) {
200
-            if($key == 'dn'){
200
+            if ($key == 'dn') {
201 201
                 continue;
202 202
             }
203
-            if(empty ($this->getOldAttribute($key)) && $value === ''){
203
+            if (empty ($this->getOldAttribute($key)) && $value === '') {
204 204
                 unset($values[$key]);
205
-            } else if($value === ''){
205
+            } else if ($value === '') {
206 206
                 $attributes[] = ['attrib'  => $key, 'modtype' => LDAP_MODIFY_BATCH_REMOVE];
207 207
             } else if (empty ($this->getOldAttribute($key))) {
208 208
                 $attributes[] = ['attrib'  => $key, 'modtype' => LDAP_MODIFY_BATCH_ADD, 'values' => [$value]];
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      */
246 246
     public static function updateAll($attributes, $condition = '')
247 247
     {
248
-        if(is_array($condition)){
248
+        if (is_array($condition)) {
249 249
             $condition = $condition['dn'];
250 250
         }        
251 251
         
Please login to merge, or discard this patch.
DataReader.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function __construct(Connection $conn, $results, $config = [])
76 76
     {
77
-        $this->_conn   = $conn;
77
+        $this->_conn = $conn;
78 78
         $this->_results = $results;
79 79
 
80
-        if(is_array($this->_results)){
80
+        if (is_array($this->_results)) {
81 81
             foreach ($this->_results as $result) {
82 82
                 $this->_count += $this->_conn->countEntries($result);
83 83
                 //$this->setEntries($result);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param resource|array $result
102 102
      * @return void
103 103
      */
104
-    protected function setEntries($result){        
104
+    protected function setEntries($result) {        
105 105
         $identifier = $this->_conn->getFirstEntry($result);
106 106
 
107 107
         while (false !== $identifier) {
@@ -124,12 +124,12 @@  discard block
 block discarded – undo
124 124
             return [];
125 125
         }
126 126
         
127
-        $token = 'Get entries with limit pagination ' . $this->_conn->pageSize;
127
+        $token = 'Get entries with limit pagination '.$this->_conn->pageSize;
128 128
         Yii::beginProfile($token, __METHOD__);
129
-        if($this->_conn->offset > 0){
130
-            $this->setEntries($this->_results[intval($this->_conn->offset/$this->_conn->pageSize)]);
129
+        if ($this->_conn->offset > 0) {
130
+            $this->setEntries($this->_results[intval($this->_conn->offset / $this->_conn->pageSize)]);
131 131
         } else {
132
-            if(is_array($this->_results)){
132
+            if (is_array($this->_results)) {
133 133
                 foreach ($this->_results as $result) {                
134 134
                     $this->setEntries($result);
135 135
                 }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         }
140 140
         Yii::endProfile($token, __METHOD__);
141 141
         
142
-        $token = 'Get Attributes of entries with limit pagination in ' . $this->_conn->pageSize;
142
+        $token = 'Get Attributes of entries with limit pagination in '.$this->_conn->pageSize;
143 143
         Yii::beginProfile($token, __METHOD__);
144 144
         $data = [];
145 145
         foreach ($this as $item) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function close()
159 159
     {
160
-        if(is_array($this->_results)){
160
+        if (is_array($this->_results)) {
161 161
             foreach ($this->_results as $result) {
162 162
                 $this->_conn->freeResult($result);
163 163
             }
Please login to merge, or discard this patch.