Completed
Push — develop ( 67a76c...0bffec )
by René
07:36
created
Classes/Persister/ApiResultToCachePersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/ArrayPadViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function render($size)
22 22
     {
23
-        $emptyArray  = [];
23
+        $emptyArray = [];
24 24
         $emptyArray = array_pad($emptyArray, $size, '');
25 25
         return $emptyArray;
26 26
     }
Please login to merge, or discard this patch.
Classes/Provider/ConfigurationProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
     protected function getApiCallsArray()
51 51
     {
52 52
         $this->fileService = GeneralUtility::makeInstance(FileService::class);
53
-        $apiCallData      = $this->fileService->readFile(
54
-            PATH_site . 'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json'
53
+        $apiCallData = $this->fileService->readFile(
54
+            PATH_site.'typo3conf/ext/onpage_integration/Configuration/ApiCalls.json'
55 55
         );
56 56
 
57 57
         return json_decode($apiCallData, true);
Please login to merge, or discard this patch.
Classes/Utility/TitleUtility.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
     /**
16
-     * @param $section
16
+     * @param string $section
17 17
      *
18 18
      * @return string
19 19
      */
Please login to merge, or discard this patch.
Classes/ViewHelpers/InArrayViewHelper.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,6 @@
 block discarded – undo
6 6
 
7 7
 namespace HDNET\OnpageIntegration\ViewHelpers;
8 8
 
9
-use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
10
-
11 9
 /**
12 10
  * Class InArrayViewHelper
13 11
  */
Please login to merge, or discard this patch.
Classes/ViewHelpers/TitleViewHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $titleArray = explode('_', $title);
27 27
 
28
-        $UpperTitle = array_map(function ($value) {
28
+        $UpperTitle = array_map(function($value) {
29 29
             return ucfirst($value);
30 30
         }, $titleArray);
31 31
 
Please login to merge, or discard this patch.
Classes/Utility/ArrayUtility.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 {
14 14
 
15 15
     /**
16
-     * @param $section
16
+     * @param string $section
17 17
      *
18 18
      * @return string
19 19
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 namespace HDNET\OnpageIntegration\Utility;
6 6
 
7 7
 use TYPO3\CMS\Core\Utility\GeneralUtility;
8
-use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
9 8
 
10 9
 /**
11 10
  * Class ArrayUtility
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $loader = GeneralUtility::makeInstance(\HDNET\OnpageIntegration\Loader\ApiResultLoader::class);
26 26
 
27
-        for ($i = 0; $i < count($metaDataArray[0]); $i++) {
27
+        for ($i = 0; $i<count($metaDataArray[0]); $i++) {
28 28
 
29
-            $graphDataArray = $loader->load('zoom_' . $section . '_' . $i . '_graph');
29
+            $graphDataArray = $loader->load('zoom_'.$section.'_'.$i.'_graph');
30 30
             $errorReportyKey = $metaDataArray[0][$i]['errors'];
31 31
 
32 32
             $metaDataArray[0][$i]['errors'] = self::errorReport($graphDataArray, $errorReportyKey);
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @return int
45 45
      */
46
-    protected static function errorReport($graphApiCallResult,$errorReportKey) {
46
+    protected static function errorReport($graphApiCallResult, $errorReportKey) {
47 47
         $totalErrors = 0;
48 48
 
49
-        foreach($graphApiCallResult as $element) {
49
+        foreach ($graphApiCallResult as $element) {
50 50
 
51
-            if(in_array('sum', $errorReportKey)) {
52
-                if(in_array($errorReportKey['hidden'], $element)) {
51
+            if (in_array('sum', $errorReportKey)) {
52
+                if (in_array($errorReportKey['hidden'], $element)) {
53 53
                     continue;
54 54
                 }
55 55
                 $totalErrors += $element['count'];
56 56
             }
57 57
 
58
-            if(in_array($errorReportKey['show'], $element)) {
58
+            if (in_array($errorReportKey['show'], $element)) {
59 59
                 $totalErrors += $element['count'];
60 60
             }
61 61
         }
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return array
73 73
      */
74
-    public static function showTable(array $tableApiCallResult,array $showTableKey) {
74
+    public static function showTable(array $tableApiCallResult, array $showTableKey) {
75 75
         $fittedTablesRecords = [];
76
-        foreach($tableApiCallResult as $singleCallElement) {
76
+        foreach ($tableApiCallResult as $singleCallElement) {
77 77
 
78
-            foreach($showTableKey as $key) {
79
-                if(array_key_exists($key, $singleCallElement)) {
78
+            foreach ($showTableKey as $key) {
79
+                if (array_key_exists($key, $singleCallElement)) {
80 80
                     $singleRecordArray[$key] = $singleCallElement[$key];
81 81
                 }
82 82
             }
Please login to merge, or discard this patch.
Classes/Service/DataService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Classes/Service/ApiCallService.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.