Completed
Push — develop ( 475872...d49321 )
by Patrick
34s
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/SQLUser.php 1 patch
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.
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.
Autoload.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,22 +8,22 @@  discard block
 block discarded – undo
8 8
 * @copyright Copyright (c) 2015, Austin Artistic Reconstruction
9 9
 * @license http://www.apache.org/licenses/ Apache 2.0 License
10 10
 */
11
-if(file_exists(__DIR__ . '/vendor/autoload.php'))
11
+if(file_exists(__DIR__.'/vendor/autoload.php'))
12 12
 {
13
-    require(__DIR__ . '/vendor/autoload.php');
13
+    require(__DIR__.'/vendor/autoload.php');
14 14
 }
15
-set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
16
-spl_autoload_register(function ($class) {
15
+set_include_path(get_include_path().PATH_SEPARATOR.__DIR__);
16
+spl_autoload_register(function($class) {
17 17
 
18 18
     // project-specific namespace prefix
19 19
     $prefix = 'Flipside\\';
20 20
 
21 21
     // base directory for the namespace prefix
22
-    $base_dir = __DIR__ . '/';
22
+    $base_dir = __DIR__.'/';
23 23
 
24 24
     // does the class use the namespace prefix?
25 25
     $len = strlen($prefix);
26
-    if (strncmp($prefix, $class, $len) !== 0) {
26
+    if(strncmp($prefix, $class, $len) !== 0) {
27 27
         // no, move to the next registered autoloader
28 28
         return;
29 29
     }
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
     // replace the namespace prefix with the base directory, replace namespace
35 35
     // separators with directory separators in the relative class name, append
36 36
     // with .php
37
-    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
37
+    $file = $base_dir.str_replace('\\', '/', $relative_class).'.php';
38 38
 
39 39
     // if the file exists, require it
40
-    if (file_exists($file)) {
40
+    if(file_exists($file)) {
41 41
         require $file;
42 42
     }
43 43
 });
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,8 @@  discard block
 block discarded – undo
13 13
     require(__DIR__ . '/vendor/autoload.php');
14 14
 }
15 15
 set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
16
-spl_autoload_register(function ($class) {
16
+spl_autoload_register(function ($class)
17
+{
17 18
 
18 19
     // project-specific namespace prefix
19 20
     $prefix = 'Flipside\\';
@@ -23,7 +24,8 @@  discard block
 block discarded – undo
23 24
 
24 25
     // does the class use the namespace prefix?
25 26
     $len = strlen($prefix);
26
-    if (strncmp($prefix, $class, $len) !== 0) {
27
+    if (strncmp($prefix, $class, $len) !== 0)
28
+    {
27 29
         // no, move to the next registered autoloader
28 30
         return;
29 31
     }
@@ -37,7 +39,8 @@  discard block
 block discarded – undo
37 39
     $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
38 40
 
39 41
     // if the file exists, require it
40
-    if (file_exists($file)) {
42
+    if (file_exists($file))
43
+    {
41 44
         require $file;
42 45
     }
43 46
 });
Please login to merge, or discard this patch.