Completed
Push — master ( 72d3ee...b6a8e0 )
by Patrick
43s queued 10s
created
Email/AmazonSES.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,10 +42,13 @@  discard block
 block discarded – undo
42 42
             $args = array();
43 43
             $args['RawMessage'] = array();
44 44
             $args['RawMessage']['Data'] = $email->getRawMessage();
45
-            try {
45
+            try
46
+            {
46 47
                 $res = $this->ses->sendRawEmail($args);
47 48
                 return $res;
48
-            } catch(\Exception $e) {
49
+            }
50
+            catch(\Exception $e)
51
+            {
49 52
                 return false;
50 53
             }
51 54
         }
@@ -66,9 +69,12 @@  discard block
 block discarded – undo
66 69
             $args['Message']['Body']['Text']['Data'] = $email->getTextBody();
67 70
             $args['Message']['Body']['Html']['Data'] = $email->getHtmlBody();
68 71
             $args['ReplyToAddresses'] = array($email->getReplyTo());
69
-            try {
72
+            try
73
+            {
70 74
                 return $this->ses->sendEmail($args);
71
-            } catch(\Exception $e) {
75
+            }
76
+            catch(\Exception $e)
77
+            {
72 78
                 return false;
73 79
             }
74 80
         }
Please login to merge, or discard this patch.
Email/SMTPServer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
             return array($address);
60 60
         }
61 61
         $ret = array();
62
-        $ret[0] = trim(substr($address, $pos+1), '>');
63
-        $ret[1] = substr($address, 0, $pos-1);
62
+        $ret[0] = trim(substr($address, $pos + 1), '>');
63
+        $ret[1] = substr($address, 0, $pos - 1);
64 64
         return $ret;
65 65
     }
66 66
 
Please login to merge, or discard this patch.
Data/DataTableSessionHandler.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
     public function open($savePath, $sessionName)
17 17
     {
18
-       $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName);
19
-       if($this->dataTable)
20
-       {
21
-           return true;
22
-       }
23
-       return false;
18
+        $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName);
19
+        if($this->dataTable)
20
+        {
21
+            return true;
22
+        }
23
+        return false;
24 24
     }
25 25
 
26 26
     public function close()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
     public function gc($maxlifetime)
64 64
     {
65
-        $date = date("Y-m-d H:i:s", time()-$maxlifetime);
65
+        $date = date("Y-m-d H:i:s", time() - $maxlifetime);
66 66
         $filter = new \Flipside\Data\Filter("sessionLastAccess lt $date");
67 67
         return $this->dataTable->delete($filter);
68 68
     }
Please login to merge, or discard this patch.
Http/Rest/DataTableAPI.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array()));
109 109
         $params = $this->manipulateParameters($request, $odata);
110 110
         $areas = $dataTable->read($odata->filter, $odata->select, $odata->top,
111
-                                  $odata->skip, $odata->orderby, $params);
111
+                                    $odata->skip, $odata->orderby, $params);
112 112
         if($areas === false)
113 113
         {
114 114
             $areas = array();
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array()));
160 160
         $filter = $this->getFilterForPrimaryKey($args['name']);
161 161
         $areas = $dataTable->read($filter, $odata->select, $odata->top,
162
-                                  $odata->skip, $odata->orderby);
162
+                                    $odata->skip, $odata->orderby);
163 163
         if(empty($areas))
164 164
         {
165 165
             return $response->withStatus(404);
Please login to merge, or discard this patch.
Http/Rest/SerializationMiddleware.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             //The underlying API call gave us back a different content type. Just pass that on...
84 84
             return $response;
85 85
         }
86
-	$overrides = $request->getAttribute('serializeOverrides');
86
+    $overrides = $request->getAttribute('serializeOverrides');
87 87
         if($overrides->has($this->format))
88 88
         {
89 89
             return $this->reserializeBody($response, $overrides->get($this->format));
Please login to merge, or discard this patch.
Http/WebSite.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
         $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true, 'displayErrorDetails'=> true]);
12 12
         parent::__construct($settings);
13 13
         $c = $this->getContainer();
14
-        $c['errorHandler'] = function($c) { return new WebErrorHandler();};
14
+        $c['errorHandler'] = function($c) { return new WebErrorHandler(); };
15 15
         $this->add(new AuthMiddleware());
16 16
         $this->add(new ODataMiddleware());
17 17
     }
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     public function registerAPI($uri, $api)
25 25
     {
26
-        $group = $this->group($uri, function() use($api){$api->setup($this);});
26
+        $group = $this->group($uri, function() use($api){$api->setup($this); });
27 27
         $group->add(new \Flipside\Http\Rest\SerializationMiddleware());
28 28
         $group->add(new \Flipside\Http\Rest\CORSMiddleware($this->getContainer()));
29 29
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@  discard block
 block discarded – undo
11 11
         $settings = array("settings"=>["determineRouteBeforeAppMiddleware"=>true, 'displayErrorDetails'=> true]);
12 12
         parent::__construct($settings);
13 13
         $c = $this->getContainer();
14
-        $c['errorHandler'] = function($c) { return new WebErrorHandler();};
14
+        $c['errorHandler'] = function($c)
15
+        {
16
+return new WebErrorHandler();};
15 17
         $this->add(new AuthMiddleware());
16 18
         $this->add(new ODataMiddleware());
17 19
     }
@@ -23,7 +25,9 @@  discard block
 block discarded – undo
23 25
 
24 26
     public function registerAPI($uri, $api)
25 27
     {
26
-        $group = $this->group($uri, function() use($api){$api->setup($this);});
28
+        $group = $this->group($uri, function() use($api)
29
+        {
30
+$api->setup($this);});
27 31
         $group->add(new \Flipside\Http\Rest\SerializationMiddleware());
28 32
         $group->add(new \Flipside\Http\Rest\CORSMiddleware($this->getContainer()));
29 33
     }
Please login to merge, or discard this patch.
Auth/SQLGroup.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -137,16 +137,16 @@
 block discarded – undo
137 137
     {
138 138
         if($isGroup)
139 139
         {
140
-        	array_push($this->tmpMembers, array('gid' => $name));
140
+            array_push($this->tmpMembers, array('gid' => $name));
141 141
         }
142 142
         else
143 143
         {
144
-        	array_push($this->tmpMembers, array('uid' => $name));
144
+            array_push($this->tmpMembers, array('uid' => $name));
145 145
         }
146 146
         if($flush)
147 147
         {
148 148
                 $gid = $this->getGroupName();
149
-        	$memberDT = $this->auth->getDataTable('groupUserMap');
149
+            $memberDT = $this->auth->getDataTable('groupUserMap');
150 150
                 //Get all cu rrent direct members
151 151
                 $existing = $memberDT->read(new \Flipside\Data\Filter('groupCN eq "'.$gid.'"'));
152 152
                 $exCount = count($existing);
Please login to merge, or discard this patch.
Auth/SQLUser.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         $data = $userDT->read($filter);
81 81
         if(strlen($data[0]['userPassword']) === 0)
82 82
         {
83
-             $data[0]['userPassword'] = openssl_random_pseudo_bytes(10);
83
+                $data[0]['userPassword'] = openssl_random_pseudo_bytes(10);
84 84
         }
85 85
         $hash = hash('sha512', $data[0]['uid'].';'.$data[0]['userPassword'].';'.$data[0]['mail']);
86 86
         $update = array('resetHash' => $hash);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     private function hashLDAPPassword($password, $salt)
132 132
     {
133 133
         $shaHashed = sha1($password.$salt);
134
-        $packed = pack("H*",$shaHashed);
134
+        $packed = pack("H*", $shaHashed);
135 135
         $encoded = base64_encode($packed.$salt);
136 136
         return "{SSHA}".$encoded;
137 137
     }
Please login to merge, or discard this patch.
Auth/SQLAuthenticator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     private function hashLDAPPassword($password, $salt)
132 132
     {
133 133
         $shaHashed = sha1($password.$salt);
134
-        $packed = pack("H*",$shaHashed);
134
+        $packed = pack("H*", $shaHashed);
135 135
         $encoded = base64_encode($packed.$salt);
136 136
         return "{SSHA}".$encoded;
137 137
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -219,7 +219,8 @@
 block discarded – undo
219 219
     public function getGroupByName($name)
220 220
     {
221 221
         $group = $this->getEntityByFilter('group', "cn eq '$name'", '\Flipside\Auth\SQLGroup');
222
-        if($group === null) {
222
+        if($group === null)
223
+        {
223 224
             return $this->getEntityByFilter('group', "gid eq '$name'", '\Flipside\Auth\SQLGroup');
224 225
         }
225 226
         return $group;
Please login to merge, or discard this patch.