Completed
Push — master ( e9f06b...2f8460 )
by Maik
01:56
created
src/Generics/Util/Directory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function isEmpty($filter = null)
50 50
     {
51
-        if (! $this->exists()) {
51
+        if (!$this->exists()) {
52 52
             throw new DirectoryException("Directory {dir} does not exist", array(
53 53
                 'dir' => $this->path
54 54
             ));
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $iter = new \DirectoryIterator($this->path);
58 58
         while ($iter->valid()) {
59
-            if (! $iter->isDot() && ($filter === null || ! preg_match("/$filter/", $iter->getFilename()))) {
59
+            if (!$iter->isDot() && ($filter === null || !preg_match("/$filter/", $iter->getFilename()))) {
60 60
                 return false;
61 61
             }
62 62
             $iter->next();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function remove($recursive = false)
77 77
     {
78
-        if (! $this->exists()) {
78
+        if (!$this->exists()) {
79 79
             return;
80 80
         }
81 81
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             return;
89 89
         }
90 90
 
91
-        if (! $recursive) {
91
+        if (!$recursive) {
92 92
             throw new DirectoryException("Directory {dir} is not empty", array(
93 93
                 'dir' => $this->path
94 94
             ));
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function exists()
147 147
     {
148
-        if (! file_exists($this->path)) {
148
+        if (!file_exists($this->path)) {
149 149
             return false;
150 150
         }
151 151
 
152
-        if (! is_dir($this->path)) {
152
+        if (!is_dir($this->path)) {
153 153
             throw new DirectoryException("Entry {path} exists, but it is not a directory!", array(
154 154
                 'path' => $this->path
155 155
             ));
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      */
181 181
     public function fileExists($fileName)
182 182
     {
183
-        if (! $this->exists()) {
183
+        if (!$this->exists()) {
184 184
             return false;
185 185
         }
186 186
 
Please login to merge, or discard this patch.
src/Generics/Util/BasicAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         }
97 97
 
98 98
         $httpStatus = new HttpStatus(401, '1.0');
99
-        header('WWW-Authenticate: Basic realm=' . $this->realm);
99
+        header('WWW-Authenticate: Basic realm='.$this->realm);
100 100
         header(sprintf('HTTP/%s', $httpStatus));
101 101
         echo "Forbidden!";
102 102
         return false;
Please login to merge, or discard this patch.
src/Generics/Util/Interpolator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         if ($context !== null) {
32 32
             foreach ($context as $key => $val) {
33
-                $replace['{' . $key . '}'] = $val;
33
+                $replace['{'.$key.'}'] = $val;
34 34
             }
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Generics/Socket/ServerSocket.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function __construct(Endpoint $endpoint)
27 27
     {
28 28
         parent::__construct($endpoint);
29
-        if (! @socket_set_option($this->handle, SOL_SOCKET, SO_REUSEADDR, 1)) {
29
+        if (!@socket_set_option($this->handle, SOL_SOCKET, SO_REUSEADDR, 1)) {
30 30
             $code = socket_last_error($this->handle);
31 31
             throw new SocketException(socket_strerror($code), array(), $code);
32 32
         }
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
         while ($runOn) {
49 49
             $clientHandle = @socket_accept($this->handle);
50 50
 
51
-            if (! is_resource($clientHandle)) {
51
+            if (!is_resource($clientHandle)) {
52 52
                 $code = socket_last_error($this->handle);
53 53
                 throw new SocketException(socket_strerror($code), array(), $code);
54 54
             }
55 55
 
56 56
             $address = null;
57 57
             $port = 0;
58
-            if (! @socket_getpeername($clientHandle, $address, $port)) {
58
+            if (!@socket_getpeername($clientHandle, $address, $port)) {
59 59
                 $code = socket_last_error($clientHandle);
60 60
                 throw new SocketException(socket_strerror($code), array(), $code);
61 61
             }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     private function bind()
75 75
     {
76
-        if (! @socket_bind($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
76
+        if (!@socket_bind($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
77 77
             $code = socket_last_error($this->handle);
78 78
             throw new SocketException(socket_strerror($code), array(), $code);
79 79
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     private function listen()
88 88
     {
89
-        if (! @socket_listen($this->handle, 5)) {
89
+        if (!@socket_listen($this->handle, 5)) {
90 90
             $code = socket_last_error($this->handle);
91 91
             throw new SocketException(socket_strerror($code), array(), $code);
92 92
         }
Please login to merge, or discard this patch.
src/Generics/Logger/ExceptionLoggerTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 trait ExceptionLoggerTrait
21 21
 {
22 22
 
23
+    /**
24
+     * @param string $message
25
+     */
23 26
     abstract protected function logImpl($level, $message, array $context = array());
24 27
 
25 28
     /**
Please login to merge, or discard this patch.
src/Generics/Socket/Socket.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $this->handle = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
56 56
         
57
-        if (! is_resource($this->handle)) {
57
+        if (!is_resource($this->handle)) {
58 58
             $code = socket_last_error();
59 59
             throw new SocketException(socket_strerror($code), array(), $code);
60 60
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function ready()
90 90
     {
91
-        if (! is_resource($this->handle)) {
91
+        if (!is_resource($this->handle)) {
92 92
             return false;
93 93
         }
94 94
         
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return false;
110 110
         }
111 111
         
112
-        if (! in_array($this->handle, $read)) {
112
+        if (!in_array($this->handle, $read)) {
113 113
             return false;
114 114
         }
115 115
         
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function isWriteable()
125 125
     {
126
-        if (! is_resource($this->handle)) {
126
+        if (!is_resource($this->handle)) {
127 127
             return false;
128 128
         }
129 129
         
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             return false;
145 145
         }
146 146
         
147
-        if (! in_array($this->handle, $write)) {
147
+        if (!in_array($this->handle, $write)) {
148 148
             return false;
149 149
         }
150 150
         
Please login to merge, or discard this patch.
src/Generics/Socket/ClientSocket.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $this->handle = $clientHandle;
37 37
         $this->conntected = false;
38 38
         
39
-        if (! is_resource($clientHandle)) {
39
+        if (!is_resource($clientHandle)) {
40 40
             parent::__construct($endpoint);
41 41
         }
42 42
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function connect()
50 50
     {
51
-        if (! @socket_connect($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
51
+        if (!@socket_connect($this->handle, $this->endpoint->getAddress(), $this->endpoint->getPort())) {
52 52
             $code = socket_last_error($this->handle);
53 53
             throw new SocketException(socket_strerror($code), array(), $code);
54 54
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function close()
83 83
     {
84
-        if (! $this->conntected) {
84
+        if (!$this->conntected) {
85 85
             throw new SocketException("Socket is not connected");
86 86
         }
87 87
         
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function isWriteable()
98 98
     {
99
-        if (! $this->isConnected()) {
99
+        if (!$this->isConnected()) {
100 100
             return false;
101 101
         }
102 102
         
Please login to merge, or discard this patch.
src/Generics/Logger/SimpleLogger.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function logImpl($level, $message, array $context = array())
67 67
     {
68
-        if (! $this->levelHasReached($level)) {
68
+        if (!$this->levelHasReached($level)) {
69 69
             return;
70 70
         }
71 71
         
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         clearstatcache();
92 92
         
93
-        if (! file_exists($this->file)) {
93
+        if (!file_exists($this->file)) {
94 94
             return false;
95 95
         }
96 96
         
Please login to merge, or discard this patch.
src/Generics/Streams/MemoryStream.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
         if ($this->closed) {
152 152
             throw new StreamException("Stream is not open");
153 153
         }
154
-        if (! isset($this->memory)) {
154
+        if (!isset($this->memory)) {
155 155
             return 0;
156 156
         }
157 157
         return strlen($this->memory);
Please login to merge, or discard this patch.