Completed
Push — master ( 8398cb...f02e4f )
by
unknown
05:33
created
src/Rules/CheckResult.php 1 patch
Doc Comments   +3 added lines, -2 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
     {
@@ -71,7 +72,7 @@  discard block
 block discarded – undo
71 72
     }
72 73
 
73 74
     /**
74
-     * @return mixed
75
+     * @return string
75 76
      */
76 77
     public function getMessage()
77 78
     {
Please login to merge, or discard this patch.
src/Rules/Xml/Rss/ValidRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 
22 22
     private function getSchema()
23 23
     {
24
-        return __DIR__ . '/' . self::SCHEMA;
24
+        return __DIR__.'/'.self::SCHEMA;
25 25
     }
26 26
 
27 27
     public function doValidation(ResponseInterface $response)
28 28
     {
29
-        $body = (string)$response->getBody();
29
+        $body = (string) $response->getBody();
30 30
 
31 31
         if (preg_match('/<rss/', $body)) {
32 32
             libxml_clear_errors();
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
             $lastError = libxml_get_last_error();
36 36
             if ($lastError) {
37 37
                 throw new ValidationFailedException(
38
-                    'The given xml file is not well formed (last error: ' .
39
-                    str_replace("\n", '', $lastError->message) . ').');
38
+                    'The given xml file is not well formed (last error: '.
39
+                    str_replace("\n", '', $lastError->message).').');
40 40
             }
41 41
             $valid = @$dom->schemaValidate($this->getSchema());
42 42
             if (!$valid) {
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
                 $lastErrorMessage = str_replace("\n", '', $lastError->message);
45 45
 
46 46
                 if ($response instanceof UriAwareResponse) {
47
-                    $toolUrl = sprintf(self::PUBLIC_SERVICE, urlencode((string)$response->getUri()));
47
+                    $toolUrl = sprintf(self::PUBLIC_SERVICE, urlencode((string) $response->getUri()));
48 48
                 } else {
49 49
                     $toolUrl = '';
50 50
                 }
51
-                return new CheckResult(CheckResult::STATUS_FAILURE, 'The given xml file is not a valid rss file (last error: ' . $lastErrorMessage . ').', null, $toolUrl);
51
+                return new CheckResult(CheckResult::STATUS_FAILURE, 'The given xml file is not a valid rss file (last error: '.$lastErrorMessage.').', null, $toolUrl);
52 52
             }
53 53
         }
54 54
         return new CheckResult(CheckResult::STATUS_SUCCESS, 'The given rss file is valid.');
Please login to merge, or discard this patch.
src/Cli/Command/CustomCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         $configArray = $this->getConfigArray($configFile, true);
51 51
 
52 52
         if (is_string($configArray)) {
53
-            throw new \RuntimeException('Unable to load config file. Please check ' . $configFile);
53
+            throw new \RuntimeException('Unable to load config file. Please check '.$configFile);
54 54
         }
55 55
 
56 56
         $this->config = new Configuration(new Uri('http://www.example.com'), $dispatcher, $configArray);
Please login to merge, or discard this patch.
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.