Passed
Push — master ( ee1a4c...6c21de )
by IRFA
01:34
created
src/Core/DateHelpers.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
     public function convertDate($date)
11 11
     {
12
-    	return date('Y-m-d',strtotime($date));
12
+    	return date('Y-m-d', strtotime($date));
13 13
     }
14 14
 
15 15
     public function convertToDayName($date)
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 
23 23
 	public function greaterThanDate($neddle, $haystack)
24 24
 	{
25
-		$b =[];
25
+		$b = [];
26 26
 		foreach ($haystack as $k => $v) {
27
-			if(strtotime($k) > strtotime($neddle)){
27
+			if (strtotime($k) > strtotime($neddle)) {
28 28
 				$b[] = (object) ['date' => $k, 'description' => $v];
29 29
 			}
30 30
 		}
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 
36 36
 	public function lessThanDate($neddle, $haystack)
37 37
 	{
38
-		$b =[];
38
+		$b = [];
39 39
 		foreach ($haystack as $k => $v) {
40
-			if(strtotime($k) < strtotime($neddle)){
40
+			if (strtotime($k) < strtotime($neddle)) {
41 41
 				$b[] = (object) ['date' => $k, 'description' => $v];
42 42
 			}
43 43
 		}
Please login to merge, or discard this patch.
src/Core/Libur.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$dt = new DateHelpers();
44 44
 
45
-		$days = ['Saturday','Sunday'];
45
+		$days = ['Saturday', 'Sunday'];
46 46
 		$day = $dt->convertToDayName($date);
47
-		if(in_array($day, $days))
47
+		if (in_array($day, $days))
48 48
 		{
49 49
 			return true;
50 50
 		}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 	protected function checkOffDay($date)
62 62
 	{
63
-		if($this->checkHoliday($date) || $this->checkWeekend($date))
63
+		if ($this->checkHoliday($date) || $this->checkWeekend($date))
64 64
 		{
65 65
 			return true;
66 66
 		} 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	protected function gettingInfo($date)
71 71
 	{
72 72
 		$this->populateHoliday();
73
-		if(array_key_exists($date, $this->holidays))
73
+		if (array_key_exists($date, $this->holidays))
74 74
 		{
75 75
 			return $this->holidays[$date];
76 76
 		} 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	private function populateHoliday()
81 81
 	{
82 82
 		$get_holidays = $this->fetchHolidays();
83
-		foreach($get_holidays as $h)
83
+		foreach ($get_holidays as $h)
84 84
 		{
85 85
 			$this->holidays[$h->date] = $h->description;
86 86
 		}
Please login to merge, or discard this patch.
src/Core/ConfigLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     */
15 15
 	public function region()
16 16
 	{
17
-		if(file_exists(__DIR__.'../../../../../../config/irfa/hari_libur.php') && function_exists('app')){
17
+		if (file_exists(__DIR__.'../../../../../../config/irfa/hari_libur.php') && function_exists('app')) {
18 18
 
19 19
 			return strtoupper(config('irfa.hari_libur.region'));
20 20
 
Please login to merge, or discard this patch.
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/data-libur-nasional/'.$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.
src/Func/HariLibur.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     */
120 120
     private function checkDate()
121 121
     {
122
-        if(empty($this->date))
122
+        if (empty($this->date))
123 123
         {
124 124
             throw new \Exception('Parameter date must be provided.');
125 125
             return false;
Please login to merge, or discard this patch.
src/HariLiburServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class HariLiburServiceProvider extends ServiceProvider
8 8
 {
9
-    protected $namespace='AppLicenseServer\Controllers';
9
+    protected $namespace = 'AppLicenseServer\Controllers';
10 10
     /**
11 11
      * Register services.
12 12
      *
Please login to merge, or discard this patch.