Skip to content

Commit 870efef

Browse files
committed
rename variable
1 parent 90a9cc1 commit 870efef

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/Illuminate/Routing/RouteGroup.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ class RouteGroup
1111
*
1212
* @param array $new
1313
* @param array $old
14-
* @param bool $prefixOldFirst
14+
* @param bool $prependExistingPrefix
1515
* @return array
1616
*/
17-
public static function merge($new, $old, $prefixOldFirst = true)
17+
public static function merge($new, $old, $prependExistingPrefix = true)
1818
{
1919
if (isset($new['domain'])) {
2020
unset($old['domain']);
2121
}
2222

2323
$new = array_merge(static::formatAs($new, $old), [
2424
'namespace' => static::formatNamespace($new, $old),
25-
'prefix' => static::formatPrefix($new, $old, $prefixOldFirst),
25+
'prefix' => static::formatPrefix($new, $old, $prependExistingPrefix),
2626
'where' => static::formatWhere($new, $old),
2727
]);
2828

@@ -54,14 +54,14 @@ protected static function formatNamespace($new, $old)
5454
*
5555
* @param array $new
5656
* @param array $old
57-
* @param bool $prefixOldFirst
57+
* @param bool $prependExistingPrefix
5858
* @return string|null
5959
*/
60-
protected static function formatPrefix($new, $old, $prefixOldFirst = true)
60+
protected static function formatPrefix($new, $old, $prependExistingPrefix = true)
6161
{
6262
$old = $old['prefix'] ?? null;
6363

64-
if ($prefixOldFirst) {
64+
if ($prependExistingPrefix) {
6565
return isset($new['prefix']) ? trim($old, '/').'/'.trim($new['prefix'], '/') : $old;
6666
} else {
6767
return isset($new['prefix']) ? trim($new['prefix'], '/').'/'.trim($old, '/') : $old;

src/Illuminate/Routing/Router.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,12 @@ protected function updateGroupStack(array $attributes)
395395
* Merge the given array with the last group stack.
396396
*
397397
* @param array $new
398-
* @param bool $prefixOldFirst
398+
* @param bool $prependExistingPrefix
399399
* @return array
400400
*/
401-
public function mergeWithLastGroup($new, $prefixOldFirst = true)
401+
public function mergeWithLastGroup($new, $prependExistingPrefix = true)
402402
{
403-
return RouteGroup::merge($new, end($this->groupStack), $prefixOldFirst);
403+
return RouteGroup::merge($new, end($this->groupStack), $prependExistingPrefix);
404404
}
405405

406406
/**
@@ -585,7 +585,10 @@ protected function addWhereClausesToRoute($route)
585585
*/
586586
protected function mergeGroupAttributesIntoRoute($route)
587587
{
588-
$route->setAction($this->mergeWithLastGroup($route->getAction(), false));
588+
$route->setAction($this->mergeWithLastGroup(
589+
$route->getAction(),
590+
$prependExistingPrefix = false
591+
));
589592
}
590593

591594
/**

0 commit comments

Comments
 (0)