Completed
Push — master ( f8fced...5579ff )
by Alejandro
03:02
created
src/Modules/Localize/Localize.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
tests/UtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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"
Please login to merge, or discard this patch.