Completed
Push — master ( d9ce8e...d1dab5 )
by Cahyadi
02:47
created
src/Connection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		
70 70
 		$ch = $this->init;
71 71
         	curl_setopt_array($ch, ($this->options() + $this->options));
72
-        	if (!$this->content = curl_exec($ch)){
72
+        	if (!$this->content = curl_exec($ch)) {
73 73
         		throw new \Exception(
74 74
         			'CURL ERROR! Code: ' . curl_errno($ch) .
75 75
         		'	Message: ' . curl_error($ch)
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		//Grab url id in case $url is not valid as required url
119 119
 		$id = $url;
120 120
 		if (strpos($url, 'product') !== false) {
121
-    			$id = explode('product',$url);
121
+    			$id = explode('product', $url);
122 122
     			$id = end($id);
123 123
     			$id = explode('/', $id)[1];
124 124
 		}
Please login to merge, or discard this patch.
src/Parser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		date_default_timezone_set('Asia/Jakarta');
37 37
 		libxml_use_internal_errors(true);
38 38
 
39
-		if ($this->header['http_code'] != 200 ) {
39
+		if ($this->header['http_code'] != 200) {
40 40
 			throw new \Exception("URL not found!");
41 41
 		}
42 42
 
@@ -245,23 +245,23 @@  discard block
 block discarded – undo
245 245
 			$titleEntity = trim(explode(':', $nodeValue)[0]);
246 246
 			$content = explode(':', $nodeValue)[1];
247 247
 
248
-			if($titleEntity === 'terjual') {
248
+			if ($titleEntity === 'terjual') {
249 249
 				$content = trim($content);
250 250
 				$this->sold = explode(' ', $content)[0] + 0;
251 251
 			}
252 252
 			
253
-			if($titleEntity === 'lokasi') {
254
-				if(strpos($content, 'bisa cod') !== false) {
253
+			if ($titleEntity === 'lokasi') {
254
+				if (strpos($content, 'bisa cod') !== false) {
255 255
 					$this->cod = true;			
256 256
 				}
257 257
 			}
258 258
 			
259
-			if($titleEntity === 'last sundul') {
259
+			if ($titleEntity === 'last sundul') {
260 260
 				$product['bump'] = trim($content);
261 261
 				if (strpos(trim($content), 'ago') !== false) {
262 262
 					$bumpTime = explode(' ', trim($content));
263 263
     				$date = new \DateTime;
264
-    				$date->modify('- '.$bumpTime[0] . ' '. $bumpTime[1]);
264
+    				$date->modify('- ' . $bumpTime[0] . ' ' . $bumpTime[1]);
265 265
 
266 266
     				$this->bump = $date->format('Y-m-d H:i:s');
267 267
 				}
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 
119 119
 	private function getMethod($name)
120 120
 	{
121
-		foreach(get_class_methods($this) as $method) {
122
-			if(stripos($name, $method) !== false) {
121
+		foreach (get_class_methods($this) as $method) {
122
+			if (stripos($name, $method) !== false) {
123 123
 				return $method;
124 124
 			}
125 125
 		}
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 	private function getArgs($name)
131 131
 	{
132
-		foreach(get_object_vars($this) as $property => $value) {
132
+		foreach (get_object_vars($this) as $property => $value) {
133 133
 			if (stripos($property, $name) !== false) {
134 134
 				return $property;
135 135
 			}
Please login to merge, or discard this patch.