Completed
Pull Request — master (#107)
by Kevin
06:11
created
lib/WebDriver/WebDriverElementProxy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function __call($name, $arguments)
28 28
     {
29 29
         if (strpos($name, '::') > 0) {
30
-            list(   , $name) = explode('::', $name);
30
+            list(, $name) = explode('::', $name);
31 31
         }
32 32
         if (!$this->element instanceof WebDriverElement) {
33 33
             $this->element = $this->webDriver->{$this->by}($this->selector);
Please login to merge, or discard this patch.
lib/Navigators/InstructionNavigator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 case self::INSTRUCTION_WAIT_FOR_NOT_EXISTS:
87 87
                     $this->webdriver->wait()->until(
88 88
                         ExpectedCondition::not(
89
-                            ExpectedCondition::elementExists( $xpath, WebDriver::BY_XPATH)
89
+                            ExpectedCondition::elementExists($xpath, WebDriver::BY_XPATH)
90 90
                         )
91 91
                     );
92 92
                     break;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     );
106 106
                     break;
107 107
                 default:
108
-                    throw new InvalidConfigurationException('Unknown login instruction: ' .$instruction );
108
+                    throw new InvalidConfigurationException('Unknown login instruction: ' . $instruction);
109 109
             }
110 110
         }
111 111
 
Please login to merge, or discard this patch.
lib/Cli/Command/ApiPing.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
         $api->setEnabled(true); // Gotta force this for this test
34 34
 
35 35
         $output->writeln('Sending un-authenticated payload...');
36
-        $client = new Client('http://' . $api->getApiHostname(). '/api/ping');
36
+        $client = new Client('http://' . $api->getApiHostname() . '/api/ping');
37 37
         $request = $client->get();
38 38
         $response = $request->send();
39 39
         $output->writeln(
40 40
             'Checking for 200 status message... '
41
-            . ($response->getStatusCode() == '200'?'OK':'Failed')
41
+            . ($response->getStatusCode() == '200' ? 'OK' : 'Failed')
42 42
         );
43 43
         $output->writeln(
44 44
             'Checking for application/json content type... '
45
-            . (stripos($response->getContentType(), 'application/json') !== false?'OK':'Failed')
45
+            . (stripos($response->getContentType(), 'application/json') !== false ? 'OK' : 'Failed')
46 46
         );
47 47
         $content = json_decode($response->getBody(), true);
48 48
         $output->writeln(
49 49
             'Checking for successful response... '
50
-            . (is_array($content) && isset($content['status']) && $content['status'] === 'success'?'OK':'Failed')
50
+            . (is_array($content) && isset($content['status']) && $content['status'] === 'success' ? 'OK' : 'Failed')
51 51
         );
52 52
 
53 53
         $output->writeln('');
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
 
60 60
         $output->writeln(
61 61
             'Checking for 200 status message... '
62
-            . ($response->getStatusCode() == '200'?'OK':'Failed')
62
+            . ($response->getStatusCode() == '200' ? 'OK' : 'Failed')
63 63
         );
64 64
         $output->writeln(
65 65
             'Checking for application/json content type... '
66
-            . (stripos($response->getContentType(), 'application/json') !== false?'OK':'Failed')
66
+            . (stripos($response->getContentType(), 'application/json') !== false ? 'OK' : 'Failed')
67 67
         );
68 68
         $content = $request->getPayload($response);
69 69
         $output->writeln(
70 70
             'Checking for successful response... '
71
-            . (is_array($content) && isset($content['status']) && $content['status'] === 'success'?'OK':'Failed')
71
+            . (is_array($content) && isset($content['status']) && $content['status'] === 'success' ? 'OK' : 'Failed')
72 72
         );
73 73
 
74 74
 
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
         $response = $request->push('/api/echo-authed', ['message' => 'hello world']);
80 80
         $output->writeln(
81 81
             'Checking for 200 status message... '
82
-            . ($response->getStatusCode() == '200'?'OK':'Failed')
82
+            . ($response->getStatusCode() == '200' ? 'OK' : 'Failed')
83 83
         );
84 84
         $output->writeln(
85 85
             'Checking for application/json content type... '
86
-            . (stripos($response->getContentType(), 'application/json') !== false?'OK':'Failed')
86
+            . (stripos($response->getContentType(), 'application/json') !== false ? 'OK' : 'Failed')
87 87
         );
88 88
         $content = $request->getPayload($response);
89 89
         $output->writeln(
90 90
             'Checking for successful response... '
91
-            . (is_array($content) && isset($content['status']) && $content['status'] === 'success'?'OK':'Failed')
91
+            . (is_array($content) && isset($content['status']) && $content['status'] === 'success' ? 'OK' : 'Failed')
92 92
         );
93 93
         $output->writeln(
94 94
             'Checking for matching echo message... '
95
-            . (is_array($content) && isset($content['message']) && $content['message'] === 'hello world'?'OK':'Failed')
95
+            . (is_array($content) && isset($content['message']) && $content['message'] === 'hello world' ? 'OK' : 'Failed')
96 96
         );
97 97
     }
98 98
     
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -5,13 +5,9 @@
 block discarded – undo
5 5
 use Guzzle\Http\Client;
6 6
 use Magium\Cli\Command\Test\TestSkeleton;
7 7
 use Magium\InvalidConfigurationException;
8
-use Magium\NotFoundException;
9 8
 use Magium\Util\Api\ApiConfiguration;
10 9
 use Symfony\Component\Console\Command\Command;
11
-use Symfony\Component\Console\Input\ArrayInput;
12
-use Symfony\Component\Console\Input\InputArgument;
13 10
 use Symfony\Component\Console\Input\InputInterface;
14
-use Symfony\Component\Console\Input\InputOption;
15 11
 use Symfony\Component\Console\Output\OutputInterface;
16 12
 
17 13
 class ApiPing extends Command
Please login to merge, or discard this patch.
lib/Util/Configuration/ClassConfigurationReader.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
             }
54 54
         }
55 55
 
56
-        if (!$configurationDir) return;
56
+        if (!$configurationDir) {
57
+            return;
58
+        }
57 59
 
58 60
         $configurationFile = get_class($config) . '.php';
59 61
         $configurationFile = $configurationDir . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $configurationFile);
Please login to merge, or discard this patch.