@@ -57,7 +57,7 @@ |
||
| 57 | 57 | OAuth\Consumer $consumer, |
| 58 | 58 | OAuth\HttpClient $httpClient, |
| 59 | 59 | Configuration $config |
| 60 | - ){ |
|
| 60 | + ) { |
|
| 61 | 61 | $this->consumer = $consumer; |
| 62 | 62 | $this->httpClient = $httpClient; |
| 63 | 63 | $this->config = $config; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function limitResults($maxResults) |
| 106 | 106 | { |
| 107 | - $this->maxResults = (int)$maxResults; |
|
| 107 | + $this->maxResults = (int) $maxResults; |
|
| 108 | 108 | |
| 109 | 109 | return $this; |
| 110 | 110 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | public function valid() |
| 119 | 119 | { |
| 120 | 120 | return isset($this->resources[$this->pageCursor][$this->itemCursor]) |
| 121 | - && ! $this->loadedMaxResults(); |
|
| 121 | + && !$this->loadedMaxResults(); |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | // Get all request parameters |
| 169 | 169 | $params = $this->responses[$this->pageCursor]->request->getParameters(); |
| 170 | 170 | // Get last record |
| 171 | - $current = Nette\Utils\ArrayHash::from($this->resources[$this->pageCursor][$this->itemCursor-1]); |
|
| 171 | + $current = Nette\Utils\ArrayHash::from($this->resources[$this->pageCursor][$this->itemCursor - 1]); |
|
| 172 | 172 | // And set maximum ID |
| 173 | 173 | $params['max_id'] = $current->id; |
| 174 | 174 | // Get requested path |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | public static function register(Nette\Configurator $config, $extensionName = 'twitter') |
| 76 | 76 | { |
| 77 | - $config->onCompile[] = function (Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 77 | + $config->onCompile[] = function(Nette\Configurator $config, Nette\DI\Compiler $compiler) use ($extensionName) { |
|
| 78 | 78 | $compiler->addExtension($extensionName, new TwitterExtension()); |
| 79 | 79 | }; |
| 80 | 80 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | Configuration $config, |
| 73 | 73 | SessionStorage $session, |
| 74 | 74 | Nette\Http\IRequest $httpRequest |
| 75 | - ){ |
|
| 75 | + ) { |
|
| 76 | 76 | parent::__construct($consumer, $httpClient, $config); |
| 77 | 77 | |
| 78 | 78 | $this->session = $session; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | // Complete request params |
| 270 | 270 | $params = [ |
| 271 | - 'oauth_callback' => $callback ?:$this->consumer->getCallbackUrl(), |
|
| 271 | + 'oauth_callback' => $callback ?: $this->consumer->getCallbackUrl(), |
|
| 272 | 272 | ]; |
| 273 | 273 | |
| 274 | 274 | $response = $this->httpClient->makeRequest( |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | $url->setPath($path); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | - $url->appendQuery(array_map(function ($param) { |
|
| 79 | + $url->appendQuery(array_map(function($param) { |
|
| 80 | 80 | return $param instanceof Http\UrlScript ? (string) $param : $param; |
| 81 | 81 | }, $params)); |
| 82 | 82 | |