Passed
Pull Request — master (#1151)
by Aleksei
12:32
created
src/Boot/src/Memory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function __construct(
20 20
         string $directory,
21 21
         private readonly FilesInterface $files
22
-    ) {
22
+    ){
23 23
         $this->directory = \rtrim($directory, '/');
24 24
     }
25 25
 
@@ -30,29 +30,29 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $filename = $this->getFilename($section);
32 32
 
33
-        if (!\file_exists($filename)) {
33
+        if (!\file_exists($filename)){
34 34
             return null;
35 35
         }
36 36
 
37 37
         $fp = false;
38 38
         $lock = false;
39 39
 
40
-        try {
40
+        try{
41 41
             $fp = \fopen($filename, 'r');
42
-            if ($fp === false) {
42
+            if ($fp === false){
43 43
                 return null;
44 44
             }
45 45
 
46 46
             $lock = \flock($fp, \LOCK_SH | \LOCK_NB);
47 47
 
48
-            if ($lock === false) {
48
+            if ($lock === false){
49 49
                 return null;
50 50
             }
51 51
 
52 52
             return include($filename);
53
-        } catch (\Throwable) {
53
+        }catch (\Throwable){
54 54
             return null;
55
-        } finally {
55
+        }finally{
56 56
             $lock === false or \flock($fp, \LOCK_UN);
57 57
             $fp === false or \fclose($fp);
58 58
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->files->write(
64 64
             $this->getFilename($section),
65
-            '<?php return ' . \var_export($data, true) . ';',
65
+            '<?php return '.\var_export($data, true).';',
66 66
             FilesInterface::RUNTIME,
67 67
             true
68 68
         );
Please login to merge, or discard this patch.