@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | public function onRequest(Application $application, Request $request): void { |
32 | 32 | $locale = $request->getParameter($this->param); |
33 | - if($request->method === Request::FORWARD AND is_null($locale)) { |
|
33 | + if($request->method === Request::FORWARD and is_null($locale)) { |
|
34 | 34 | return; |
35 | 35 | } |
36 | 36 | $this->request = $request; |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | public function setFolders(array $folders) { |
82 | 82 | foreach($folders as $folder) { |
83 | 83 | if(!is_dir($folder)) { |
84 | - throw new InvalidFolderException("Folder $folder does not exist."); |
|
84 | + throw new InvalidFolderException("folder $folder does not exist."); |
|
85 | 85 | } |
86 | 86 | $this->folders[] = $folder; |
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
90 | 90 | protected function addResource(string $filename, string $domain): void { |
91 | - if(!isset($this->resources[$domain]) OR !in_array($filename, $this->resources[$domain])) { |
|
91 | + if(!isset($this->resources[$domain]) or !in_array($filename, $this->resources[$domain])) { |
|
92 | 92 | $this->resources[$domain][] = $filename; |
93 | 93 | } |
94 | 94 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $lang = []; |
120 | 120 | $filename = "$name.$this->lang.$extension"; |
121 | 121 | $filename = str_replace($defaultFilename, $filename, $file->getPathname()); |
122 | - if($this->lang != $defaultLang AND is_file($filename)) { |
|
122 | + if($this->lang != $defaultLang and is_file($filename)) { |
|
123 | 123 | $lang = $this->parseFile($filename); |
124 | 124 | $this->addResource($filename, $name); |
125 | 125 | } |