@@ -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 ;
0 commit comments