Procházet zdrojové kódy

Refactored to a single if statement

Joris van de Sande před 12 roky
rodič
revize
2b5a6e3575
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  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);