Passed
Push — master ( 8f9436...7c4a55 )
by Adrian Florin
02:56
created
src/Util/ErrorHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         if (is_null($level)) {
35 35
             $level = E_ALL;
36 36
         }
37
-        set_error_handler(function ($errorNumber, $errorMessage, $errorFile, $errorLine, $errorContext) {
37
+        set_error_handler(function($errorNumber, $errorMessage, $errorFile, $errorLine, $errorContext) {
38 38
             throw new IOException($errorMessage, $errorNumber);
39 39
         }, $level);
40 40
     }
Please login to merge, or discard this patch.
example/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once dirname(__FILE__) . '/../vendor/autoload.php';
2
+require_once dirname(__FILE__).'/../vendor/autoload.php';
3 3
 
4 4
 use NeedleProject\FileIo\File;
5 5
 use NeedleProject\FileIo\Content\Content;
6 6
 
7
-$filename = __DIR__ . DIRECTORY_SEPARATOR . 'my_first_file';
7
+$filename = __DIR__.DIRECTORY_SEPARATOR.'my_first_file';
8 8
 
9 9
 /**
10 10
  * Writing content to a file
11 11
  */
12 12
 $content = new Content('Hello world!');
13
-$file = new File(__DIR__ . DIRECTORY_SEPARATOR . 'my_first_file');
13
+$file = new File(__DIR__.DIRECTORY_SEPARATOR.'my_first_file');
14 14
 if (true === $file->write($content)) {
15 15
     echo "I wrote my first file!\n";
16 16
 }
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
  * Verifying file
20 20
  */
21 21
 if (true === $file->exists()) {
22
-    echo sprintf('File %s exists on disk!', $filename) . "\n";
22
+    echo sprintf('File %s exists on disk!', $filename)."\n";
23 23
 }
24 24
 
25 25
 if (true === $file->isWritable()) {
26
-    echo sprintf('File %s can be written!', $filename) . "\n";
26
+    echo sprintf('File %s can be written!', $filename)."\n";
27 27
 }
28 28
 
29 29
 if (true === $file->isReadable()) {
30
-    echo sprintf('File %s can be read!', $filename) . "\n";
30
+    echo sprintf('File %s can be read!', $filename)."\n";
31 31
 }
32 32
 
33 33
 /**
@@ -41,5 +41,5 @@  discard block
 block discarded – undo
41 41
  * Delete the file
42 42
  */
43 43
 if (true === $file->delete()) {
44
-    echo "The file was successfully deleted!" . "\n";
44
+    echo "The file was successfully deleted!"."\n";
45 45
 }
Please login to merge, or discard this patch.
src/Helper/PathHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function normalizePathSeparator(string $path): string
34 34
     {
35 35
         $path = preg_replace('#(\\\|\/)#', DIRECTORY_SEPARATOR, $path);
36
-        return preg_replace('#' . DIRECTORY_SEPARATOR . '{2,}#', DIRECTORY_SEPARATOR, $path);
36
+        return preg_replace('#'.DIRECTORY_SEPARATOR.'{2,}#', DIRECTORY_SEPARATOR, $path);
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
src/File.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             );
77 77
         }
78 78
         list($this->name, $this->extension) = $pathHelper->splitFilename($filename);
79
-        $this->hasExtension = (bool)$this->extension;
79
+        $this->hasExtension = (bool) $this->extension;
80 80
     }
81 81
 
82 82
     /**
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         if (false === $this->hasExtension()) {
207 207
             return $this->name;
208 208
         }
209
-        return $this->name . static::EXTENSION_SEPARATOR . $this->extension;
209
+        return $this->name.static::EXTENSION_SEPARATOR.$this->extension;
210 210
     }
211 211
 
212 212
     /**
Please login to merge, or discard this patch.