Passed
Pull Request — master (#736)
by Abdul Malik
06:39
created
src/Bridge/Stempler/tests/EngineTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $s = $this->getStempler();
59 59
 
60
-        try {
60
+        try{
61 61
             $s->get('echo', new ViewContext())->render();
62
-        } catch (RenderException $e) {
62
+        }catch (RenderException $e){
63 63
             $t = $e->getUserTrace()[0];
64 64
 
65 65
             $this->assertSame(2, $t['line']);
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $s = $this->getStempler();
73 73
 
74
-        try {
74
+        try{
75 75
             $s->get('other:echo-in', new ViewContext())->render();
76
-        } catch (RenderException $e) {
76
+        }catch (RenderException $e){
77 77
             $t = $e->getUserTrace();
78 78
             $this->assertCount(2, $t);
79 79
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $twig = $this->getStempler();
91 91
 
92
-        try {
92
+        try{
93 93
             $twig->get('other:bad', new ViewContext());
94
-        } catch (CompileException $e) {
94
+        }catch (CompileException $e){
95 95
             $this->assertStringContainsString('bad.dark.php', $e->getFile());
96 96
         }
97 97
     }
Please login to merge, or discard this patch.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,9 +57,12 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $s = $this->getStempler();
59 59
 
60
-        try {
60
+        try
61
+        {
61 62
             $s->get('echo', new ViewContext())->render();
62
-        } catch (RenderException $e) {
63
+        }
64
+        catch (RenderException $e)
65
+        {
63 66
             $t = $e->getUserTrace()[0];
64 67
 
65 68
             $this->assertSame(2, $t['line']);
@@ -71,9 +74,12 @@  discard block
 block discarded – undo
71 74
     {
72 75
         $s = $this->getStempler();
73 76
 
74
-        try {
77
+        try
78
+        {
75 79
             $s->get('other:echo-in', new ViewContext())->render();
76
-        } catch (RenderException $e) {
80
+        }
81
+        catch (RenderException $e)
82
+        {
77 83
             $t = $e->getUserTrace();
78 84
             $this->assertCount(2, $t);
79 85
 
@@ -89,9 +95,12 @@  discard block
 block discarded – undo
89 95
     {
90 96
         $twig = $this->getStempler();
91 97
 
92
-        try {
98
+        try
99
+        {
93 100
             $twig->get('other:bad', new ViewContext());
94
-        } catch (CompileException $e) {
101
+        }
102
+        catch (CompileException $e)
103
+        {
95 104
             $this->assertStringContainsString('bad.dark.php', $e->getFile());
96 105
         }
97 106
     }
Please login to merge, or discard this patch.
src/Bridge/Stempler/tests/CacheTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
 
36 36
     public function testCache(): void
37 37
     {
38
-        $this->assertCount(0, $this->files->getFiles(__DIR__ . '/cache/', '*.php'));
38
+        $this->assertCount(0, $this->files->getFiles(__DIR__.'/cache/', '*.php'));
39 39
 
40 40
         $s = $this->getStempler();
41 41
         $this->assertSame('test', $s->get('test', new ViewContext())->render([]));
42
-        $this->assertCount(2, $this->files->getFiles(__DIR__ . '/cache/', '*.php'));
42
+        $this->assertCount(2, $this->files->getFiles(__DIR__.'/cache/', '*.php'));
43 43
 
44 44
         $s->reset('test', new ViewContext());
45
-        $this->assertCount(0, $this->files->getFiles(__DIR__ . '/../cache/', '*.php'));
45
+        $this->assertCount(0, $this->files->getFiles(__DIR__.'/../cache/', '*.php'));
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Bridge/Stempler/tests/config/views.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 return [
4 4
     'cache'        => [
5 5
         'enabled'   => false,
6
-        'directory' => __DIR__ . '/../cache'
6
+        'directory' => __DIR__.'/../cache'
7 7
     ],
8 8
     'namespaces'   => [
9
-        'default'    => [__DIR__ . '/../fixtures/default'],
10
-        'other'      => [__DIR__ . '/../fixtures/other'],
11
-        'extensions' => [__DIR__ . '/../fixtures/other/extensions'],
9
+        'default'    => [__DIR__.'/../fixtures/default'],
10
+        'other'      => [__DIR__.'/../fixtures/other'],
11
+        'extensions' => [__DIR__.'/../fixtures/other/extensions'],
12 12
     ],
13 13
     'dependencies' => [],
14 14
     'engines'      => []
Please login to merge, or discard this patch.
src/Bridge/Stempler/tests/ConfigTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function testBootloaderDirective(): void
85 85
     {
86
-        $this->container->bind('testBinding', function () {
86
+        $this->container->bind('testBinding', function (){
87 87
             return 'test result';
88 88
         });
89 89
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function testBootloaderProcessors(): void
103 103
     {
104
-        $this->container->bind('testBinding', function () {
104
+        $this->container->bind('testBinding', function (){
105 105
             return 'test result';
106 106
         });
107 107
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
     public function testBootloaderVisitors(): void
121 121
     {
122
-        $this->container->bind('testBinding', function () {
122
+        $this->container->bind('testBinding', function (){
123 123
             return 'test result';
124 124
         });
125 125
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
     public function testBootloaderVisitors0(): void
139 139
     {
140
-        $this->container->bind('testBinding', function () {
140
+        $this->container->bind('testBinding', function (){
141 141
             return 'test result';
142 142
         });
143 143
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
     public function testBootloaderVisitors2(): void
157 157
     {
158
-        $this->container->bind('testBinding', function () {
158
+        $this->container->bind('testBinding', function (){
159 159
             return 'test result';
160 160
         });
161 161
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
     public function testBootloaderVisitors3(): void
175 175
     {
176
-        $this->container->bind('testBinding', function () {
176
+        $this->container->bind('testBinding', function (){
177 177
             return 'test result';
178 178
         });
179 179
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,8 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function testBootloaderDirective(): void
85 85
     {
86
-        $this->container->bind('testBinding', function () {
86
+        $this->container->bind('testBinding', function ()
87
+        {
87 88
             return 'test result';
88 89
         });
89 90
 
@@ -101,7 +102,8 @@  discard block
 block discarded – undo
101 102
 
102 103
     public function testBootloaderProcessors(): void
103 104
     {
104
-        $this->container->bind('testBinding', function () {
105
+        $this->container->bind('testBinding', function ()
106
+        {
105 107
             return 'test result';
106 108
         });
107 109
 
@@ -119,7 +121,8 @@  discard block
 block discarded – undo
119 121
 
120 122
     public function testBootloaderVisitors(): void
121 123
     {
122
-        $this->container->bind('testBinding', function () {
124
+        $this->container->bind('testBinding', function ()
125
+        {
123 126
             return 'test result';
124 127
         });
125 128
 
@@ -137,7 +140,8 @@  discard block
 block discarded – undo
137 140
 
138 141
     public function testBootloaderVisitors0(): void
139 142
     {
140
-        $this->container->bind('testBinding', function () {
143
+        $this->container->bind('testBinding', function ()
144
+        {
141 145
             return 'test result';
142 146
         });
143 147
 
@@ -155,7 +159,8 @@  discard block
 block discarded – undo
155 159
 
156 160
     public function testBootloaderVisitors2(): void
157 161
     {
158
-        $this->container->bind('testBinding', function () {
162
+        $this->container->bind('testBinding', function ()
163
+        {
159 164
             return 'test result';
160 165
         });
161 166
 
@@ -173,7 +178,8 @@  discard block
 block discarded – undo
173 178
 
174 179
     public function testBootloaderVisitors3(): void
175 180
     {
176
-        $this->container->bind('testBinding', function () {
181
+        $this->container->bind('testBinding', function ()
182
+        {
177 183
             return 'test result';
178 184
         });
179 185
 
Please login to merge, or discard this patch.
src/Bridge/Monolog/tests/FactoryTest.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         $this->assertNotEmpty($logger);
35 35
         $this->assertSame($logger, $factory->getLogger());
36
-        $this->assertSame($logger, $factory->getLogger(LogFactory::DEFAULT));
36
+        $this->assertSame($logger, $factory->getLogger(LogFactory::default));
37 37
     }
38 38
 
39 39
     public function testInjection(): void
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         $container = new Container();
54 54
         $container->bind(ConfiguratorInterface::class, new ConfigManager(
55
-            new class() implements LoaderInterface {
55
+            new class() implements LoaderInterface{
56 56
                 public function has(string $section): bool
57 57
                 {
58 58
                     return false;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $container = new Container();
81 81
         $container->bind(ConfiguratorInterface::class, new ConfigManager(
82
-            new class() implements LoaderInterface {
82
+            new class() implements LoaderInterface{
83 83
                 public function has(string $section): bool
84 84
                 {
85 85
                     return false;
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
         $container = new Container();
54 54
         $container->bind(ConfiguratorInterface::class, new ConfigManager(
55
-            new class() implements LoaderInterface {
55
+            new class() implements LoaderInterface
56
+            {
56 57
                 public function has(string $section): bool
57 58
                 {
58 59
                     return false;
@@ -79,7 +80,8 @@  discard block
 block discarded – undo
79 80
     {
80 81
         $container = new Container();
81 82
         $container->bind(ConfiguratorInterface::class, new ConfigManager(
82
-            new class() implements LoaderInterface {
83
+            new class() implements LoaderInterface
84
+            {
83 85
                 public function has(string $section): bool
84 86
                 {
85 87
                     return false;
Please login to merge, or discard this patch.
src/Bridge/Dotenv/tests/LoadTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function testNotFound()
20 20
     {
21 21
         $e = new Environment();
22
-        $d = new Directories(['root' => __DIR__ . '/..']);
22
+        $d = new Directories(['root' => __DIR__.'/..']);
23 23
 
24 24
         $b = new DotenvBootloader();
25 25
         $b->boot($d, $e);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function testFoundCustom()
42 42
     {
43 43
         $e = new Environment([
44
-            'DOTENV_PATH' => __DIR__ . '/.env.custom'
44
+            'DOTENV_PATH' => __DIR__.'/.env.custom'
45 45
         ]);
46 46
 
47 47
         $d = new Directories(['root' => __DIR__]);
Please login to merge, or discard this patch.
src/Framework/Domain/GuardInterceptor.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $permission = $this->permissions->getPermission($controller, $action);
43 43
 
44
-        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)) {
44
+        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)){
45 45
             throw new ControllerException($permission->message, $permission->code);
46 46
         }
47 47
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@
 block discarded – undo
41 41
     {
42 42
         $permission = $this->permissions->getPermission($controller, $action);
43 43
 
44
-        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters)) {
44
+        if ($permission->ok && !$this->guard->allows($permission->permission, $parameters))
45
+        {
45 46
             throw new ControllerException($permission->message, $permission->code);
46 47
         }
47 48
 
Please login to merge, or discard this patch.
src/Bridge/Monolog/src/EventHandler.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         ListenerRegistryInterface $listenerRegistry,
31 31
         int $level = Logger::DEBUG,
32 32
         bool $bubble = true
33
-    ) {
33
+    ){
34 34
         $this->listenerRegistry = $listenerRegistry;
35 35
 
36 36
         parent::__construct($level, $bubble);
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $record['context']
51 51
         );
52 52
 
53
-        foreach ($this->listenerRegistry->getListeners() as $listener) {
53
+        foreach ($this->listenerRegistry->getListeners() as $listener){
54 54
             call_user_func($listener, $e);
55 55
         }
56 56
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,8 @@
 block discarded – undo
50 50
             $record['context']
51 51
         );
52 52
 
53
-        foreach ($this->listenerRegistry->getListeners() as $listener) {
53
+        foreach ($this->listenerRegistry->getListeners() as $listener)
54
+        {
54 55
             call_user_func($listener, $e);
55 56
         }
56 57
 
Please login to merge, or discard this patch.
src/Bridge/DataGrid/src/Writer/PostgresQueryWriter.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
33 33
     {
34
-        if (!$this->targetAcceptable($source)) {
34
+        if (!$this->targetAcceptable($source)){
35 35
             return null;
36 36
         }
37 37
 
38
-        if ($specification instanceof Specification\Filter\Postgres\ILike) {
38
+        if ($specification instanceof Specification\Filter\Postgres\ILike){
39 39
             return $source->where(
40 40
                 $specification->getExpression(),
41 41
                 'ILIKE',
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             class_exists(SelectQuery::class)
57 57
             && $target instanceof SelectQuery
58 58
             && $target->getDriver() instanceof PostgresDriver
59
-        ) {
59
+        ){
60 60
             return true;
61 61
         }
62 62
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             class_exists(Select::class)
65 65
             && $target instanceof Select
66 66
             && $target->buildQuery()->getDriver() instanceof PostgresDriver
67
-        ) {
67
+        ){
68 68
             return true;
69 69
         }
70 70
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     protected function fetchValue($value)
81 81
     {
82
-        if ($value instanceof Specification\ValueInterface) {
82
+        if ($value instanceof Specification\ValueInterface){
83 83
             throw new CompilerException('Value expects user input, none given');
84 84
         }
85 85
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,11 +31,13 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
33 33
     {
34
-        if (!$this->targetAcceptable($source)) {
34
+        if (!$this->targetAcceptable($source))
35
+        {
35 36
             return null;
36 37
         }
37 38
 
38
-        if ($specification instanceof Specification\Filter\Postgres\ILike) {
39
+        if ($specification instanceof Specification\Filter\Postgres\ILike)
40
+        {
39 41
             return $source->where(
40 42
                 $specification->getExpression(),
41 43
                 'ILIKE',
@@ -79,7 +81,8 @@  discard block
 block discarded – undo
79 81
      */
80 82
     protected function fetchValue($value)
81 83
     {
82
-        if ($value instanceof Specification\ValueInterface) {
84
+        if ($value instanceof Specification\ValueInterface)
85
+        {
83 86
             throw new CompilerException('Value expects user input, none given');
84 87
         }
85 88
 
Please login to merge, or discard this patch.