@@ -19,7 +19,7 @@ discard block |
||
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,17 +30,17 @@ discard block |
||
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 | - try { |
|
37 | + try{ |
|
38 | 38 | $fp = \fopen($filename, 'r'); |
39 | - if ($fp === false) { |
|
39 | + if ($fp === false){ |
|
40 | 40 | return null; |
41 | 41 | } |
42 | 42 | |
43 | - if (!\flock($fp, \LOCK_SH | \LOCK_NB)) { |
|
43 | + if (!\flock($fp, \LOCK_SH | \LOCK_NB)){ |
|
44 | 44 | \fclose($fp); |
45 | 45 | return null; |
46 | 46 | } |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | $data = include($filename); |
49 | 49 | |
50 | 50 | \flock($fp, \LOCK_UN); |
51 | - } catch (\Throwable) { |
|
51 | + }catch (\Throwable){ |
|
52 | 52 | return null; |
53 | - } finally { |
|
54 | - if (isset($fp)) { |
|
53 | + }finally{ |
|
54 | + if (isset($fp)){ |
|
55 | 55 | \fclose($fp); |
56 | 56 | } |
57 | 57 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $this->files->write( |
65 | 65 | $this->getFilename($section), |
66 | - '<?php return ' . \var_export($data, true) . ';', |
|
66 | + '<?php return '.\var_export($data, true).';', |
|
67 | 67 | FilesInterface::RUNTIME, |
68 | 68 | true |
69 | 69 | ); |