Showing 6 of 6 total issues
Method checkForRedirect
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkForRedirect(): ?Redirect { $requesturi = (string) $this->options['request.uri']; if (static::isKnownValidRoute($requesturi)) { return null;
Similar blocks of code found in 2 locations. Consider refactoring. Open
'drupal' => [ ['fromuri' => 'user/login', 'touri' => '', 'code' => 404], ['fromuri' => 'user/register', 'touri' => '', 'code' => 404], ['fromuri' => 'admin\/.*', 'touri' => '', 'code' => 404], // catch-all (1) // ['fromuri' => 'admin/config', 'touri' => '', 'code' => 404],
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
'joomla' => [ ['fromuri' => 'administrator/index.php', 'touri' => '', 'code' => 404], ['fromuri' => 'administrator\/components\/.*', 'touri' => '', 'code' => 404], ['fromuri' => 'components\/com_users\/.*', 'touri' => '', 'code' => 404], ['fromuri' => 'components\/com_content\/.*', 'touri' => '', 'code' => 404],
- Read upRead up
Function checkForRedirect
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function checkForRedirect(): ?Redirect { $requesturi = (string) $this->options['request.uri']; if (static::isKnownValidRoute($requesturi)) { return null;
- Read upRead up
Function remove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function remove(array $change): bool { // wrap single change in array of changes if (count($change) === count($change, COUNT_RECURSIVE)) { $change = [$change];
- Read upRead up
Function matches
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function matches(string $url): bool { $from = rtrim($this->from(), '/'); // plain string
- Read upRead up