@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | * Tap.az parser |
4 | 4 | * 2018. |
5 | 5 | */ |
6 | -require_once __DIR__.'/vendor/autoload.php'; |
|
7 | -require_once __DIR__.'/TapTap.php'; |
|
6 | +require_once __DIR__ . '/vendor/autoload.php'; |
|
7 | +require_once __DIR__ . '/TapTap.php'; |
|
8 | 8 | |
9 | 9 | header('Content-Type: application/json'); |
10 | 10 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | do { |
33 | 33 | if (count($tap->ads) > 0) { |
34 | 34 | foreach ($tap->ads as $adURL) { |
35 | - $tap->getAdDetails('https://tap.az'.$adURL); |
|
35 | + $tap->getAdDetails('https://tap.az' . $adURL); |
|
36 | 36 | |
37 | 37 | echo json_encode($tap->ad); |
38 | 38 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | // get latest ad |
23 | 23 | $request = new Request('GET', $url); |
24 | - $promise = $client->sendAsync($request)->then(function ($response) { |
|
24 | + $promise = $client->sendAsync($request)->then(function($response) { |
|
25 | 25 | $html = $response->getBody()->getContents(); |
26 | 26 | |
27 | 27 | $dom = HtmlDomParser::str_get_html($html); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | // get ads |
45 | 45 | $request = new Request('GET', $url); |
46 | - $promise = $client->sendAsync($request)->then(function ($response) { |
|
46 | + $promise = $client->sendAsync($request)->then(function($response) { |
|
47 | 47 | $html = $response->getBody()->getContents(); |
48 | 48 | |
49 | 49 | $dom = HtmlDomParser::str_get_html($html); |