Sfoglia il codice sorgente

Refactored to a single if statement

Joris van de Sande 12 anni fa
parent
commit
2b5a6e3575
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      Admin/Admin.php

+ 2 - 4
Admin/Admin.php

@@ -1087,10 +1087,8 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
     {
         $this->buildRoutes();
 
-        if (! $this->isChild()) {
-            if (strpos($name, '.')) {
-                $name = $this->getCode() . '|' . $name;
-            }
+        if (! $this->isChild() && strpos($name, '.') !== false) {
+            $name = $this->getCode() . '|' . $name;
         }
 
         return $this->routes->has($name);