Completed
Push — develop ( e5032b...410fb0 )
by Tim
04:32
created
Classes/Persister/ApiResultToCachePersister.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
     /**
18 18
      * @param string $data
19 19
      * @param string $key
20
-     * @param string $identifier
21 20
      */
22 21
     public function persist($data, $key)
23 22
     {
Please login to merge, or discard this 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/Service/ArrayService.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
     /**
16 16
      * Replace a key $replaceKey with $replaceItem
17 17
      *
18
-     * @param array $array
18
+     * @param string $array
19 19
      * @param       $replaceItem
20
-     * @param       $replaceKey
20
+     * @param       string $replaceKey
21 21
      *
22 22
      * @return array
23 23
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
         foreach ($array as $key => $value) {
64 64
             if ($key !== $searchKey) {
65
-                if (!is_array($value)){
65
+                if (!is_array($value)) {
66 66
                     continue;
67 67
                 }
68 68
                 $keyChain[] = $key;
Please login to merge, or discard this patch.
Classes/Service/ApiCallService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Classes/Service/DataService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     protected $apiCallService;
36 36
 
37
-    public function __construct(){
37
+    public function __construct() {
38 38
         $this->configurationProvider = GeneralUtility::makeInstance(Configuration::class);
39 39
         $this->authenticationProvider = GeneralUtility::makeInstance(Authentication::class);
40 40
         $this->arrayService = GeneralUtility::makeInstance(ArrayService::class);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $result  = $this->makeApiCall($apiCall);
52 52
         $result = json_decode($result, true);
53 53
 
54
-        if (!isset($result['status']) || $result['status'] != 'success' || !isset($result['result'])){
54
+        if (!isset($result['status']) || $result['status'] != 'success' || !isset($result['result'])) {
55 55
             throw new ApiErrorException('There has been a negative result for your request.');
56 56
         }
57 57
 
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
     /**
62 62
      * @return array
63 63
      */
64
-    public function getAllResults(){
64
+    public function getAllResults() {
65 65
         $results = [];
66 66
         $configData = $this->configurationProvider->getAllConfigurationData();
67 67
         $keys = $this->arrayService->findByContainedKey($configData, 'authentication');
68 68
 
69
-        foreach ($keys as $key){
69
+        foreach ($keys as $key) {
70 70
             $results[$key] = $this->getApiResult($key);
71 71
         }
72 72
 
Please login to merge, or discard this patch.
Classes/Service/FileService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Classes/Controller/BackendController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
     public function detailAction($detailId)
41 41
     {
42 42
         $dataService = GeneralUtility::makeInstance(DataService::class);
43
-        $graph = $dataService->getApiResult($detailId . '_graph');
44
-        $table = $dataService->getApiResult($detailId . '_table');
43
+        $graph = $dataService->getApiResult($detailId.'_graph');
44
+        $table = $dataService->getApiResult($detailId.'_table');
45 45
 
46 46
         $this->view->assignMultiple([
47 47
             'graph' => $graph,
Please login to merge, or discard this patch.
Classes/Exception/ApiErrorException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace HDNET\OnpageIntegration\Exception;
4 4
 
5
-class ApiErrorException extends \Exception{
5
+class ApiErrorException extends \Exception {
6 6
 
7 7
 }
Please login to merge, or discard this patch.
Classes/Exception/UnavailableException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace HDNET\OnpageIntegration\Exception;
4 4
 
5
-class UnavailableException extends \Exception{
5
+class UnavailableException extends \Exception {
6 6
 
7 7
 }
Please login to merge, or discard this patch.
Classes/Exception/UnknownApiCallException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace HDNET\OnpageIntegration\Exception;
4 4
 
5
-class UnknownApiCallException extends \Exception{
5
+class UnknownApiCallException extends \Exception {
6 6
 
7 7
 }
Please login to merge, or discard this patch.