Skip to content

Commit

Permalink
Фикс
Browse files Browse the repository at this point in the history
  • Loading branch information
rmrevin committed Mar 29, 2016
1 parent c9dd908 commit 8d22a0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Auth/LoginPasswordSecureAuth.php
Expand Up @@ -73,7 +73,7 @@ public function getApiId()
/**
* @return string
*/
protected function authGetToken()
public function authGetToken()
{
$cache = $this->cache;

Expand All @@ -93,7 +93,7 @@ protected function authGetToken()
/**
* @return string
*/
protected function requestAuthToken()
private function requestAuthToken()
{
return $this->getContext()
->getClient()
Expand Down
2 changes: 1 addition & 1 deletion Cache/FileCache.php
Expand Up @@ -17,7 +17,7 @@ class FileCache implements CacheInterface
public function __construct($path = null)
{
$this->path = $path = empty($path)
? implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'runtime', 'cache'])
? implode(DIRECTORY_SEPARATOR, [sys_get_temp_dir(), 'cache'])
: $path;

if (!is_dir($path)) {
Expand Down
12 changes: 6 additions & 6 deletions Client/Client.php
Expand Up @@ -22,14 +22,14 @@ class Client implements ClientInterface
*/
public function request($method, $params = [])
{
$Client = new \GuzzleHttp\Client();
$client = new \GuzzleHttp\Client();

$Response = $Client->post($this->getUrl($method), ['query' => $params]);
$response = $client->post($this->getUrl($method), ['query' => $params]);

if ($Response->getStatusCode() === 200) {
return (string)$Response->getBody();
if ($response->getStatusCode() === 200) {
return (string)$response->getBody();
} else {
throw new Exception(sprintf('Sms.ru problem. Status code is %s', $Response->getStatusCode()), $Response->getStatusCode());
throw new Exception(sprintf('Sms.ru problem. Status code is %s', $response->getStatusCode()), $response->getStatusCode());
}
}

Expand All @@ -38,7 +38,7 @@ public function request($method, $params = [])
*
* @return string
*/
protected function getUrl($method)
private function getUrl($method)
{
return strtr($this->baseUrl, ['{method}' => $method]);
}
Expand Down
2 changes: 0 additions & 2 deletions runtime/.gitignore

This file was deleted.

0 comments on commit 8d22a0b

Please sign in to comment.