Completed
Push — master ( c25c8e...44516d )
by Kevin
06:39
created
lib/TestCase/Executor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function evaluate($string)
25 25
     {
26
-        $string = '<?php ' . $string;
26
+        $string = '<?php '.$string;
27 27
         $comparison1 = $comparison2 = '';
28 28
         $operator = null;
29 29
         $tokens = token_get_all($string);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,10 +49,14 @@
 block discarded – undo
49 49
 
50 50
         if ($operator === null) {
51 51
             $isTrue = in_array($comparison1, $this->reservedTrue);
52
-            if ($isTrue) return true;
52
+            if ($isTrue) {
53
+                return true;
54
+            }
53 55
 
54 56
             $isFalse = in_array($comparison1, $this->reservedFalse);
55
-            if ($isFalse) return false;
57
+            if ($isFalse) {
58
+                return false;
59
+            }
56 60
 
57 61
             return (boolean)$comparison1;
58 62
         } else {
Please login to merge, or discard this patch.
lib/Util/Configuration/ClassConfigurationReader.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
             $isVendor = array_pop($testParts) == 'vendor';
45 45
 
46 46
             if ($isVendor) {
47
-                $path = realpath(__DIR__ . '/../../../../..'); // Get out of the Magium directories
47
+                $path = realpath(__DIR__.'/../../../../..'); // Get out of the Magium directories
48 48
             } else {
49
-                $path = realpath(__DIR__ . '/../../..');
49
+                $path = realpath(__DIR__.'/../../..');
50 50
             }
51 51
 
52 52
             $count = 0;
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
         $classes = $this->introspectClass($config);
77 77
 
78 78
         foreach ($classes as $class) {
79
-            $configurationFile = $class . '.php';
80
-            $configurationFile = $configurationDir . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $configurationFile);
79
+            $configurationFile = $class.'.php';
80
+            $configurationFile = $configurationDir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $configurationFile);
81 81
 
82 82
             if (file_exists($configurationFile)) {
83 83
                 include $configurationFile;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,9 @@
 block discarded – undo
71 71
             }
72 72
         }
73 73
 
74
-        if (!is_dir($configurationDir)) return;
74
+        if (!is_dir($configurationDir)) {
75
+            return;
76
+        }
75 77
 
76 78
         $classes = $this->introspectClass($config);
77 79
 
Please login to merge, or discard this patch.
lib/Util/Configuration/AbstractConfigurationReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             $reflectionClass = $class;
25 25
         }
26 26
 
27
-        foreach ($originalReflectionClass->getInterfaceNames() as $name){
27
+        foreach ($originalReflectionClass->getInterfaceNames() as $name) {
28 28
             $this->addClass($name);
29 29
             $interfaces[] = $name;
30 30
             $reflectionInterface = new \ReflectionClass($name);
Please login to merge, or discard this patch.
lib/Assertions/LoggingAssertionExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         }
35 35
         try {
36 36
             $assertion->assert();
37
-            $this->logger->logAssertionSuccess( $assertion, $extra );
37
+            $this->logger->logAssertionSuccess($assertion, $extra);
38 38
         } catch (\Exception $e) {
39 39
             $this->logger->logAssertionFailure($e, $assertion, $extra);
40 40
             $this->testCase->fail($e->getMessage());
Please login to merge, or discard this patch.
lib/TestCase/Configurable/Interpolator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
     public function interpolate($string)
24 24
     {
25
-        $this->logger->info('Interpolating string: ' . $string);
25
+        $this->logger->info('Interpolating string: '.$string);
26 26
         $matches = null;
27 27
         // Finding {{$product->setEntityId(123)->load()}} type methods
28 28
         if (preg_match('/\{\{(?:\$)([^{]+)\}\}/', $string, $matches)) {
Please login to merge, or discard this patch.
lib/Assertions/Element/Clickable.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 Facebook\WebDriver\WebDriverBy;
6 6
 use Magium\AbstractTestCase;
7
-use Magium\InvalidTestTypeException;
8 7
 use Magium\WebDriver\ExpectedCondition;
9 8
 
10 9
 class Clickable extends AbstractSelectorAssertion
Please login to merge, or discard this patch.
lib/Assertions/Element/NotClickable.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 Facebook\WebDriver\WebDriverBy;
6 6
 use Magium\AbstractTestCase;
7
-use Magium\InvalidTestTypeException;
8 7
 use Magium\WebDriver\ExpectedCondition;
9 8
 
10 9
 class NotClickable extends AbstractSelectorAssertion
Please login to merge, or discard this patch.
lib/Util/Log/LoggerPHPUnit5.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -45,11 +45,17 @@
 block discarded – undo
45 45
         return $this->invokedTest;
46 46
     }
47 47
 
48
+    /**
49
+     * @param string $name
50
+     */
48 51
     public function setTestName($name)
49 52
     {
50 53
         $this->testName = $name;
51 54
     }
52 55
 
56
+    /**
57
+     * @param string $status
58
+     */
53 59
     public function setTestStatus($status)
54 60
     {
55 61
         $this->status = $status;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
     public function logAssertionSuccess(AbstractAssertion $assertion, array $extra)
69 69
     {
70 70
         $extra = array_merge($extra, ['type' => 'assertion', 'result' => self::STATUS_PASSED]);
71
-        $this->info(get_class($assertion) . ' - passed', $this->createExtra($extra));
71
+        $this->info(get_class($assertion).' - passed', $this->createExtra($extra));
72 72
     }
73 73
 
74 74
     public function logAssertionFailure(Exception $e, AbstractAssertion $assertion, array $extra)
75 75
     {
76 76
         $extra = array_merge($extra, ['type' => 'assertion', 'result' => self::STATUS_FAILED, 'stack_trace' => $e->getTrace()]);
77
-        $this->err(get_class($assertion) . ' - ' . $e->getMessage(), $this->createExtra($extra));
77
+        $this->err(get_class($assertion).' - '.$e->getMessage(), $this->createExtra($extra));
78 78
     }
79 79
 
80 80
     public function createExtra($includeArray = [])
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
     {
137 137
         if ($test instanceof TestCase) {
138 138
             if (!$this->testName) {
139
-                $this->setTestName(get_class($test) . '::' . $test->getName());
139
+                $this->setTestName(get_class($test).'::'.$test->getName());
140 140
             }
141
-            $this->invokedTest = get_class($test) . '::' . $test->getName();
141
+            $this->invokedTest = get_class($test).'::'.$test->getName();
142 142
             $this->setTestStatus(self::STATUS_PASSED);
143 143
         }
144 144
 
Please login to merge, or discard this patch.
lib/WebDriver/WebDriver.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -59,6 +59,10 @@  discard block
 block discarded – undo
59 59
     }
60 60
 
61 61
 
62
+    /**
63
+     * @param string $by
64
+     * @param string $selector
65
+     */
62 66
     public function logFind($by, $selector)
63 67
     {
64 68
         if ($this->logger instanceof \Magium\Util\Log\LoggerInterface) {
@@ -135,6 +139,9 @@  discard block
 block discarded – undo
135 139
         return $element;
136 140
     }
137 141
 
142
+    /**
143
+     * @param string $selector
144
+     */
138 145
     public function elementExists($selector, $by = 'byId')
139 146
     {
140 147
         try {
Please login to merge, or discard this patch.