@@ -72,18 +72,18 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function makeRequest($http_verb, $method, $args = array(), $timeout = self::TIMEOUT) |
| 74 | 74 | { |
| 75 | - $url = $this->api_endpoint . '/' . $method; |
|
| 75 | + $url = $this->api_endpoint.'/'.$method; |
|
| 76 | 76 | |
| 77 | 77 | $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout); |
| 78 | 78 | |
| 79 | 79 | $httpHeader = array( |
| 80 | 80 | 'Content-type: application/json', |
| 81 | - 'Authorization: Bearer '. $this->api_token |
|
| 81 | + 'Authorization: Bearer '.$this->api_token |
|
| 82 | 82 | ); |
| 83 | 83 | |
| 84 | 84 | |
| 85 | 85 | if (isset($args["language"])) { |
| 86 | - $httpHeader[] = "Accept-Language: " . $args["language"]; |
|
| 86 | + $httpHeader[] = "Accept-Language: ".$args["language"]; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | if ($http_verb === 'put') { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | case 'GET': |
| 112 | 112 | $query = http_build_query($args, '', '&'); |
| 113 | - curl_setopt($ch, CURLOPT_URL, $url . '?' . $query); |
|
| 113 | + curl_setopt($ch, CURLOPT_URL, $url.'?'.$query); |
|
| 114 | 114 | break; |
| 115 | 115 | |
| 116 | 116 | case 'DELETE': |
@@ -339,11 +339,11 @@ discard block |
||
| 339 | 339 | private function findHTTPStatus($response, $formattedResponse) |
| 340 | 340 | { |
| 341 | 341 | if (!empty($response['headers']) && isset($response['headers']['http_code'])) { |
| 342 | - return (int)$response['headers']['http_code']; |
|
| 342 | + return (int) $response['headers']['http_code']; |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | if (!empty($response['body']) && isset($formattedResponse['status'])) { |
| 346 | - return (int)$formattedResponse['status']; |
|
| 346 | + return (int) $formattedResponse['status']; |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | return 418; |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | * @param mixed $Slack |
| 14 | 14 | * @return void |
| 15 | 15 | */ |
| 16 | - public function __construct( \Sreedev\Slack\Slack $Slack, $method, $data) |
|
| 16 | + public function __construct(\Sreedev\Slack\Slack $Slack, $method, $data) |
|
| 17 | 17 | { |
| 18 | 18 | parent::__construct($Slack, $method, $data, $this->functionSet); |
| 19 | 19 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | { |
| 38 | 38 | $this->Slack = $Slack; |
| 39 | 39 | $this->setfunctionSet($functionSet); |
| 40 | - $json = file_get_contents(__DIR__. '/Slack.json'); |
|
| 40 | + $json = file_get_contents(__DIR__.'/Slack.json'); |
|
| 41 | 41 | $this->endPoints = json_decode($json, true); |
| 42 | 42 | $this->sendRequest($method, $data); |
| 43 | 43 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function register() |
| 35 | 35 | { |
| 36 | - $this->app->singleton('slack', function($app){ |
|
| 36 | + $this->app->singleton('slack', function($app) { |
|
| 37 | 37 | return new Slack(config("slack.SLACK_API_TOKEN")); |
| 38 | 38 | }); |
| 39 | 39 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'slack'); |