Passed
Push — master ( 1265b0...980196 )
by Fran
03:08
created
src/base/types/traits/Router/ModulesTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
         if ($files->hasResults()) {
55 55
             foreach ($files->getIterator() as $file) {
56 56
                 if ($namespace !== Router::PSFS_BASE_NAMESPACE && method_exists($file, 'getRelativePathname')) {
57
-                    $filename = '\\' . str_replace('/', '\\', str_replace($origen, '', $file->getRelativePathname()));
58
-                } else {
57
+                    $filename = '\\'.str_replace('/', '\\', str_replace($origen, '', $file->getRelativePathname()));
58
+                }else {
59 59
                     $filename = str_replace('/', '\\', str_replace($origen, '', $file->getPathname()));
60 60
                 }
61
-                $routing = $this->addRouting($namespace . str_replace('.php', '', $filename), $routing, $namespace);
61
+                $routing = $this->addRouting($namespace.str_replace('.php', '', $filename), $routing, $namespace);
62 62
             }
63 63
         }
64 64
         $this->initializeFinder();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             if (!is_array($this->domains)) {
112 112
                 $this->domains = [];
113 113
             }
114
-            $domain = '@' . $class->getConstant('DOMAIN') . '/';
114
+            $domain = '@'.$class->getConstant('DOMAIN').'/';
115 115
             if (!array_key_exists($domain, $this->domains)) {
116 116
                 $this->domains[$domain] = RouterHelper::extractDomainInfo($class, $domain);
117 117
             }
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
     private function loadExternalAutoloader($hydrateRoute, SplFileInfo $modulePath, $externalModulePath, &$routing = [])
139 139
     {
140 140
         $extModule = $modulePath->getBasename();
141
-        $moduleAutoloader = realpath($externalModulePath . DIRECTORY_SEPARATOR . $extModule . DIRECTORY_SEPARATOR . 'autoload.php');
141
+        $moduleAutoloader = realpath($externalModulePath.DIRECTORY_SEPARATOR.$extModule.DIRECTORY_SEPARATOR.'autoload.php');
142 142
         if (file_exists($moduleAutoloader)) {
143 143
             include_once $moduleAutoloader;
144 144
             if ($hydrateRoute) {
145
-                $routing = $this->inspectDir($externalModulePath . DIRECTORY_SEPARATOR . $extModule, '\\' . $extModule, $routing);
145
+                $routing = $this->inspectDir($externalModulePath.DIRECTORY_SEPARATOR.$extModule, '\\'.$extModule, $routing);
146 146
             }
147 147
         }
148 148
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         try {
159 159
             $module = preg_replace('/(\\\|\/)/', DIRECTORY_SEPARATOR, $module);
160
-            $externalModulePath = VENDOR_DIR . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'src';
160
+            $externalModulePath = VENDOR_DIR.DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'src';
161 161
             if (file_exists($externalModulePath)) {
162 162
                 $externalModule = $this->finder->directories()->in($externalModulePath)->depth(0);
163 163
                 if ($externalModule->hasResults()) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     }
167 167
                 }
168 168
             }
169
-        } catch (Exception $e) {
169
+        }catch (Exception $e) {
170 170
             Logger::log($e->getMessage(), LOG_WARNING);
171 171
         }
172 172
     }
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
     public function domainExists($domainToCheck) {
179 179
         $exists = false;
180 180
         $domains = array_keys($this->getDomains());
181
-        foreach($domains as $domain) {
181
+        foreach ($domains as $domain) {
182 182
             $cleanDomain = strtolower(str_replace(['@', '/', '\\'], '', $domain));
183
-            if($cleanDomain === strtolower($domainToCheck)) {
183
+            if ($cleanDomain === strtolower($domainToCheck)) {
184 184
                 $exists = true;
185 185
                 break;
186 186
             }
Please login to merge, or discard this patch.