@@ -62,16 +62,16 @@ |
||
| 62 | 62 | CURLOPT_HTTPHEADER, |
| 63 | 63 | array( |
| 64 | 64 | 'Content-Type: application/json', |
| 65 | - 'Content-Length: ' . strlen($data) |
|
| 65 | + 'Content-Length: '.strlen($data) |
|
| 66 | 66 | ) |
| 67 | 67 | ); |
| 68 | 68 | $return = curl_exec($ch); |
| 69 | 69 | $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
| 70 | 70 | |
| 71 | - if ($code >= 500) { |
|
| 71 | + if ($code>=500) { |
|
| 72 | 72 | throw new UnavailableException('The API could not be reached.'); |
| 73 | 73 | } |
| 74 | - if ($code >= 400) { |
|
| 74 | + if ($code>=400) { |
|
| 75 | 75 | throw new UnavailableException('There has been an error reaching the API.'); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function readFile($filePath) |
| 23 | 23 | { |
| 24 | - if(!file_exists($filePath)) { |
|
| 24 | + if (!file_exists($filePath)) { |
|
| 25 | 25 | throw new Exception("File not found!"); |
| 26 | 26 | } |
| 27 | 27 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function getIdentifier($key) |
| 35 | 35 | { |
| 36 | - $id = sha1(self::CACHE_ID_PREFIX . $key); |
|
| 36 | + $id = sha1(self::CACHE_ID_PREFIX.$key); |
|
| 37 | 37 | return $id; |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace HDNET\OnpageIntegration\Exception; |
| 4 | 4 | |
| 5 | -class ApiErrorException extends \Exception{ |
|
| 5 | +class ApiErrorException extends \Exception { |
|
| 6 | 6 | |
| 7 | 7 | } |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace HDNET\OnpageIntegration\Exception; |
| 4 | 4 | |
| 5 | -class UnavailableException extends \Exception{ |
|
| 5 | +class UnavailableException extends \Exception { |
|
| 6 | 6 | |
| 7 | 7 | } |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace HDNET\OnpageIntegration\Exception; |
| 4 | 4 | |
| 5 | -class UnknownApiCallException extends \Exception{ |
|
| 5 | +class UnknownApiCallException extends \Exception { |
|
| 6 | 6 | |
| 7 | 7 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | protected function getApiCallsArray(){ |
| 51 | 51 | $this->fileService = GeneralUtility::makeInstance(FileService::class); |
| 52 | 52 | $apiCallData = $this->fileService->readFile( |
| 53 | - PATH_site . 'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json' |
|
| 53 | + PATH_site . 'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json' |
|
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | 56 | return json_decode($apiCallData, true); |
@@ -40,17 +40,17 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * @return array |
| 42 | 42 | */ |
| 43 | - public function getAllConfigurationData(){ |
|
| 43 | + public function getAllConfigurationData() { |
|
| 44 | 44 | return $this->getApiCallsArray(); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * @return array |
| 49 | 49 | */ |
| 50 | - protected function getApiCallsArray(){ |
|
| 50 | + protected function getApiCallsArray() { |
|
| 51 | 51 | $this->fileService = GeneralUtility::makeInstance(FileService::class); |
| 52 | - $apiCallData = $this->fileService->readFile( |
|
| 53 | - PATH_site . 'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json' |
|
| 52 | + $apiCallData = $this->fileService->readFile( |
|
| 53 | + PATH_site.'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json' |
|
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | 56 | return json_decode($apiCallData, true); |
@@ -7,8 +7,6 @@ |
||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | use HDNET\OnpageIntegration\Service\AbstractService; |
| 10 | -use TYPO3\CMS\Core\Utility\GeneralUtility; |
|
| 11 | -use TYPO3\CMS\Extbase\Utility\DebuggerUtility; |
|
| 12 | 10 | |
| 13 | 11 | class ProgressService extends AbstractService |
| 14 | 12 | { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function SeoAction($call) |
| 40 | 40 | { |
| 41 | - $apiCallString = 'zoom_' . $call . '_table'; |
|
| 41 | + $apiCallString = 'zoom_'.$call.'_table'; |
|
| 42 | 42 | |
| 43 | 43 | $table = $this->loader->load($apiCallString); |
| 44 | 44 | $this->view->assignMultiple([ |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function ContentAction($call) |
| 54 | 54 | { |
| 55 | - $apiCallString = 'zoom_' . $call . '_table'; |
|
| 55 | + $apiCallString = 'zoom_'.$call.'_table'; |
|
| 56 | 56 | |
| 57 | 57 | $table = $this->loader->load($apiCallString); |
| 58 | 58 | $this->view->assignMultiple([ |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function TechnicalAction($call) |
| 68 | 68 | { |
| 69 | - $apiCallString = 'zoom_' . $call . '_table'; |
|
| 69 | + $apiCallString = 'zoom_'.$call.'_table'; |
|
| 70 | 70 | |
| 71 | 71 | $table = $this->loader->load($apiCallString); |
| 72 | 72 | $this->view->assignMultiple([ |