Passed
Push — master ( 21fb8f...f8d0e4 )
by Jakub
01:51
created
src/Tester.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     $classes = $robot->getIndexedClasses();
50 50
     foreach($classes as $class => $file) {
51 51
       $rc = new \Nette\Reflection\ClassType($class);
52
-      if(!$rc->isAbstract() AND $rc->isSubclassOf(TestCase::class)) {
52
+      if(!$rc->isAbstract() and $rc->isSubclassOf(TestCase::class)) {
53 53
         $suits[] = [$rc->getName(), $file];
54 54
       }
55 55
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
       if($skipped["reason"]) {
87 87
         $reason = ": {$skipped["reason"]}";
88 88
       }
89
-      Environment::printLine("Skipped {$skipped["name"]}$reason");
89
+      Environment::printLine("skipped {$skipped["name"]}$reason");
90 90
     }
91 91
     if($failed) {
92 92
       Environment::printLine("Failed");
Please login to merge, or discard this patch.
src/Bridges/NetteDI/TestsRunner.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
       if($skipped["reason"]) {
69 69
         $reason = ": {$skipped["reason"]}";
70 70
       }
71
-      Environment::printLine("Skipped {$skipped["name"]}$reason");
71
+      Environment::printLine("skipped {$skipped["name"]}$reason");
72 72
     }
73 73
     if($failed) {
74 74
       Environment::printLine("Failed");
Please login to merge, or discard this patch.
src/Assert.php 1 patch
Upper-Lower-Casing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
    * @return void
114 114
    */
115 115
   public static function contains($needle, $actual): void {
116
-    if(!is_string($needle) AND !is_array($needle)) {
116
+    if(!is_string($needle) and !is_array($needle)) {
117 117
       Environment::testResult("The variable is not string or array.", false);
118 118
     } elseif(is_string($actual)) {
119
-      if($needle !== "" AND strpos($actual, $needle) !== FALSE) {
119
+      if($needle !== "" and strpos($actual, $needle) !== FALSE) {
120 120
         Environment::testResult("$needle is in the variable.");
121 121
       } else {
122 122
         Environment::testResult("$needle is not in the variable.", false);
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
    * @return void
141 141
    */
142 142
   public static function notContains($needle, $actual): void {
143
-    if(!is_string($needle) AND !is_array($needle)) {
143
+    if(!is_string($needle) and !is_array($needle)) {
144 144
       Environment::testResult("The variable is not string or array.", false);
145 145
     } elseif(is_string($actual)) {
146
-      if($needle === "" OR strpos($actual, $needle) === FALSE) {
146
+      if($needle === "" or strpos($actual, $needle) === FALSE) {
147 147
         Environment::testResult("$needle is not in the variable.");
148 148
       } else {
149 149
         Environment::testResult("$needle is in the variable.", false);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
    * @return void
168 168
    */
169 169
   public static function count(int $count, $value): void {
170
-    if(!is_array($value) AND !$value instanceof \Countable) {
170
+    if(!is_array($value) and !$value instanceof \Countable) {
171 171
       Environment::testResult("The variable is not array or countable object.", false);
172 172
     } elseif(count($value) == $count) {
173 173
       Environment::testResult("Count of the variable is $count.");
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
    * @return void
186 186
    */
187 187
   public static function notCount(int $count, $value): void {
188
-    if(!is_array($value) AND !$value instanceof \Countable) {
188
+    if(!is_array($value) and !$value instanceof \Countable) {
189 189
       Environment::testResult("The variable is not array or countable object.", false);
190 190
     } elseif(count($value) == $count) {
191 191
       $actual = count($value);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
    * @return void
204 204
    */
205 205
   public static function type($type, $value): void {
206
-    if(!is_object($type) AND !is_string($type)) {
206
+    if(!is_object($type) and !is_string($type)) {
207 207
       Environment::testResult("Type must be string or object.", false);
208 208
     } elseif(in_array($type, ["array", "bool", "callable", "float",
209 209
       "int", "integer", "null", "object", "resource", "scalar", "string"], true)) {
Please login to merge, or discard this patch.
src/TestCase.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
       $job = [
78 78
         "name" => $this->getJobName($rm), "callback" => [$this, $method], "params" => [], "skip" => $this->checkSkip($rm), "shouldFail" => $rm->hasAnnotation("fail")
79 79
       ];
80
-      if($rm->getNumberOfParameters() AND $rm->hasAnnotation("data")) {
80
+      if($rm->getNumberOfParameters() and $rm->hasAnnotation("data")) {
81 81
         $data = (array) $rm->getAnnotation("data");
82 82
       }
83 83
       if(is_array($data)) {
Please login to merge, or discard this patch.
src/Job.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@
 block discarded – undo
85 85
       }
86 86
       $output = ob_get_clean();
87 87
       $failed = Environment::checkFailed($output);
88
-      if($failed AND !$this->shouldFail) {
88
+      if($failed and !$this->shouldFail) {
89 89
         $this->result = "failed";
90 90
       }
91
-      if(strlen($output) AND $this->result === "failed") {
91
+      if(strlen($output) and $this->result === "failed") {
92 92
         file_put_contents(\getTestsDirectory() . "/$this->name.errors", $output);
93 93
       }
94 94
     }
Please login to merge, or discard this patch.