Completed
Push — master ( 8abb49...03fc9d )
by Jakub
01:40
created
tests/TestCaseTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
     public function dataProvider(): array
71 71
     {
72
-        return ["abc", "adef",];
72
+        return ["abc", "adef", ];
73 73
     }
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
tests/DataProviderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@
 block discarded – undo
67 67
     public function dataSource(): array
68 68
     {
69 69
         return [
70
-            ["abc",],
71
-            ["def",],
70
+            ["abc", ],
71
+            ["def", ],
72 72
         ];
73 73
     }
74 74
 }
Please login to merge, or discard this patch.
code-coverage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 $coverage = new CodeCoverage((new Selector())->forLineCoverage($filter), $filter);
16 16
 $coverage->start("My Tester");
17
-register_shutdown_function(function () use ($coverage) {
17
+register_shutdown_function(function() use ($coverage) {
18 18
     $coverage->stop();
19 19
     (new Clover())->process($coverage, __DIR__ . "/coverage.xml");
20 20
 });
Please login to merge, or discard this patch.
src/TestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         static $jobs = [];
58 58
         if (count($jobs) === 0) {
59 59
             $r = new ReflectionClass(static::class);
60
-            $methods = array_values(preg_grep(static::METHOD_PATTERN, array_map(function (ReflectionMethod $rm) {
60
+            $methods = array_values(preg_grep(static::METHOD_PATTERN, array_map(function(ReflectionMethod $rm) {
61 61
                 return $rm->getName();
62 62
             }, $r->getMethods())));
63 63
             foreach ($methods as $method) {
Please login to merge, or discard this patch.
src/TAssertions.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         if ($success) {
23 23
             return;
24 24
         }
25
-        echo "Test $this->taskCount failed. $text\n";
25
+        echo "test $this->taskCount failed. $text\n";
26 26
     }
27 27
 
28 28
     /**
Please login to merge, or discard this patch.
src/Tester.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,8 @@
 block discarded – undo
39 39
         $this->onExecute[] = [$this, "setup"];
40 40
         $this->onExecute[] = [$this, "printInfo"];
41 41
         $this->testsSuitesFinder = $testsSuitesFinder ?? new TestSuitesFinder();
42
-        $this->testSuiteFactory = $testSuiteFactory ?? new class implements ITestSuiteFactory {
42
+        $this->testSuiteFactory = $testSuiteFactory ?? new class implements ITestSuiteFactory
43
+        {
43 44
             public function create(string $className): TestCase
44 45
             {
45 46
                 return new $className();
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
             if ($skipped->reason) {
131 131
                 $reason = ": {$skipped->reason}";
132 132
             }
133
-            echo "Skipped $skipped->name$reason\n";
133
+            echo "skipped $skipped->name$reason\n";
134 134
         }
135 135
     }
136 136
 
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 function findVendorDirectory(): string
6 6
 {
7 7
     $recursionLimit = 10;
8
-    $findVendor = function ($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) {
8
+    $findVendor = function($dirName = "vendor/bin", $dir = __DIR__) use (&$findVendor, &$recursionLimit) {
9 9
         if (!$recursionLimit--) {
10 10
             throw new Exception("Cannot find vendor directory.");
11 11
         }
Please login to merge, or discard this patch.
src/DataProvider.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@
 block discarded – undo
42 42
             try {
43 43
                 $reflection = new ReflectionMethod($class, $dataProvider);
44 44
                 if (!$reflection->isPublic()) {
45
-                    throw new InvalidDataProviderException("Method $className::$dataProvider is not public.");
45
+                    throw new InvalidDataProviderException("method $className::$dataProvider is not public.");
46 46
                 }
47 47
                 $result = call_user_func([$class, $dataProvider]);
48 48
                 if (!is_array($result)) {
49
-                    throw new InvalidDataProviderException("Method $className::$dataProvider has to return an array.");
49
+                    throw new InvalidDataProviderException("method $className::$dataProvider has to return an array.");
50 50
                 }
51 51
                 return $result;
52 52
             } catch (\ReflectionException $e) {
53
-                throw new InvalidDataProviderException("Method $className::$dataProvider does not exist.", 0, $e);
53
+                throw new InvalidDataProviderException("method $className::$dataProvider does not exist.", 0, $e);
54 54
             }
55 55
         }
56 56
         return [];
Please login to merge, or discard this patch.