Completed
Push — master ( 59e65b...e3279b )
by Jesse
02:05
created
src/Container.php 2 patches
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,16 +82,24 @@
 block discarded – undo
82 82
     /** @throws ServiceNotFound */
83 83
     private function mustKnowAbout(string $theService)
84 84
     {
85
-        if ($this->has($theService)) return;
85
+        if ($this->has($theService)) {
86
+            return;
87
+        }
86 88
         throw ServiceNotFound::noServiceNamed($theService);
87 89
     }
88 90
 
89 91
     /** @throws InvalidServiceDefinition */
90 92
     private function typeMustCheckOut(string $serviceName, $service, string $requiredType)
91 93
     {
92
-        if (empty($requiredType)) return;
93
-        if (gettype($service) === $requiredType) return;
94
-        if ($service instanceof $requiredType) return;
94
+        if (empty($requiredType)) {
95
+            return;
96
+        }
97
+        if (gettype($service) === $requiredType) {
98
+            return;
99
+        }
100
+        if ($service instanceof $requiredType) {
101
+            return;
102
+        }
95 103
         throw InvalidServiceType::serviceIsNotOfType($serviceName, $requiredType);
96 104
     }
97 105
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di;
6 6
 
Please login to merge, or discard this patch.
src/Exception/DependenciesCannotBeCircular.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Exception/InvalidServiceType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Exception/InvalidServiceDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Exception/InvalidFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di\Exception;
6 6
 
Please login to merge, or discard this patch.
src/Exception/ServiceNotFound.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di\Exception;
6 6
 
Please login to merge, or discard this patch.
src/ArrayAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di;
6 6
 
Please login to merge, or discard this patch.
src/ContainerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Stratadox\Di;
6 6
 
Please login to merge, or discard this patch.