Passed
Push — master ( d858ea...f11f57 )
by IRFA
02:18
created
src/Core/Localization.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     */
19 19
 	private function lang()
20 20
 	{
21
-		if(!empty($this->region))
21
+		if (!empty($this->region))
22 22
 		{
23 23
 			return strtoupper($this->region);
24 24
 		}
@@ -39,19 +39,19 @@  discard block
 block discarded – undo
39 39
 	public function holidayData($array = true)
40 40
 	{
41 41
 		$published_file = __DIR__.'../../../../../../resources/irfa/php-hari-libur/'.$this->lang().'.json';
42
-		if(file_exists($published_file))
42
+		if (file_exists($published_file))
43 43
 		{
44 44
 			$file = $published_file;
45
-		} else{
45
+		} else {
46 46
 			$file = __DIR__.'../../Data/'.$this->lang().'.json';
47 47
 		}
48 48
 		
49 49
 		$this->checkFile($file);
50 50
 		$arr = file_get_contents($file);
51
-		if($this->isJson($arr))
51
+		if ($this->isJson($arr))
52 52
 		{
53
-    		return json_decode($arr,$array);
54
-		} else{
53
+    		return json_decode($arr, $array);
54
+		} else {
55 55
 			 throw new \Exception('Json data is invalid.');
56 56
 
57 57
 			 return false;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 	private function checkFile($file)
71 71
 	{
72
-		if(!file_exists($file))
72
+		if (!file_exists($file))
73 73
 		{
74 74
 			 throw new \Exception('Region "'.$this->lang().'" is not found.');
75 75
 			 return false;
Please login to merge, or discard this patch.