Commit 2c8e35cc authored by Franco Fichtner's avatar Franco Fichtner

mvc: stype/whitespace sweep

parent 556e6a43
...@@ -50,4 +50,4 @@ abstract class BaseConstraint extends Validator implements ValidatorInterface ...@@ -50,4 +50,4 @@ abstract class BaseConstraint extends Validator implements ValidatorInterface
} }
$validator->appendMessage(new Message($message, $attribute, $name)); $validator->appendMessage(new Message($message, $attribute, $name));
} }
} }
\ No newline at end of file
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
*/ */
namespace OPNsense\Base\Constraints; namespace OPNsense\Base\Constraints;
/** /**
* Class UniqueConstraint, add a unique constraint to this field and optional additional fields. * Class UniqueConstraint, add a unique constraint to this field and optional additional fields.
* @package OPNsense\Base\Constraints * @package OPNsense\Base\Constraints
...@@ -88,5 +87,4 @@ class UniqueConstraint extends BaseConstraint ...@@ -88,5 +87,4 @@ class UniqueConstraint extends BaseConstraint
} }
return true; return true;
} }
}
}
\ No newline at end of file
...@@ -37,10 +37,9 @@ use OPNsense\Core\Config; ...@@ -37,10 +37,9 @@ use OPNsense\Core\Config;
$class_info = new \ReflectionClass("OPNsense\\Base\\BaseModel"); $class_info = new \ReflectionClass("OPNsense\\Base\\BaseModel");
$executed_migration = false; $executed_migration = false;
$model_dir = dirname($class_info->getFileName())."/../../"; $model_dir = dirname($class_info->getFileName())."/../../";
foreach (new RecursiveIteratorIterator (new RecursiveDirectoryIterator ($model_dir)) as $x) foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($model_dir)) as $x) {
{
if (strtolower(substr($x->getPathname(), -4)) == '.php') { if (strtolower(substr($x->getPathname(), -4)) == '.php') {
$classname = str_replace('/','\\', explode('.', str_replace($model_dir, '', $x->getPathname()))[0]) ; $classname = str_replace('/', '\\', explode('.', str_replace($model_dir, '', $x->getPathname()))[0]) ;
try { try {
$mdl_class_info = new \ReflectionClass($classname); $mdl_class_info = new \ReflectionClass($classname);
$parent = $mdl_class_info->getParentClass(); $parent = $mdl_class_info->getParentClass();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment