- Small refractoring of code, merge tokens

- Completed block token
This commit is contained in:
Dave Mc Nicoll committed 2020-05-04 22:50:02 -04:00
1 parent bf3816c3db
commit ce4ef6351a
21 files changed
+370 -194

No files matched your search

+10 -13
View File
@@ -169,7 +169,6 @@ class UrlExtension implements Extension {
$variable = $item[1];
}
if ( array_key_exists($variable, $arguments) ) {
$value = $arguments[ $item[1] ];
}
@@ -179,18 +178,16 @@ class UrlExtension implements Extension {
else {
$variable = $item[1];
}
if ( array_key_exists($variable, $arguments) ) {
$value = $arguments[ $item[1] ];
}
else if ( isset($default) ) {
$value = $default;
}
else {
throw new \InvalidArgumentException("Argument `$variable` is missing within required route parameter(s)");
}
# if ( array_key_exists($variable, $arguments) ) {
# $value = $arguments[ $item[1] ];
# }
# else if ( isset($default) ) {
# $value = $default;
# }
# else {
# throw new \InvalidArgumentException("Argument `$variable` is missing within required route parameter(s)");
# }
$search[ $item[0] ] = $value;
unset($arguments[ $item[1] ]);