Completed
Branch master (15ad7c)
by Maik
01:54
created
src/Generics/Util/Arrays.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,9 @@
 block discarded – undo
39 39
      */
40 40
     public static function hasElement($array, $element): bool
41 41
     {
42
-        if (! is_array($array))
43
-            return false;
42
+        if (! is_array($array)) {
43
+                    return false;
44
+        }
44 45
         
45 46
         return isset($array[$element]) && strlen($array[$element]) > 0;
46 47
     }
Please login to merge, or discard this patch.
src/Generics/Client/Session.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
      * Create a new session provider
23 23
      */
24 24
     public function __construct()
25
-    {}
25
+    {
26
+}
26 27
 
27 28
     /**
28 29
      * Create session
Please login to merge, or discard this patch.
src/Generics/Streams/FileOutputStream.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,8 @@  discard block
 block discarded – undo
80 80
                 throw new NoAccessException("Cannot write to file $file");
81 81
             }
82 82
             $mode = "ab";
83
-        } else {
83
+        }
84
+        else {
84 85
             if (! is_writable(dirname($file))) {
85 86
                 throw new NoAccessException("Cannot write to file {file}", array(
86 87
                     'file' => $file
@@ -145,7 +146,8 @@  discard block
 block discarded – undo
145 146
                     throw new StreamException("Could not write memory stream into file");
146 147
                 }
147 148
             }
148
-        } else {
149
+        }
150
+        else {
149 151
             $buffer = strval($buffer);
150 152
             if (fwrite($this->handle, $buffer) != strlen($buffer)) {
151 153
                 throw new StreamException("Could not write buffer into file");
Please login to merge, or discard this patch.
src/Generics/Socket/SecureSocket.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,8 @@
 block discarded – undo
234 234
         
235 235
         if (is_dir($caPath)) {
236 236
             $opts['ssl']['capath'] = $caPath;
237
-        } else {
237
+        }
238
+        else {
238 239
             $opts['ssl']['cafile'] = $caPath;
239 240
         }
240 241
         
Please login to merge, or discard this patch.
src/Generics/Socket/Socket.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,8 @@
 block discarded – undo
174 174
             if ($code != 0) {
175 175
                 if ($code != 10053) {
176 176
                     throw new SocketException(socket_strerror($code), array(), $code);
177
-                } else {
177
+                }
178
+                else {
178 179
                     $this->handle = null;
179 180
                 }
180 181
             }
Please login to merge, or discard this patch.
src/Generics/Util/Directory.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,8 @@
 block discarded – undo
104 104
             if ($iter->isDir()) {
105 105
                 $dir = new Directory($iter->getPathname());
106 106
                 $dir->remove(true);
107
-            } else {
107
+            }
108
+            else {
108 109
                 unlink($iter->getPathname());
109 110
             }
110 111
             
Please login to merge, or discard this patch.
src/Generics/Client/HttpHeadersTrait.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@  discard block
 block discarded – undo
84 84
             $encoding = "";
85 85
             if (function_exists('gzinflate')) {
86 86
                 $encoding = 'gzip, deflate';
87
-            } else {
87
+            }
88
+            else {
88 89
                 $encoding = 'identity';
89 90
             }
90 91
             $this->setHeader('Accept-Encoding', $encoding);
@@ -101,7 +102,8 @@  discard block
 block discarded – undo
101 102
     {
102 103
         if ($requestType == 'HEAD') {
103 104
             $this->setHeader('Connection', 'close');
104
-        } else {
105
+        }
106
+        else {
105 107
             $this->setHeader('Connection', 'keep-alive');
106 108
         }
107 109
     }
@@ -115,7 +117,8 @@  discard block
 block discarded – undo
115 117
     {
116 118
         if (strpos($line, ':') === false) {
117 119
             $this->responseCode = HttpStatus::parseStatus($line)->getCode();
118
-        } else {
120
+        }
121
+        else {
119 122
             $line = trim($line);
120 123
             list ($headerName, $headerValue) = explode(':', $line, 2);
121 124
             $this->headers[$headerName] = trim($headerValue);
Please login to merge, or discard this patch.
src/Generics/Logger/ExceptionLoggerTrait.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
         
34 34
         if ($ex instanceof ErrorException) {
35 35
             $level = LogLevel::ERROR;
36
-        } elseif ($ex instanceof RuntimeException) {
36
+        }
37
+        elseif ($ex instanceof RuntimeException) {
37 38
             $level = LogLevel::EMERGENCY;
38 39
         }
39 40
         
Please login to merge, or discard this patch.