Completed
Push — master ( 66594c...4f1aef )
by Patrick
03:28
created
Data/class.Filter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         //First check for parenthesis...
28 28
         if($string[0] === '(' && substr($string, -1) === ')')
29 29
         {
30
-            $string = substr($string, 1, strlen($string)-2);
30
+            $string = substr($string, 1, strlen($string) - 2);
31 31
             $parens = true;
32 32
         }
33 33
         if(preg_match('/(.+?)( and | or )(.+)/', $string, $clauses) === 0)
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
         {
52 52
             if($this->children[$i] === '(' || $this->children[$i] === ')')
53 53
             {
54
-                $ret.=$this->children[$i];
54
+                $ret .= $this->children[$i];
55 55
             }
56 56
             else if($this->children[$i] === 'and')
57 57
             {
58
-                $ret.=' AND ';
58
+                $ret .= ' AND ';
59 59
             }
60 60
             else if($this->children[$i] === 'or')
61 61
             {
62
-                $ret.=' OR ';
62
+                $ret .= ' OR ';
63 63
             }
64 64
             else
65 65
             {
66
-                $ret.=$this->children[$i]->to_sql_string();
66
+                $ret .= $this->children[$i]->to_sql_string();
67 67
             }
68 68
         }
69 69
         return $ret.$this->sqlAppend;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
             else
96 96
             {
97
-                $ret.=$this->children[$i]->to_ldap_string();
97
+                $ret .= $this->children[$i]->to_ldap_string();
98 98
             }
99 99
         }
100 100
         if($count === 1 && $prefix === '')
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function addToSQLString($string)
191 191
     {
192
-        $this->sqlAppend.=$string;
192
+        $this->sqlAppend .= $string;
193 193
     }
194 194
 
195 195
     public function appendChild($child)
Please login to merge, or discard this patch.
Data/class.FilterClause.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     public $var2;
8 8
     public $op;
9 9
 
10
-    function __construct($string=false)
10
+    function __construct($string = false)
11 11
     {
12 12
         if($string !== false) $this->process_filter_string($string);
13 13
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         {
64 64
             case 'substringof':
65 65
             case 'contains':
66
-                $str = $this->var1.' LIKE \'%'.trim($this->var2,"'").'%\'';
66
+                $str = $this->var1.' LIKE \'%'.trim($this->var2, "'").'%\'';
67 67
                 break;
68 68
             default:
69 69
                 $str = $this->var1.$this->op.$this->var2;
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
         {
80 80
             case 'substringof':
81 81
             case 'contains':
82
-                $str.=$this->var1.$this->op.'*'.trim($this->var2,"'").'*';
82
+                $str .= $this->var1.$this->op.'*'.trim($this->var2, "'").'*';
83 83
                 break;
84 84
             case '!=':
85
-                $str.='!('.$this->var1.'='.$this->var2.')';
85
+                $str .= '!('.$this->var1.'='.$this->var2.')';
86 86
                 break;
87 87
             default:
88
-                $str.=$this->var1.$this->op.$this->var2;
88
+                $str .= $this->var1.$this->op.$this->var2;
89 89
                 break;
90 90
         }
91 91
         return $str.')';
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 $case  = false;
120 120
                 if(self::str_startswith($this->var1, 'tolower'))
121 121
                 {
122
-                    $field = substr($this->var1, strpos($this->var1, '(')+1);
122
+                    $field = substr($this->var1, strpos($this->var1, '(') + 1);
123 123
                     $field = substr($field, 0, strpos($field, ')'));
124 124
                     $case = true;
125 125
                 }
Please login to merge, or discard this patch.
Data/class.MongoDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
     protected $collection;
7 7
     protected $namespace;
8 8
 
9
-    public function __construct($collection, $collection_name=false)
9
+    public function __construct($collection, $collection_name = false)
10 10
     {
11 11
         if($collection_name !== false)
12 12
         {
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         }
19 19
     }
20 20
 
21
-    public function count($filter=false)
21
+    public function count($filter = false)
22 22
     {
23 23
         $criteria = array();
24 24
         if($filter !== false)
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         return $filter->to_mongo_filter();
49 49
     }
50 50
 
51
-    public function search($filter=false, $select=false, $count=false, $skip=false, $sort=false, $params=false)
51
+    public function search($filter = false, $select = false, $count = false, $skip = false, $sort = false, $params = false)
52 52
     {
53 53
         $fields   = array();
54 54
         $criteria = $this->getCriteriaFromFilter($filter);
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
         {
57 57
             $fields = array_fill_keys($select, 1);
58 58
         }
59
-        $cursor   = $this->collection->find($criteria, $fields);
59
+        $cursor = $this->collection->find($criteria, $fields);
60 60
         if($params !== false && isset($params['fields']))
61 61
         {
62 62
             $cursor->fields($params['fields']);
63 63
         }
64
-        if($sort  !== false)
64
+        if($sort !== false)
65 65
         {
66 66
             $cursor->sort($sort);
67 67
         }
68
-        if($skip  !== false)
68
+        if($skip !== false)
69 69
         {
70 70
             $cursor->skip($skip);
71 71
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         {
74 74
             $cursor->limit($count);
75 75
         }
76
-        $ret      = array();
76
+        $ret = array();
77 77
         foreach($cursor as $doc)
78 78
         {
79 79
             array_push($ret, $doc);
Please login to merge, or discard this patch.
Auth/class.SQLUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
     private $data;
7 7
     private $auth;
8 8
 
9
-    function __construct($data=false, $auth=false)
9
+    function __construct($data = false, $auth = false)
10 10
     {
11 11
         $this->data = array();
12 12
         $this->auth = $auth;
Please login to merge, or discard this patch.
Auth/class.User.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function isProfileComplete()
310 310
     {
311
-        if($this->getCountry() === false    || $this->getAddress() === false ||
311
+        if($this->getCountry() === false || $this->getAddress() === false ||
312 312
            $this->getPostalCode() === false || $this->getCity() === false ||
313
-           $this->getState() === false      || $this->getPhoneNumber() === false)
313
+           $this->getState() === false || $this->getPhoneNumber() === false)
314 314
         {
315 315
             return false;
316 316
         }
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      *
355 355
      * @return true|false true if the user's password was changed, false otherwise
356 356
      */
357
-    public function change_pass($oldpass, $newpass, $isHash=false)
357
+    public function change_pass($oldpass, $newpass, $isHash = false)
358 358
     {
359 359
         if($isHash === false && $this->validate_password($oldpass) === false)
360 360
         {
@@ -793,17 +793,17 @@  discard block
 block discarded – undo
793 793
     public function getVcard()
794 794
     {
795 795
         $ret = "BEGIN:VCARD\nVERSION:2.1\n";
796
-        $ret.= 'N:'.$this->getLastName().';'.$this->getGivenName()."\n";
797
-        $ret.= 'FN:'.$this->getGivenName()."\n";
796
+        $ret .= 'N:'.$this->getLastName().';'.$this->getGivenName()."\n";
797
+        $ret .= 'FN:'.$this->getGivenName()."\n";
798 798
         $titles = $this->getTitles();
799 799
         if($titles !== false)
800 800
         {
801
-            $ret.= 'TITLE:'.implode(',', $titles)."\n";
801
+            $ret .= 'TITLE:'.implode(',', $titles)."\n";
802 802
         }
803
-        $ret.= "ORG: Austin Artistic Reconstruction\n";
804
-        $ret.= 'TEL;TYPE=MOBILE,VOICE:'.$this->getPhoneNumber()."\n";
805
-        $ret.= 'EMAIL;TYPE=PREF,INTERNET:'.$this->getEmail()."\n";
806
-        $ret.= "END:VCARD\n";
803
+        $ret .= "ORG: Austin Artistic Reconstruction\n";
804
+        $ret .= 'TEL;TYPE=MOBILE,VOICE:'.$this->getPhoneNumber()."\n";
805
+        $ret .= 'EMAIL;TYPE=PREF,INTERNET:'.$this->getEmail()."\n";
806
+        $ret .= "END:VCARD\n";
807 807
         return $ret;
808 808
     }
809 809
 }
Please login to merge, or discard this patch.
Auth/class.FlipsideAPIUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     private $userData;
11 11
     private $groupData = null;
12 12
 
13
-    public function __construct($data=false)
13
+    public function __construct($data = false)
14 14
     {
15 15
         if($data !== false && !isset($data['extended']))
16 16
         {
Please login to merge, or discard this patch.
Auth/class.Authenticator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @SuppressWarnings("UnusedFormalParameter")
104 104
      */
105
-    public function getGroupsByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false)
105
+    public function getGroupsByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false)
106 106
     {
107 107
         return false;
108 108
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      *
121 121
      * @SuppressWarnings("UnusedFormalParameter")
122 122
      */
123
-    public function getUsersByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false)
123
+    public function getUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false)
124 124
     {
125 125
         return false;
126 126
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @SuppressWarnings("UnusedFormalParameter")
140 140
      */
141
-    public function getPendingUsersByFilter($filter, $select=false, $top=false, $skip=false, $orderby=false)
141
+    public function getPendingUsersByFilter($filter, $select = false, $top = false, $skip = false, $orderby = false)
142 142
     {
143 143
         return false;
144 144
     }
Please login to merge, or discard this patch.
Auth/class.LDAPGroup.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         return substr($split[0], 4);
73 73
     }
74 74
 
75
-    public function getMemberUids($recursive=true)
75
+    public function getMemberUids($recursive = true)
76 76
     {
77 77
         $members = array();
78 78
         $rawMembers = $this->getMembersField();
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         return LDAPUser::from_name(substr($split[0], 4), $this->server);
118 118
     }
119 119
 
120
-    public function members($details=false, $recursive=true, $includeGroups=true)
120
+    public function members($details = false, $recursive = true, $includeGroups = true)
121 121
     {
122 122
         $members = array();
123 123
         $rawMembers = $this->getMembersField();
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         return $members;
155 155
     }
156 156
 
157
-    public function getNonMemebers($select=false)
157
+    public function getNonMemebers($select = false)
158 158
     {
159 159
         $data = array();
160 160
         $groupFilter = '(&(cn=*)(!(cn='.$this->getGroupName().'))';
@@ -163,18 +163,18 @@  discard block
 block discarded – undo
163 163
         $count = count($members);
164 164
         for($i = 0; $i < $count; $i++)
165 165
         {
166
-            $dnComps = explode(',',$members[$i]);
166
+            $dnComps = explode(',', $members[$i]);
167 167
             if(strncmp($members[$i], "uid=", 4) == 0)
168 168
             {
169
-                $userFilter.='(!('.$dnComps[0].'))';
169
+                $userFilter .= '(!('.$dnComps[0].'))';
170 170
             }
171 171
             else
172 172
             {
173
-                $groupFilter.='(!('.$dnComps[0].'))';
173
+                $groupFilter .= '(!('.$dnComps[0].'))';
174 174
             }
175 175
         }
176
-        $userFilter.=')';
177
-        $groupFilter.=')';
176
+        $userFilter .= ')';
177
+        $groupFilter .= ')';
178 178
         $groups = $this->server->read($this->server->group_base, $groupFilter);
179 179
         $count = count($groups);
180 180
         for($i = 0; $i < $count; $i++)
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         }
208 208
     }
209 209
 
210
-    public function addMember($name, $isGroup=false, $flush=true)
210
+    public function addMember($name, $isGroup = false, $flush = true)
211 211
     {
212 212
         $dn = false;
213 213
         if($isGroup)
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
         }
255 255
     }
256 256
 
257
-    static function from_dn($dn, $data=false)
257
+    static function from_dn($dn, $data = false)
258 258
     {
259 259
         if($data === false)
260 260
         {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         return new static($group[0]);
269 269
     }
270 270
 
271
-    static function from_name($name, $data=false)
271
+    static function from_name($name, $data = false)
272 272
     {
273 273
         if($data === false)
274 274
         {
Please login to merge, or discard this patch.
Auth/class.GoogleAuthenticator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public function authenticate($code, &$currentUser = false)
35 35
     {
36 36
         $googleUser = false;
37
-        try{
37
+        try {
38 38
             $this->client->authenticate($code);
39 39
             $this->token = $this->client->getAccessToken();
40 40
             \FlipSession::setVar('GoogleToken', $this->token);
Please login to merge, or discard this patch.