Completed
Push — master ( fdf082...9ad6b1 )
by Kevin
08:56 queued 05:59
created
lib/AbstractTestCase.php 1 patch
Doc Comments   +20 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,6 +251,9 @@  discard block
 block discarded – undo
251 251
         }
252 252
     }
253 253
 
254
+    /**
255
+     * @param null|string $selector
256
+     */
254 257
     public function assertElementClickable($selector, $by = WebDriver::BY_ID)
255 258
     {
256 259
         $this->elementAssertion($selector, $by, Clickable::ASSERTION);
@@ -268,6 +271,9 @@  discard block
 block discarded – undo
268 271
         $this->testCaseConfiguration = $class;
269 272
     }
270 273
 
274
+    /**
275
+     * @param string $namespace
276
+     */
271 277
     public static function addBaseNamespace($namespace)
272 278
     {
273 279
         if (!in_array($namespace, self::$baseNamespaces)) {
@@ -275,6 +281,9 @@  discard block
 block discarded – undo
275 281
         }
276 282
     }
277 283
 
284
+    /**
285
+     * @param string $prefix
286
+     */
278 287
     public static function resolveClass( $class, $prefix = null)
279 288
     {
280 289
         $origClass = $class;
@@ -306,6 +315,9 @@  discard block
 block discarded – undo
306 315
 
307 316
     }
308 317
 
318
+    /**
319
+     * @return string
320
+     */
309 321
     protected function normalizeClassRequest($class)
310 322
     {
311 323
         return str_replace('/', '\\', $class);
@@ -398,7 +410,7 @@  discard block
 block discarded – undo
398 410
      *
399 411
      * Options: 1s (1 second), 1ms (1 millisecond), 1us (1 microsecond), 1ns (1 nanosecond)
400 412
      *
401
-     * @param $time
413
+     * @param string $time
402 414
      */
403 415
 
404 416
     public function sleep($time)
@@ -600,7 +612,7 @@  discard block
 block discarded – undo
600 612
     }
601 613
 
602 614
     /**
603
-     * @param $xpath
615
+     * @param string $xpath
604 616
      * @return \Facebook\WebDriver\Remote\RemoteWebElement
605 617
      */
606 618
 
@@ -629,6 +641,12 @@  discard block
 block discarded – undo
629 641
         return $this->webdriver->byCssSelector($selector);
630 642
     }
631 643
 
644
+    /**
645
+     * @param string $xpathTemplate
646
+     * @param string $text
647
+     * @param string $specificNodeType
648
+     * @param string $parentElementSelector
649
+     */
632 650
     protected function getElementByTextXpath($xpathTemplate, $text, $specificNodeType = null, $parentElementSelector = null)
633 651
     {
634 652
 
Please login to merge, or discard this patch.
lib/Cli/Command/AbstractApiEnablement.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -15,6 +15,10 @@
 block discarded – undo
15 15
 {
16 16
 
17 17
     abstract function getApiName();
18
+
19
+    /**
20
+     * @return string
21
+     */
18 22
     abstract function getApiDescription();
19 23
     abstract function getValue();
20 24
 
Please login to merge, or discard this patch.
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -2,13 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Magium\Cli\Command;
4 4
 
5
-use Magium\InvalidConfigurationException;
6
-use Magium\NotFoundException;
7 5
 use Symfony\Component\Console\Command\Command;
8 6
 use Symfony\Component\Console\Input\ArrayInput;
9
-use Symfony\Component\Console\Input\InputArgument;
10 7
 use Symfony\Component\Console\Input\InputInterface;
11
-use Symfony\Component\Console\Input\InputOption;
12 8
 use Symfony\Component\Console\Output\OutputInterface;
13 9
 
14 10
 abstract class AbstractApiEnablement extends Command
Please login to merge, or discard this patch.
lib/Cli/Command/ApiEnable.php 1 patch
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -2,14 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Magium\Cli\Command;
4 4
 
5
-use Magium\InvalidConfigurationException;
6
-use Magium\NotFoundException;
7 5
 use Symfony\Component\Console\Command\Command;
8
-use Symfony\Component\Console\Input\ArrayInput;
9
-use Symfony\Component\Console\Input\InputArgument;
10
-use Symfony\Component\Console\Input\InputInterface;
11
-use Symfony\Component\Console\Input\InputOption;
12
-use Symfony\Component\Console\Output\OutputInterface;
13 6
 
14 7
 class ApiEnable extends AbstractApiEnablement
15 8
 {
Please login to merge, or discard this patch.
lib/Cli/Command/ApiPing.php 2 patches
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -4,14 +4,9 @@
 block discarded – undo
4 4
 
5 5
 use Guzzle\Http\Client;
6 6
 use Magium\Cli\Command\Test\TestSkeleton;
7
-use Magium\InvalidConfigurationException;
8
-use Magium\NotFoundException;
9 7
 use Magium\Util\Api\ApiConfiguration;
10 8
 use Symfony\Component\Console\Command\Command;
11
-use Symfony\Component\Console\Input\ArrayInput;
12
-use Symfony\Component\Console\Input\InputArgument;
13 9
 use Symfony\Component\Console\Input\InputInterface;
14
-use Symfony\Component\Console\Input\InputOption;
15 10
 use Symfony\Component\Console\Output\OutputInterface;
16 11
 
17 12
 class ApiPing extends Command
Please login to merge, or discard this patch.
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.
lib/Util/Api/Clairvoyant/Clairvoyant.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     }
90 90
 
91 91
     /**
92
-     * @return mixed
92
+     * @return string
93 93
      */
94 94
     public function getProjectId()
95 95
     {
Please login to merge, or discard this patch.
lib/Cli/Command/ApiDisable.php 1 patch
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -2,14 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Magium\Cli\Command;
4 4
 
5
-use Magium\InvalidConfigurationException;
6
-use Magium\NotFoundException;
7 5
 use Symfony\Component\Console\Command\Command;
8
-use Symfony\Component\Console\Input\ArrayInput;
9
-use Symfony\Component\Console\Input\InputArgument;
10
-use Symfony\Component\Console\Input\InputInterface;
11
-use Symfony\Component\Console\Input\InputOption;
12
-use Symfony\Component\Console\Output\OutputInterface;
13 6
 
14 7
 class ApiEnable extends AbstractApiEnablement
15 8
 {
Please login to merge, or discard this patch.