Completed
Push — master ( 5d4822...d1d02b )
by Maik
01:58
created
src/Generics/Streams/FileInputStream.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __construct($file)
51 51
     {
52
-        if (! file_exists($file)) {
52
+        if (!file_exists($file)) {
53 53
             throw new FileNotFoundException("File {file} could not be found", array(
54 54
                 'file' => $file
55 55
             ));
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         $this->handle = fopen($file, "rb");
59 59
 
60
-        if (! $this->ready()) {
60
+        if (!$this->ready()) {
61 61
             throw new StreamException("Could not open {file} for reading", array(
62 62
                 'file' => $file
63 63
             ));
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function ready():bool
100 100
     {
101
-        return is_resource($this->handle) && ! feof($this->handle);
101
+        return is_resource($this->handle) && !feof($this->handle);
102 102
     }
103 103
 
104 104
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function read($length = 1, $offset = null):string
109 109
     {
110
-        if (! $this->ready()) {
110
+        if (!$this->ready()) {
111 111
             throw new StreamException("Stream is not ready!");
112 112
         }
113 113
 
Please login to merge, or discard this patch.
src/Generics/Streams/FileOutputStream.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
     	$mode = "wb";
73 73
     	
74 74
     	if (file_exists($file)) {
75
-    		if (! $append) {
75
+    		if (!$append) {
76 76
     			throw new FileExistsException("File $file already exists!");
77 77
     		}
78 78
     		
79
-    		if (! is_writable($file)) {
79
+    		if (!is_writable($file)) {
80 80
     			throw new NoAccessException("Cannot write to file $file");
81 81
     		}
82 82
     		$mode = "ab";
83 83
     	} else {
84
-    		if (! is_writable(dirname($file))) {
84
+    		if (!is_writable(dirname($file))) {
85 85
     			throw new NoAccessException("Cannot write to file {file}", array(
86 86
     					'file' => $file
87 87
     			));
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     	
91 91
     	$this->handle = fopen($file, $mode);
92 92
     	
93
-    	if (! $this->ready()) {
93
+    	if (!$this->ready()) {
94 94
     		throw new StreamException("Could not open {file} for writing", array(
95 95
     				'file' => $file
96 96
     		));
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function write($buffer)
131 131
     {
132
-        if (! $this->ready()) {
132
+        if (!$this->ready()) {
133 133
             throw new StreamException("Stream is not open!");
134 134
         }
135 135
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      */
170 170
     public function count():int
171 171
     {
172
-        if (! $this->ready()) {
172
+        if (!$this->ready()) {
173 173
             throw new StreamException("Stream is not open!");
174 174
         }
175 175
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function flush()
203 203
     {
204
-        if (! $this->ready()) {
204
+        if (!$this->ready()) {
205 205
             throw new StreamException("Stream is not open!");
206 206
         }
207 207
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 			$this->close();
261 261
 			$this->open($this->fileName, $this->append);
262 262
 		}
263
-		catch(Exception $ex)
263
+		catch (Exception $ex)
264 264
 		{
265 265
 			throw new ResetException($ex->getMessage(), array(), $ex->getCode(), $ex);
266 266
 		}
Please login to merge, or discard this patch.
src/Generics/Util/UrlParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
     {
30 30
         $parts = parse_url($url);
31 31
 
32
-        if (! Arrays::hasElement($parts, 'host') ) {
32
+        if (!Arrays::hasElement($parts, 'host')) {
33 33
             throw new InvalidUrlException('This URL does not contain a host part');
34 34
         }
35
-        if (! Arrays::hasElement($parts, 'scheme') ) {
35
+        if (!Arrays::hasElement($parts, 'scheme')) {
36 36
             throw new InvalidUrlException('This URL does not contain a scheme part');
37 37
         }
38 38
 
Please login to merge, or discard this patch.