Completed
Push — master ( d2d480...28a4db )
by Patrick
03:16
created
Data/class.Filter.php 2 patches
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.
Braces   +12 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,11 +35,17 @@  discard block
 block discarded – undo
35 35
             return array(new FilterClause($string));
36 36
         }
37 37
         $children = array();
38
-        if($parens) array_push($children, '(');
38
+        if($parens)
39
+        {
40
+            array_push($children, '(');
41
+        }
39 42
         $children = array_merge($children, self::process_string($clauses[1]));
40 43
         array_push($children, trim($clauses[2]));
41 44
         $children = array_merge($children, self::process_string($clauses[3]));
42
-        if($parens) array_push($children, ')');
45
+        if($parens)
46
+        {
47
+            array_push($children, ')');
48
+        }
43 49
         return $children;
44 50
     }
45 51
 
@@ -178,7 +184,10 @@  discard block
 block discarded – undo
178 184
         $count = count($this->children);
179 185
         for($i = 0; $i < $count; $i++)
180 186
         {
181
-            if(!is_object($this->children[$i])) continue;
187
+            if(!is_object($this->children[$i]))
188
+            {
189
+                continue;
190
+            }
182 191
             if(strstr($this->children[$i]->var1, $substr) !== false ||
183 192
                strstr($this->children[$i]->var2, $substr) !== false)
184 193
             {
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.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.NullAuthenticator.php 1 patch
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,24 +1,24 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace Auth;
3 3
 
4
-class NullAuthenticator extends Authenticator
5
-{
6
-    public function login($username, $password)
7
-    {
4
+class NullAuthenticator extends Authenticator
5
+{
6
+    public function login($username, $password)
7
+    {
8 8
         return array('res'=>true, 'extended'=>null);
9 9
     }
10 10
 
11
-    public function isLoggedIn($data)
12
-    {
13
-        if(isset($data['res']))
14
-        {
11
+    public function isLoggedIn($data)
12
+    {
13
+        if(isset($data['res']))
14
+        {
15 15
             return $data['res'];
16 16
         }
17 17
         return false;
18 18
     }
19 19
 
20
-    public function getUser($data)
21
-    {
20
+    public function getUser($data)
21
+    {
22 22
         return null;
23 23
     }
24 24
 }
Please login to merge, or discard this patch.
Auth/class.SQLGroup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@
 block discarded – undo
28 28
         return false;
29 29
     }
30 30
 
31
-    public function getMemberUids($recursive=true)
31
+    public function getMemberUids($recursive = true)
32 32
     {
33 33
         return $this->members(false, $recursive, true);
34 34
     }
35 35
 
36
-    public function members($details=false, $recursive=true, $includeGroups=true)
36
+    public function members($details = false, $recursive = true, $includeGroups = true)
37 37
     {
38 38
         //TODO
39 39
         return array();
Please login to merge, or discard this patch.
Auth/class.Group.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
         return false;
24 24
     }
25 25
 
26
-    public function getMemberUids($recursive=true)
26
+    public function getMemberUids($recursive = true)
27 27
     {
28 28
         return array();
29 29
     }
30 30
 
31
-    public function members($details=false, $recursive=true, $includeGroups=true)
31
+    public function members($details = false, $recursive = true, $includeGroups = true)
32 32
     {
33 33
         return array();
34 34
     }
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
     public function jsonSerialize()
47 47
     {
48 48
         $group = array();
49
-        try{
49
+        try {
50 50
         $group['cn'] = $this->getGroupName();
51 51
         $group['description'] = $this->getDescription();
52 52
         $group['member'] = $this->getMemberUids();
53
-        } catch(\Exception $e) {echo $e->getMessage(); die();}
53
+        } catch(\Exception $e) {echo $e->getMessage(); die(); }
54 54
         return $group;
55 55
     }
56 56
 
57
-    public function getNonMembers($select=false)
57
+    public function getNonMembers($select = false)
58 58
     {
59 59
         return array();
60 60
     }
61 61
 
62
-    public function addMember($name, $isGroup=false, $flush=true)
62
+    public function addMember($name, $isGroup = false, $flush = true)
63 63
     {
64 64
         return false;
65 65
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         return true;
102 102
     }
103 103
 
104
-    static function from_name($name, $data=false)
104
+    static function from_name($name, $data = false)
105 105
     {
106 106
         return false;
107 107
     }
Please login to merge, or discard this patch.
Braces   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,15 @@  discard block
 block discarded – undo
46 46
     public function jsonSerialize()
47 47
     {
48 48
         $group = array();
49
-        try{
49
+        try
50
+        {
50 51
         $group['cn'] = $this->getGroupName();
51 52
         $group['description'] = $this->getDescription();
52 53
         $group['member'] = $this->getMemberUids();
53
-        } catch(\Exception $e) {echo $e->getMessage(); die();}
54
+        }
55
+        catch(\Exception $e)
56
+        {
57
+echo $e->getMessage(); die();}
54 58
         return $group;
55 59
     }
56 60
 
@@ -86,7 +90,10 @@  discard block
 block discarded – undo
86 90
                 {
87 91
                     $isLast = true;
88 92
                 }
89
-                if(!isset($group->member[$i]->type)) continue;
93
+                if(!isset($group->member[$i]->type))
94
+                {
95
+                    continue;
96
+                }
90 97
                 if($group->member[$i]->type === 'Group')
91 98
                 {
92 99
                     $this->addMember($group->member[$i]->cn, true, $isLast);
Please login to merge, or discard this patch.
Autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
     $classname = ltrim($classname, '\\');
23 23
     $filename  = '';
24 24
     $namespace = '';
25
-    if ($lastNsPos = strrpos($classname, '\\'))
25
+    if($lastNsPos = strrpos($classname, '\\'))
26 26
     {
27 27
         $namespace = substr($classname, 0, $lastNsPos);
28 28
         $classname = substr($classname, $lastNsPos + 1);
29
-        $filename  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
29
+        $filename  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR;
30 30
     }
31 31
     $filename = __DIR__.DIRECTORY_SEPARATOR.$filename.'class.'.$classname.'.php';
32 32
     if(is_readable($filename))
Please login to merge, or discard this patch.
class.JsonSerializable.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,8 @@
 block discarded – undo
22 22
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
23 23
 * @link http://www.php.net/manual/en/class.jsonserializable.php
24 24
 */
25
-interface JsonSerializable {
25
+interface JsonSerializable
26
+{
26 27
     /** The jsonSerizlize function as defined by PHP 5.4 and greater */
27 28
     public function jsonSerialize();
28 29
 }
Please login to merge, or discard this patch.