Passed
Pull Request — master (#32)
by
unknown
03:09
created
src/Extension/PhiremockProcess.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      * @param string $path
46 46
      * @param string $logsPath
47 47
      * @param bool   $debug
48
-     * @param mixed  $expectationsPath
48
+     * @param string|null  $expectationsPath
49 49
      */
50 50
     public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath)
51 51
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function start($ip, $port, $path, $logsPath, $debug, $expectationsPath)
51 51
     {
52
-        $phiremockPath = is_file($path) ? $path : $path . DIRECTORY_SEPARATOR . 'phiremock';
52
+        $phiremockPath = is_file($path) ? $path : $path.DIRECTORY_SEPARATOR.'phiremock';
53 53
         $expectationsPath = is_dir($expectationsPath) ? $expectationsPath : '';
54
-        $logFile = $logsPath . DIRECTORY_SEPARATOR . self::LOG_FILE_NAME;
54
+        $logFile = $logsPath.DIRECTORY_SEPARATOR.self::LOG_FILE_NAME;
55 55
         $this->initProcess($ip, $port, $debug, $expectationsPath, $phiremockPath, $logFile);
56 56
         $this->logPhiremockCommand($debug);
57 57
         $this->process->start();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     private function initProcess($ip, $port, $debug, $expectationsPath, $phiremockPath, $logFile)
77 77
     {
78 78
         $commandline = [
79
-            $this->getCommandPrefix() . $phiremockPath,
79
+            $this->getCommandPrefix().$phiremockPath,
80 80
             '-i',
81 81
             $ip,
82 82
             '-p',
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     private function logPhiremockCommand($debug)
103 103
     {
104 104
         if ($debug) {
105
-            echo 'Running ' . $this->process->getCommandLine() . PHP_EOL;
105
+            echo 'Running '.$this->process->getCommandLine().PHP_EOL;
106 106
         }
107 107
     }
108 108
 
Please login to merge, or discard this patch.
src/Extension/Phiremock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         array $options,
61 61
         PhiremockProcess $process = null
62 62
     ) {
63
-        $this->config['bin_path'] = Config::projectDir() . '../vendor/bin/phiremock';
63
+        $this->config['bin_path'] = Config::projectDir().'../vendor/bin/phiremock';
64 64
         $this->config['logs_path'] = Config::logDir();
65 65
         $this->config['expectations_path'] = null;
66 66
 
Please login to merge, or discard this patch.
src/Util/ExpectationAnnotationParser.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,6 @@
 block discarded – undo
51 51
 
52 52
     /**
53 53
      * @param       $expectationsPath
54
-     * @param array $matches
55 54
      *
56 55
      * @return string
57 56
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function __construct($config = [])
29 29
     {
30
-        if(empty($config)){
30
+        if (empty($config)) {
31 31
             $config = Configuration::config();
32 32
         }
33 33
         $this->config = $config;
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function getExpectations(TestInterface $test)
43 43
     {
44
-        if(!$test instanceof Cest){
44
+        if (!$test instanceof Cest) {
45 45
             return [];
46 46
         }
47 47
         $expectations = Annotation::forMethod($test->getTestClass(), $test->getTestMethod())->fetchAll('expectation');
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $expectationsPath = isset($this->config['paths'][self::PATH_CONFIG_KEY]) ? $this->config['paths'][self::PATH_CONFIG_KEY] : self::DEFAULT_EXPECTATIONS_PATH;
61 61
 
62
-        return codecept_root_dir($expectationsPath . $path);
62
+        return codecept_root_dir($expectationsPath.$path);
63 63
     }
64 64
 
65 65
     /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         }
80 80
 
81 81
         $expectationPath = $this->getExpectationFullPath("{$matches['filePath']}.json");
82
-        if(!file_exists($expectationPath)){
82
+        if (!file_exists($expectationPath)) {
83 83
             throw new ParseException("The expectation at $expectationPath could not be found ");
84 84
         }
85 85
 
Please login to merge, or discard this patch.
src/Module/Phiremock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@
 block discarded – undo
54 54
             $this->haveACleanSetupInRemoteService();
55 55
         }
56 56
         $expectations = (new ExpectationAnnotationParser())->getExpectations($test);
57
-        if(!empty($expectations)){
57
+        if (!empty($expectations)) {
58 58
             $client = new Client([
59 59
                 'base_uri' => "{$this->config['host']}:{$this->config['port']}",
60 60
             ]);
61
-            foreach ($expectations as $expectation){
61
+            foreach ($expectations as $expectation) {
62 62
 
63 63
                 $client->post(PhiremockClient::API_EXPECTATIONS_URL, [
64 64
                     'headers' => [
Please login to merge, or discard this patch.