@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | /** |
| 300 | 300 | * Fetch a protected ressource |
| 301 | 301 | * |
| 302 | - * @param string $protected_ressource_url Protected resource URL |
|
| 302 | + * @param string $protected_resource_url Protected resource URL |
|
| 303 | 303 | * @param array $parameters Array of parameters |
| 304 | 304 | * @param string $http_method HTTP Method to use (POST, PUT, GET, HEAD, DELETE) |
| 305 | 305 | * @param array $http_headers HTTP headers |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | /** |
| 481 | 481 | * Converts the class name to camel case |
| 482 | 482 | * |
| 483 | - * @param mixed $grant_type the grant type |
|
| 483 | + * @param integer $grant_type the grant type |
|
| 484 | 484 | * @return string |
| 485 | 485 | */ |
| 486 | 486 | private function convertToCamelCase($grant_type) |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | use TYPO3\CMS\Extbase\Persistence\Repository; |
| 19 | 19 | use TYPO3\CMS\Extbase\Utility\DebuggerUtility; |
| 20 | 20 | |
| 21 | -class AccountRepository extends Repository { |
|
| 21 | +class AccountRepository extends Repository { |
|
| 22 | 22 | |
| 23 | 23 | // Order by BE sorting |
| 24 | 24 | protected $defaultOrderings = array( |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | 28 | |
| 29 | - public function initializeObject(){ |
|
| 29 | + public function initializeObject() { |
|
| 30 | 30 | /** @var $defaultQuerySettings \TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings */ |
| 31 | 31 | $defaultQuerySettings = $this->objectManager->get('TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings'); |
| 32 | 32 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | use TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject; |
| 19 | 19 | |
| 20 | -class Account extends AbstractDomainObject { |
|
| 20 | +class Account extends AbstractDomainObject { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var \string |
@@ -91,9 +91,9 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public function authenticationResponseAction(Account $account) |
| 93 | 93 | { |
| 94 | - if( $this->client->callHubic($account) ){ |
|
| 94 | + if ($this->client->callHubic($account)) { |
|
| 95 | 95 | $this->addFlashMessage('Token successfully added', 'Authentication request', \TYPO3\CMS\Core\Messaging\AbstractMessage::OK); |
| 96 | - }else { |
|
| 96 | + } else { |
|
| 97 | 97 | $this->addFlashMessage('Failed getting token please check client ID and client secret', 'Authentication request', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR); |
| 98 | 98 | } |
| 99 | 99 | $this->redirect('show', '', '', ['account' => $account]); |
@@ -70,13 +70,13 @@ |
||
| 70 | 70 | $params = array('code' => $code, 'redirect_uri' => $this->getRedirectUri($this->account)); |
| 71 | 71 | $response = $this->OAuth->getAccessToken(self::TOKEN_ENDPOINT, 'authorization_code', $params); |
| 72 | 72 | |
| 73 | - if( $response ){ |
|
| 74 | - if( $response['code'] == 200 ){ |
|
| 73 | + if ($response) { |
|
| 74 | + if ($response['code'] == 200) { |
|
| 75 | 75 | $this->account->setAccessToken($response['result']['access_token']); |
| 76 | 76 | $this->persistenceManager->update($this->account); |
| 77 | 77 | $this->persistenceManager->persistAll(); |
| 78 | 78 | return true; |
| 79 | - }else { |
|
| 79 | + } else { |
|
| 80 | 80 | return false; |
| 81 | 81 | // throw new \Exception('hubiC Api : '.implode(' ',$response['result'])); |
| 82 | 82 | } |