Passed
Branch master (6cb744)
by Jakub
02:13
created
src/Environment.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@
 block discarded – undo
45 45
     static::printLine($output . ". $text");
46 46
   }
47 47
    
48
-   /**
49
-   * @param string $results
50
-   * @return bool
51
-   */
48
+    /**
49
+     * @param string $results
50
+     * @return bool
51
+     */
52 52
   static function checkFailed(string $results): bool {
53 53
     $testsFailed = substr_count($results, " failed. ");
54 54
     return (bool) $testsFailed;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester;
5 5
 
Please login to merge, or discard this patch.
src/mytester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 require_once __DIR__ . "/functions.php";
5 5
 
Please login to merge, or discard this patch.
src/TestCase.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester;
5 5
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
       $skip = false;
33 33
       $reason = "";
34 34
       foreach($value as $k => $v) {
35
-        switch ($k) {
35
+        switch($k) {
36 36
           case "php":
37 37
             $skip = version_compare(PHP_VERSION, (string) $v, "<");
38 38
             if($skip) {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
       $this->tearDown();
172 172
     }
173 173
     Environment::$currentJob = "";
174
-    switch ($job->result) {
174
+    switch($job->result) {
175 175
       case "passed":
176 176
         return ".";
177 177
         break;
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     $passed = true;
198 198
     foreach($jobs as $job) {
199 199
       $output .= $this->runJob($job);
200
-      if($job->result === "failed")  {
200
+      if($job->result === "failed") {
201 201
         $passed = false;
202 202
       }
203 203
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
     $passed = true;
198 198
     foreach($jobs as $job) {
199 199
       $output .= $this->runJob($job);
200
-      if($job->result === "failed")  {
200
+      if($job->result === "failed") {
201 201
         $passed = false;
202 202
       }
203 203
     }
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 function findVendorDirectory(): string {
5 5
   $recursionLimit = 10;
6
-  $findVendor = function ($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) {
7
-    if (!$recursionLimit--) {
6
+  $findVendor = function($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) {
7
+    if(!$recursionLimit--) {
8 8
       throw new \Exception("Cannot find vendor directory.");
9 9
     }
10 10
     $found = $dir . "/$dirName";
11
-    if (is_dir($found) || is_file($found)) {
11
+    if(is_dir($found) || is_file($found)) {
12 12
       return dirname($found);
13 13
     }
14 14
     return $findVendor($dirName, dirname($dir));
Please login to merge, or discard this patch.
src/Assert.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester;
5 5
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
       } else {
213 213
         Environment::testResult("The variable is $type.");
214 214
       }
215
-    } elseif (!$value instanceof $type) {
215
+    } elseif(!$value instanceof $type) {
216 216
       $actual = is_object($value) ? get_class($value) : gettype($value);
217 217
       Environment::testResult("The variable is instance of $actual.", false);
218 218
     } else {
Please login to merge, or discard this patch.
src/Bridges/NetteDI/MyTesterExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester\Bridges\NetteDI;
5 5
 
Please login to merge, or discard this patch.
src/Bridges/NetteDI/TestsRunner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester\Bridges\NetteDI;
5 5
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
       Environment::printLine("");
76 76
       $files = Finder::findFiles("*.errors")->in(\getTestsDirectory());
77 77
       foreach($files as $name => $file) {
78
-        Environment::printLine("--- ". substr($file->getBaseName(), 0, -7));
78
+        Environment::printLine("--- " . substr($file->getBaseName(), 0, -7));
79 79
         echo file_get_contents($name);
80 80
       }
81 81
     } else {
Please login to merge, or discard this patch.
src/Tester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester;
5 5
 
Please login to merge, or discard this patch.
src/Job.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 
4 4
 namespace MyTester;
5 5
 
Please login to merge, or discard this patch.