Completed
Push — master ( 84281b...d54de7 )
by Nils
02:31
created
src/Extensions/SmokeReporter/Reporter/HtmlReporter.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use Symfony\Component\Console\Output\OutputInterface;
6 6
 use whm\Smoke\Config\Configuration;
7
-use whm\Smoke\Extensions\SmokeResponseRetriever\Retriever\Retriever;
8 7
 use whm\Smoke\Rules\CheckResult;
9 8
 
10 9
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $this->resultFile = $resultFile;
29 29
 
30 30
         if ($templateDir === null) {
31
-            $this->templateDir = __DIR__ . '/templates';
31
+            $this->templateDir = __DIR__.'/templates';
32 32
         } else {
33 33
             $this->templateDir = $templateDir;
34 34
         }
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         if (!file_put_contents($this->resultFile, $html)) {
69
-            $this->output->writeln("<error>HTML Reporter extension: Could not write result file to " . $this->resultFile ."</error>");
69
+            $this->output->writeln("<error>HTML Reporter extension: Could not write result file to ".$this->resultFile."</error>");
70 70
         } else {
71
-            $this->output->writeln("<info>HTML Reporter extension:</info> Result file written to " . $this->resultFile);
71
+            $this->output->writeln("<info>HTML Reporter extension:</info> Result file written to ".$this->resultFile);
72 72
         }
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/KoalamonSummaryReporter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     const STATUS_SUCCESS = 'success';
53 53
     const STATUS_FAILURE = 'failure';
54 54
 
55
-    public function init($apiKey, Configuration $_configuration, OutputInterface $_output, $server = 'https://webhook.koalamon.com', $system = '', $identifier = '', $tool = '', $url ='')
55
+    public function init($apiKey, Configuration $_configuration, OutputInterface $_output, $server = 'https://webhook.koalamon.com', $system = '', $identifier = '', $tool = '', $url = '')
56 56
     {
57 57
         $httpClient = new \GuzzleHttp\Client();
58 58
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     public function processResults($results)
83 83
     {
84 84
         foreach ($results as $result) {
85
-            if($result->getStatus() == CheckResult::STATUS_SUCCESS) {
85
+            if ($result->getStatus() == CheckResult::STATUS_SUCCESS) {
86 86
                 $this->success++;
87 87
             } else {
88 88
                 $this->failed++;
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
     public function finish()
94 94
     {
95 95
         $message = 'Checks: ';
96
-        $message .= $this->success . ' succeeded, ';
97
-        $message .= $this->failed . ' failed. ';
96
+        $message .= $this->success.' succeeded, ';
97
+        $message .= $this->failed.' failed. ';
98 98
 
99 99
         if ($this->failed > 0) {
100 100
             $status = Event::STATUS_FAILURE;
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
                 $this->reporter->sendEvent($event);
130 130
             } catch (KoalamonException $e) {
131 131
                 $this->output->writeln("\n  <error> Error sending result to leankoala. </error>");
132
-                $this->output->writeln('   Url: ' . $e->getUrl());
133
-                $this->output->writeln('   Payload: ' . $e->getPayload());
132
+                $this->output->writeln('   Url: '.$e->getUrl());
133
+                $this->output->writeln('   Payload: '.$e->getPayload());
134 134
                 $this->output->writeln("");
135 135
             } catch (\Exception $e) {
136 136
                 $this->output->writeln($e->getMessage());
Please login to merge, or discard this patch.
src/Rules/CheckResult.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@  discard block
 block discarded – undo
29 29
      * @param $status
30 30
      * @param $value
31 31
      * @param $message
32
+     * @param string $url
32 33
      */
33 34
     public function __construct($status, $message = '', $value = null, $url = null)
34 35
     {
@@ -47,7 +48,7 @@  discard block
 block discarded – undo
47 48
     }
48 49
 
49 50
     /**
50
-     * @param array $attributes
51
+     * @param array $attribute
51 52
      */
52 53
     public function addAttribute(Attribute $attribute)
53 54
     {
Please login to merge, or discard this patch.
src/Scanner/Scanner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             } catch (ValidationFailedException $e) {
98 98
                 $result = new CheckResult(CheckResult::STATUS_FAILURE, $e->getMessage());
99 99
             } catch (\Exception $e) {
100
-                $result = new CheckResult(CheckResult::STATUS_FAILURE, 'An error occured: ' . $e->getMessage());
100
+                $result = new CheckResult(CheckResult::STATUS_FAILURE, 'An error occured: '.$e->getMessage());
101 101
             }
102 102
 
103 103
             $this->eventDispatcher->simpleNotify('Scanner.CheckResponse.Rule', array('checkResult' => $result, 'ruleName' => $name));
Please login to merge, or discard this patch.
src/Http/GuzzleClient.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use phm\HttpWebdriverClient\Http\Client\Guzzle\GuzzleClient as phmGuzzleClient;
6 6
 use phm\HttpWebdriverClient\Http\Client\Decorator\FileCacheDecorator;
7
-use phm\HttpWebdriverClient\Http\Client\Decorator\LoggerDecorator;
8 7
 use phm\HttpWebdriverClient\Http\Client\HttpClient;
9 8
 use Psr\Http\Message\RequestInterface;
10 9
 
Please login to merge, or discard this patch.
src/Config/Configuration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     private function initConfigArray(array $configArray, array $defaultSettings = null)
68 68
     {
69 69
         if ($defaultSettings === null) {
70
-            $defaultSettings = Yaml::parse(file_get_contents(__DIR__ . '/../settings/' . self::DEFAULT_SETTINGS));
70
+            $defaultSettings = Yaml::parse(file_get_contents(__DIR__.'/../settings/'.self::DEFAULT_SETTINGS));
71 71
         }
72 72
 
73 73
         if (count($configArray) === 0) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         if ($this->hasSection($section)) {
170 170
             return $this->configArray[$section];
171 171
         } else {
172
-            throw new \RuntimeException('The section (' . $section . ') you are trying to access does not exist.');
172
+            throw new \RuntimeException('The section ('.$section.') you are trying to access does not exist.');
173 173
         }
174 174
     }
175 175
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         if (array_key_exists($name, $this->extensions)) {
179 179
             return $this->extensions[$name];
180 180
         } else {
181
-            throw new \RuntimeException('The extension ("' . $name . '") you are trying to access does not exist. Registered extensions are: ' . implode(' ,', array_keys($this->extensions)) . '.');
181
+            throw new \RuntimeException('The extension ("'.$name.'") you are trying to access does not exist. Registered extensions are: '.implode(' ,', array_keys($this->extensions)).'.');
182 182
         }
183 183
     }
184 184
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             try {
204 204
                 $client = Init::initialize($this->configArray['client']);
205 205
             } catch (\Exception $e) {
206
-                throw new ConfigurationException('Error initializing client (' . $e->getMessage() . ')');
206
+                throw new ConfigurationException('Error initializing client ('.$e->getMessage().')');
207 207
             }
208 208
 
209 209
             return $client;
Please login to merge, or discard this patch.