@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (is_array($config)) { |
| 61 | 61 | $config = new \Tight\Modules\Localize\LocalizeConfig($config); |
| 62 | 62 | } else if (!$config instanceof \Tight\Modules\Localize\LocalizeConfig) { |
| 63 | - throw new \InvalidArgumentException("Argument 1 passed to " . get_class($this) . " must be an array or an instance of Tight\Modules\Localize\LocalizeConfig"); |
|
| 63 | + throw new \InvalidArgumentException("Argument 1 passed to ".get_class($this)." must be an array or an instance of Tight\Modules\Localize\LocalizeConfig"); |
|
| 64 | 64 | } |
| 65 | 65 | parent::__construct("LocalizeModule"); |
| 66 | 66 | $this->setConfig($config); |
@@ -123,17 +123,17 @@ discard block |
||
| 123 | 123 | public function setLocale($locale) { |
| 124 | 124 | $this->locale = $locale; |
| 125 | 125 | $folder = \Tight\Utils::addTrailingSlash($this->getConfig()->resourceFolder); |
| 126 | - $fileName = $this->getConfig()->resourceFileName . $this->getConfig()->langSeparator . $locale . "." . $this->getConfig()->resourceFileType; |
|
| 127 | - $file = $folder . $fileName; |
|
| 126 | + $fileName = $this->getConfig()->resourceFileName.$this->getConfig()->langSeparator.$locale.".".$this->getConfig()->resourceFileType; |
|
| 127 | + $file = $folder.$fileName; |
|
| 128 | 128 | if (is_file($file)) { |
| 129 | 129 | $this->values = json_decode(file_get_contents($file), JSON_FORCE_OBJECT); |
| 130 | 130 | } else { |
| 131 | - $fileName = $this->getConfig()->resourceFileName . "." . $this->getConfig()->resourceFileType; |
|
| 132 | - $file = $folder . $fileName; |
|
| 131 | + $fileName = $this->getConfig()->resourceFileName.".".$this->getConfig()->resourceFileType; |
|
| 132 | + $file = $folder.$fileName; |
|
| 133 | 133 | if (is_file($file)) { |
| 134 | 134 | $this->values = json_decode(file_get_contents($file), JSON_FORCE_OBJECT); |
| 135 | 135 | } else { |
| 136 | - throw new \Tight\Modules\ModuleException("Resource file <strong>" . $file . "</strong> not found"); |
|
| 136 | + throw new \Tight\Modules\ModuleException("Resource file <strong>".$file."</strong> not found"); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | foreach ($files as $element) { |
| 157 | - $file = \Tight\Utils::getSlicedFile($directory . $element); |
|
| 157 | + $file = \Tight\Utils::getSlicedFile($directory.$element); |
|
| 158 | 158 | //Removes extension |
| 159 | 159 | $name = $file["name"]; |
| 160 | 160 | $explode = explode($this->getConfig()->langSeparator, $name); |