Showing 1,364 of 1,364 total issues
Opening brace of a interface must be on the line after the definition Open
Open
interface UserAgentMatcherInterface extends LoggerAwareInterface {
- Exclude checks
Opening brace of a trait must be on the line after the definition Open
Open
trait LogsIfAvailableTrait {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class RobotsTxtParser implements LoggerAwareInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
abstract class DirectiveProcessorsFactory {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
abstract class AbstractDirectiveProcessor implements DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class AllowProcessor extends AbstractAllowanceProcessor implements DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class SitemapProcessor extends AbstractDirectiveProcessor implements DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class Url implements LoggerAwareInterface {
- Exclude checks
Opening brace of a interface must be on the line after the definition Open
Open
interface DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class UserAgentProcessor extends AbstractDirectiveProcessor implements DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
abstract class AbstractAllowanceProcessor extends AbstractDirectiveProcessor implements DirectiveProcessorInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class DisallowProcessor extends AbstractAllowanceProcessor implements DirectiveProcessorInterface {
- Exclude checks
Function build
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function build(): array {
$currentUserAgent = '*';
$tree = [];
$prevLine = '';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getHost
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getHost(?string $userAgent = null) {
$this->buildTree();
if (!is_null($userAgent)) {
$userAgent = $this->userAgentMatcher->getMatching($userAgent, array_keys($this->tree));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Opening brace of a class must be on the line after the definition Open
Open
class SkipCommentedLinesFilter extends \php_user_filter implements CustomFilterInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class SkipEndOfCommentedLineFilter extends \php_user_filter implements CustomFilterInterface {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class GeneratorBasedReader implements ReaderInterface {
- Exclude checks
Blank line found at start of control structure Open
Open
switch (Directive::attemptGetInline($rule)) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
class TrimSpacesLeftFilter extends \php_user_filter implements CustomFilterInterface {
- Exclude checks
Opening brace of a interface must be on the line after the definition Open
Open
interface CustomFilterInterface {
- Exclude checks