@@ -72,8 +72,8 @@ |
||
72 | 72 | /** @var \HDNET\OnpageIntegration\Domain\Model\Configuration $configuration */ |
73 | 73 | $configuration = $configurationRepository->findByUid(1); |
74 | 74 | |
75 | - $apiCallTable = 'zoom_' . $section . '_' . $call . '_table'; |
|
76 | - $apiCallGraph = 'zoom_' . $section . '_' . $call . '_graph'; |
|
75 | + $apiCallTable = 'zoom_'.$section.'_'.$call.'_table'; |
|
76 | + $apiCallGraph = 'zoom_'.$section.'_'.$call.'_graph'; |
|
77 | 77 | |
78 | 78 | $this->view->assignMultiple([ |
79 | 79 | 'moduleName' => TitleUtility::makeSubTitle($section), |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | { |
24 | 24 | $loader = GeneralUtility::makeInstance(\HDNET\OnpageIntegration\Loader\ApiResultLoader::class); |
25 | 25 | |
26 | - for ($i = 0; $i < count($metaDataArray[0]); $i++) { |
|
26 | + for ($i = 0; $i<count($metaDataArray[0]); $i++) { |
|
27 | 27 | |
28 | - $graphDataArray = $loader->load('zoom_' . $section . '_' . $i . '_graph'); |
|
28 | + $graphDataArray = $loader->load('zoom_'.$section.'_'.$i.'_graph'); |
|
29 | 29 | $errorReportyKey = $metaDataArray[0][$i]['errors']; |
30 | 30 | |
31 | 31 | $metaDataArray[0][$i]['errors'] = self::errorReport($graphDataArray, $errorReportyKey); |
@@ -41,19 +41,19 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @return int |
43 | 43 | */ |
44 | - protected static function errorReport($graphApiCallResult,$errorReportKey) { |
|
44 | + protected static function errorReport($graphApiCallResult, $errorReportKey) { |
|
45 | 45 | $totalErrors = 0; |
46 | 46 | |
47 | - foreach($graphApiCallResult as $element) { |
|
47 | + foreach ($graphApiCallResult as $element) { |
|
48 | 48 | |
49 | - if(in_array('sum', $errorReportKey)) { |
|
50 | - if(in_array($errorReportKey['hidden'], $element)) { |
|
49 | + if (in_array('sum', $errorReportKey)) { |
|
50 | + if (in_array($errorReportKey['hidden'], $element)) { |
|
51 | 51 | continue; |
52 | 52 | } |
53 | 53 | $totalErrors += $element['count']; |
54 | 54 | } |
55 | 55 | |
56 | - if(in_array($errorReportKey['show'], $element)) { |
|
56 | + if (in_array($errorReportKey['show'], $element)) { |
|
57 | 57 | $totalErrors += $element['count']; |
58 | 58 | } |
59 | 59 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | if ($entry === false) { |
47 | 47 | try { |
48 | 48 | $entry = $this->dataService->getApiResult($key); |
49 | - }catch (ApiErrorException $e) { |
|
49 | + } catch (ApiErrorException $e) { |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | $this->persister->persist($entry, $key); |
@@ -46,7 +46,7 @@ |
||
46 | 46 | if ($entry === false) { |
47 | 47 | try { |
48 | 48 | $entry = $this->dataService->getApiResult($key); |
49 | - }catch (ApiErrorException $e) { |
|
49 | + } catch (ApiErrorException $e) { |
|
50 | 50 | |
51 | 51 | } |
52 | 52 | $this->persister->persist($entry, $key); |
@@ -79,7 +79,7 @@ |
||
79 | 79 | foreach ($keys as $key) { |
80 | 80 | try { |
81 | 81 | $results[$key] = $this->getApiResult($key); |
82 | - }catch (ApiErrorException $e) { |
|
82 | + } catch (ApiErrorException $e) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | foreach ($keys as $key) { |
80 | 80 | try { |
81 | 81 | $results[$key] = $this->getApiResult($key); |
82 | - }catch (ApiErrorException $e) { |
|
82 | + } catch (ApiErrorException $e) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $this->checkForCurl(); |
28 | 28 | |
29 | 29 | return $this->send($json); |
30 | - }catch (UnavailableException $e) { |
|
30 | + } catch (UnavailableException $e) { |
|
31 | 31 | |
32 | 32 | } |
33 | 33 | } |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | CURLOPT_HTTPHEADER, |
67 | 67 | array( |
68 | 68 | 'Content-Type: application/json', |
69 | - 'Content-Length: ' . strlen($data) |
|
69 | + 'Content-Length: '.strlen($data) |
|
70 | 70 | ) |
71 | 71 | ); |
72 | 72 | $return = curl_exec($ch); |
73 | 73 | $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
74 | - if ($code >= 500) { |
|
74 | + if ($code>=500) { |
|
75 | 75 | throw new UnavailableException('The API could not be reached.'); |
76 | 76 | } |
77 | - if ($code >= 400) { |
|
77 | + if ($code>=400) { |
|
78 | 78 | throw new UnavailableException('There has been an error reaching the API.'); |
79 | 79 | } |
80 | 80 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $this->checkForCurl(); |
28 | 28 | |
29 | 29 | return $this->send($json); |
30 | - }catch (UnavailableException $e) { |
|
30 | + } catch (UnavailableException $e) { |
|
31 | 31 | |
32 | 32 | } |
33 | 33 | } |