Passed
Push — master ( e259b8...fa2a3f )
by Phillip
02:22 queued 19s
created
src/Proxy/LocatorProxyFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
     public function create(string $moduleName) : LocatorProxyInterface
30 30
     {
31 31
         $proxy = new LocatorProxy($this->searchableNamespaces, $moduleName);
32
-        if(get_class($proxy->factory()) === EmptyFactory::class
33
-            && get_class($proxy->facade()) === EmptyFacade::class){
32
+        if (get_class($proxy->factory()) === EmptyFactory::class
33
+            && get_class($proxy->facade()) === EmptyFacade::class) {
34 34
             throw new NotFoundException(sprintf('Module %s was not found. You need at least a factory or a facade', $moduleName));
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/Locator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function locate(string $moduleName) : LocatorProxyInterface
36 36
     {
37
-        if(!isset($this->proxies[$moduleName])){
37
+        if (!isset($this->proxies[$moduleName])) {
38 38
             $this->proxies[$moduleName] = $this->factory->create($moduleName);
39 39
         }
40 40
 
Please login to merge, or discard this patch.
src/Proxy/LocatorProxy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function factory(): FactoryInterface
53 53
     {
54
-        if($this->factory === null) {
54
+        if ($this->factory === null) {
55 55
             try {
56 56
                 $className = $this->searchInNamespaces('Factory', FactoryInterface::class);
57 57
             } catch (NotFoundException $e) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function facade(): FacadeInterface
71 71
     {
72
-        if($this->facade === null) {
72
+        if ($this->facade === null) {
73 73
             try {
74 74
                 $className = $this->searchInNamespaces('Facade', FacadeInterface::class);
75 75
             } catch (NotFoundException $e) {
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
      */
91 91
     private function searchInNamespaces(string $expectedClassBaseName, string $expectedInterface)
92 92
     {
93
-        foreach($this->searchableNamespaces as $namespace){
93
+        foreach ($this->searchableNamespaces as $namespace) {
94 94
             $expectedClassName = $namespace . sprintf(self::$classNameSchema, $this->locateName, $expectedClassBaseName);
95
-            if(class_exists($expectedClassName) === true
96
-                && in_array($expectedInterface, class_implements($expectedClassName))){
95
+            if (class_exists($expectedClassName) === true
96
+                && in_array($expectedInterface, class_implements($expectedClassName))) {
97 97
                 return $expectedClassName;
98 98
             }
99 99
         }
Please login to merge, or discard this patch.