Passed
Push — master ( c4e028...ac3303 )
by 世昌
02:20
created
nebula/src/application/filesystem/FileHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public static function delete(string $filename):bool
27 27
     {
28
-        if (($path=Path::format($filename)) !== null) {
28
+        if (($path = Path::format($filename)) !== null) {
29 29
             if (!is_writable($path)) {
30 30
                 return false;
31 31
             }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */    
44 44
     public static function move(string $src, string $dest):bool
45 45
     {
46
-        if (($path=Path::format($src)) !== null && is_writable(dirname($dest))) {
46
+        if (($path = Path::format($src)) !== null && is_writable(dirname($dest))) {
47 47
             return rename($path, $dest);
48 48
         }
49 49
         return false;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public static function copy(string $src, string $dest):bool
60 60
     {
61
-        if (($path=Path::format($src)) !== null && is_writable(dirname($dest))) {
61
+        if (($path = Path::format($src)) !== null && is_writable(dirname($dest))) {
62 62
             return copy($path, $dest);
63 63
         }
64 64
         return false;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function put(string $filename, string $content, int $flags = 0):bool
76 76
     {
77
-        if (is_writeable(dirname($filename)) && ($path=Path::format($filename)) !== null) {
77
+        if (is_writeable(dirname($filename)) && ($path = Path::format($filename)) !== null) {
78 78
             return file_put_contents($path, $content, $flags) > 0;
79 79
         }
80 80
         return false;
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
      * @param string $name
87 87
      * @return string|null
88 88
      */
89
-    public function get(string $filename):?string
89
+    public function get(string $filename): ?string
90 90
     {
91
-        if (is_readable($filename) && ($path=Path::format($filename)) !== null) {
91
+        if (is_readable($filename) && ($path = Path::format($filename)) !== null) {
92 92
             return file_get_contents($path);
93 93
         }
94 94
         return null;
Please login to merge, or discard this patch.