Completed
Branch master (8818d0)
by Baptiste
06:16
created
src/Context/AbstractJson.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -4,13 +4,10 @@
 block discarded – undo
4 4
 use stdClass;
5 5
 use Datetime;
6 6
 use InvalidArgumentException;
7
-
8 7
 use Behat\Behat\Context\Context;
9 8
 use Behat\Gherkin\Node\PyStringNode;
10
-
11 9
 use Symfony\Component\PropertyAccess\PropertyAccess;
12 10
 use Symfony\Component\PropertyAccess\PropertyAccessor;
13
-
14 11
 use Behapi\Extension\Tools\Assert;
15 12
 
16 13
 abstract class AbstractJson implements Context
Please login to merge, or discard this patch.
src/Context/Rest.php 1 patch
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,23 +2,17 @@
 block discarded – undo
2 2
 namespace Behapi\Context;
3 3
 
4 4
 use RuntimeException;
5
-
6 5
 use Psr\Http\Message\RequestInterface;
7
-
8 6
 use Behat\Behat\Context\Context;
9 7
 use Behat\Gherkin\Node\TableNode;
10
-
11 8
 use Http\Client\HttpClient;
12 9
 use Http\Message\StreamFactory;
13 10
 use Http\Message\MessageFactory;
14
-
15 11
 use Twig_Environment;
16
-
17 12
 use Behapi\Extension\Context\ApiTrait;
18 13
 use Behapi\Extension\Context\ApiInterface;
19 14
 use Behapi\Extension\Context\TwigInterface;
20 15
 use Behapi\Extension\Context\TwigTrait;
21
-
22 16
 use Behapi\Extension\Tools\Assert;
23 17
 use Behapi\Extension\Tools\HttpHistory;
24 18
 
Please login to merge, or discard this patch.
src/Extension/Behapi.php 2 patches
Unused Use Statements   -26 removed lines patch added patch discarded remove patch
@@ -4,38 +4,12 @@
 block discarded – undo
4 4
 use Behat\Testwork\ServiceContainer\Extension;
5 5
 use Behat\Testwork\ServiceContainer\ExtensionManager;
6 6
 use Behat\Testwork\Cli\ServiceContainer\CliExtension;
7
-
8 7
 use Behat\Behat\HelperContainer\ServiceContainer\HelperContainerExtension;
9
-
10 8
 use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
11
-
12 9
 use Symfony\Component\DependencyInjection\Reference;
13
-use Symfony\Component\DependencyInjection\Definition;
14 10
 use Symfony\Component\DependencyInjection\ContainerBuilder;
15
-
16
-use Twig_Environment;
17
-
18
-use Psr\Http\Message\UriInterface;
19
-
20
-use Http\Client\HttpClient;
21
-
22
-use Http\Message\UriFactory;
23
-use Http\Message\StreamFactory;
24
-use Http\Message\MessageFactory;
25
-
26
-use Http\Discovery\HttpClientDiscovery;
27
-use Http\Discovery\UriFactoryDiscovery;
28
-use Http\Discovery\StreamFactoryDiscovery;
29
-use Http\Discovery\MessageFactoryDiscovery;
30
-
31
-use Http\Client\Common\PluginClient;
32
-use Http\Client\Common\Plugin\BaseUriPlugin;
33
-use Http\Client\Common\Plugin\HistoryPlugin;
34
-use Http\Client\Common\Plugin\ContentLengthPlugin;
35
-
36 11
 use Behapi\Extension\Tools\Debug;
37 12
 use Behapi\Extension\Tools\HttpHistory as History;
38
-
39 13
 use Behapi\Extension\Cli\DebugController;
40 14
 use Behapi\Extension\EventListener\DebugHttp;
41 15
 use Behapi\Extension\EventListener\HttpHistory;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
                                 ->thenUnset()
101 101
                             ->end()
102 102
                             ->validate()
103
-                            ->ifTrue(function ($v) { return !is_dir($v); })
103
+                            ->ifTrue(function($v) { return !is_dir($v); })
104 104
                                 ->thenInvalid('Directory does not exist')
105 105
                             ->end()
106 106
                         ->end()
Please login to merge, or discard this patch.
src/Extension/Cli/DebugController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,13 +3,10 @@
 block discarded – undo
3 3
 
4 4
 use Symfony\Component\Console\Command\Command;
5 5
 use Symfony\Component\Console\Output\OutputInterface;
6
-
7 6
 use Symfony\Component\Console\Input\InputOption;
8 7
 use Symfony\Component\Console\Input\InputInterface;
9
-
10 8
 use Behat\Testwork\Cli\Controller;
11 9
 use Behat\Testwork\Output\OutputManager;
12
-
13 10
 use Behapi\Extension\Tools\Debug;
14 11
 
15 12
 final class DebugController implements Controller
Please login to merge, or discard this patch.
src/Extension/Container.php 2 patches
Unused Use Statements   -9 removed lines patch added patch discarded remove patch
@@ -3,30 +3,21 @@
 block discarded – undo
3 3
 
4 4
 use Twig_Environment;
5 5
 use Twig_Loader_Array;
6
-
7
-use Psr\Http\Message\UriInterface;
8 6
 use Interop\Container\ContainerInterface;
9
-
10
-use Http\Message\UriFactory;
11 7
 use Http\Message\StreamFactory;
12 8
 use Http\Message\MessageFactory;
13
-
14 9
 use Http\Discovery\HttpClientDiscovery;
15 10
 use Http\Discovery\UriFactoryDiscovery;
16 11
 use Http\Discovery\StreamFactoryDiscovery;
17 12
 use Http\Discovery\MessageFactoryDiscovery;
18
-
19 13
 use Http\Client\HttpClient;
20 14
 use Http\Client\Common\PluginClient;
21 15
 use Http\Client\Common\Plugin\BaseUriPlugin;
22 16
 use Http\Client\Common\Plugin\HistoryPlugin;
23 17
 use Http\Client\Common\Plugin\ContentLengthPlugin;
24
-
25 18
 use Behapi\Extension\Tools\Debug;
26 19
 use Behapi\Extension\Tools\HttpHistory;
27
-
28 20
 use Behapi\Extension\ServiceContainer\NotFoundException;
29
-use Behapi\Extension\ServiceContainer\ServiceNotAvailableException;
30 21
 
31 22
 class Container implements ContainerInterface
32 23
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             return $this->services[$id];
79 79
         }
80 80
 
81
-        switch($id) {
81
+        switch ($id) {
82 82
             case 'http.history':
83 83
                 return $this->history;
84 84
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         return $this->services['http.stream_factory'] = StreamFactoryDiscovery::find();
125 125
     }
126 126
 
127
-    private function getTwigService(): ?Twig_Environment
127
+    private function getTwigService(): ? Twig_Environment
128 128
     {
129 129
         if (!class_exists(Twig_Environment::class)) {
130 130
             return $this->services['twig'] = null;
Please login to merge, or discard this patch.
src/Extension/EventListener/DebugHttp.php 2 patches
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -3,20 +3,15 @@
 block discarded – undo
3 3
 
4 4
 use Psr\Http\Message\RequestInterface;
5 5
 use Psr\Http\Message\ResponseInterface;
6
-
7 6
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
8
-
9 7
 use Behat\Testwork\Tester\Result\TestResult;
10 8
 use Behat\Testwork\Tester\Result\TestResults;
11 9
 use Behat\Testwork\EventDispatcher\Event\AfterTested;
12
-
13 10
 use Behat\Behat\EventDispatcher\Event\OutlineTested;
14 11
 use Behat\Behat\EventDispatcher\Event\ScenarioTested;
15 12
 use Behat\Behat\EventDispatcher\Event\BackgroundTested;
16 13
 use Behat\Behat\EventDispatcher\Event\GherkinNodeTested;
17
-
18 14
 use Behat\Gherkin\Node\TaggedNodeInterface;
19
-
20 15
 use Behapi\Extension\Tools\Debug;
21 16
 use Behapi\Extension\Tools\HttpHistory;
22 17
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         }
119 119
     }
120 120
 
121
-    private function debug(?RequestInterface $request, ?ResponseInterface $response): void
121
+    private function debug(? RequestInterface $request, ? ResponseInterface $response) : void
122 122
     {
123 123
         if (!$request instanceof RequestInterface) {
124 124
             return;
Please login to merge, or discard this patch.
src/Extension/Tools/HttpHistory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         reset($this->tuples);
53 53
     }
54 54
 
55
-    public function getLastResponse(): ?ResponseInterface
55
+    public function getLastResponse(): ? ResponseInterface
56 56
     {
57 57
         if (1 > count($this->tuples)) {
58 58
             return null;
Please login to merge, or discard this patch.