@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | if (is_array($config)) { |
44 | 44 | $config = new LocalizeConfig($config); |
45 | 45 | } else if (!is_a($config, "\Tight\Modules\Localize\LocalizeConfig")) { |
46 | - throw new \InvalidArgumentException("Argument 1 passed to " . get_class($this) . " must be an array or an instance of Tight\Modules\Localize\LocalizeConfig"); |
|
46 | + throw new \InvalidArgumentException("Argument 1 passed to ".get_class($this)." must be an array or an instance of Tight\Modules\Localize\LocalizeConfig"); |
|
47 | 47 | } |
48 | 48 | parent::__construct(); |
49 | 49 | $this->setConfig($config); |
@@ -79,17 +79,17 @@ discard block |
||
79 | 79 | public function setLocale($locale) { |
80 | 80 | $this->locale = $locale; |
81 | 81 | $folder = \Tight\Utils::addTrailingSlash($this->config->resourceFolder); |
82 | - $fileName = $this->config->resourceFileName . $this->config->langSeparator . $locale . "." . $this->config->resourceFileType; |
|
83 | - $file = $folder . $fileName; |
|
82 | + $fileName = $this->config->resourceFileName.$this->config->langSeparator.$locale.".".$this->config->resourceFileType; |
|
83 | + $file = $folder.$fileName; |
|
84 | 84 | if (is_file($file)) { |
85 | 85 | $this->values = json_decode(file_get_contents($file), JSON_FORCE_OBJECT); |
86 | 86 | } else { |
87 | - $fileName = $this->config->resourceFileName . "." . $this->config->resourceFileType; |
|
88 | - $file = $folder . $fileName; |
|
87 | + $fileName = $this->config->resourceFileName.".".$this->config->resourceFileType; |
|
88 | + $file = $folder.$fileName; |
|
89 | 89 | if (is_file($file)) { |
90 | 90 | $this->values = json_decode(file_get_contents($file), JSON_FORCE_OBJECT); |
91 | 91 | } else { |
92 | - throw new \Tight\Modules\ModuleException("Resource file <strong>" . $file . "</strong> not found"); |
|
92 | + throw new \Tight\Modules\ModuleException("Resource file <strong>".$file."</strong> not found"); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | } |
117 | 117 | foreach ($files as $element) { |
118 | - $file = \Tight\Utils::getSlicedFile($directory . $element); |
|
118 | + $file = \Tight\Utils::getSlicedFile($directory.$element); |
|
119 | 119 | //Removes extension |
120 | 120 | $name = $file["name"]; |
121 | 121 | $explode = explode($this->config->langSeparator, $name); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function testUtilsAddTrailingSlash() { |
74 | 74 | $path = "/etc/php5"; |
75 | 75 | $this->assertEquals("/etc/php5/", Utils::addTrailingSlash($path)); |
76 | - $this->assertEquals("/etc/php5/", Utils::addTrailingSlash($path . "/")); |
|
76 | + $this->assertEquals("/etc/php5/", Utils::addTrailingSlash($path."/")); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $pathUnx = "/var/htdocs"; |
85 | 85 | $this->assertEquals("C:/php/ext/", Utils::filterPath($pathWin)); |
86 | 86 | $this->assertEquals("/var/htdocs/", Utils::filterPath($pathUnx)); |
87 | - $this->assertEquals("/var/htdocs/", Utils::filterPath($pathUnx . "/")); |
|
87 | + $this->assertEquals("/var/htdocs/", Utils::filterPath($pathUnx."/")); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | /** |
99 | 99 | * @test |
100 | 100 | */ |
101 | - public function testUtilsGetSlicedFile(){ |
|
101 | + public function testUtilsGetSlicedFile() { |
|
102 | 102 | $expected = [ |
103 | 103 | "name"=>"UtilsTest", |
104 | 104 | "ext"=>"php" |