Optimized Tests and attributes

This commit is contained in:
Kevin Frantz committed 2019-01-27 18:38:21 +01:00
1 parent 0593a8f1c3
commit 17a6ee1dc6
7 files changed
+45 -6

No files matched your search

@@ -2,6 +2,8 @@
namespace App\Domain\ActionManagement;
use App\Exception\NoDefaultClassException;
/**
* @author kevinfrantz
*/
@@ -56,8 +58,10 @@ final class ActionFactoryService extends AbstractActionConstructor implements Ac
return $class;
}
$defaultClass = $this->getActionNamespace($action);
return $defaultClass;
if (class_exists($defaultClass)) {
return $defaultClass;
}
throw new NoDefaultClassException("There is no default substitution class for $class with attributes {layer:\"$layer\",action:\"$action\"}");
}
/**