Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - refactor framework core to php82 #493

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

lisachenko
Copy link
Member

This PR changes internal Aop/Framework and Aop/Intercept to use PHP8.2 features and phpstan level 9 checks to ensure that codebase is stable and don't contain known logic errors.

@scrutinizer-notifier
Copy link

A new inspection was created.

$this->pointcutExpression = $pointcutExpression;
}
public function __construct(
protected readonly Closure $adviceMethod,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

}
public function __construct(
protected readonly Closure $adviceMethod,
private readonly int $adviceOrder = 0,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

public function __construct(
protected readonly Closure $adviceMethod,
private readonly int $adviceOrder = 0,
protected readonly string $pointcutExpression = ''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

protected readonly Closure $adviceMethod,
private readonly int $adviceOrder = 0,
protected readonly string $pointcutExpression = ''
) {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closing brace must be on a line by itself

{
$this->advices = $advices;
}
public function __construct(protected readonly array $advices = []) {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Line indented incorrectly; expected 0 spaces, found 4
  • Opening brace should be on a new line
  • Closing brace must be on a line by itself

default:
return 0;
}
fn(Advice $first, Advice $second) => match (true) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space before opening parenthesis of function call prohibited

return 0;
}
fn(Advice $first, Advice $second) => match (true) {
$first instanceof AdviceBefore && !($second instanceof AdviceBefore) => -1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 12 spaces but found 16

}
fn(Advice $first, Advice $second) => match (true) {
$first instanceof AdviceBefore && !($second instanceof AdviceBefore) => -1,
$first instanceof AdviceAround && !($second instanceof AdviceAround) => 1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 12 spaces but found 16

fn(Advice $first, Advice $second) => match (true) {
$first instanceof AdviceBefore && !($second instanceof AdviceBefore) => -1,
$first instanceof AdviceAround && !($second instanceof AdviceAround) => 1,
$first instanceof AdviceAfter && !($second instanceof AdviceAfter) => $second instanceof AdviceBefore ? 1 : -1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 12 spaces but found 16

$first instanceof AdviceBefore && !($second instanceof AdviceBefore) => -1,
$first instanceof AdviceAround && !($second instanceof AdviceAround) => 1,
$first instanceof AdviceAfter && !($second instanceof AdviceAfter) => $second instanceof AdviceBefore ? 1 : -1,
$first instanceof OrderedAdvice && $second instanceof OrderedAdvice => $first->getAdviceOrder() - $second->getAdviceOrder(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 12 spaces but found 16

$first instanceof AdviceAround && !($second instanceof AdviceAround) => 1,
$first instanceof AdviceAfter && !($second instanceof AdviceAfter) => $second instanceof AdviceBefore ? 1 : -1,
$first instanceof OrderedAdvice && $second instanceof OrderedAdvice => $first->getAdviceOrder() - $second->getAdviceOrder(),
default => 0,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Multi-line function call not indented correctly; expected 12 spaces but found 16
  • Line indented incorrectly; expected 4 spaces, found 16

$this->message = $message;
$this->level = $errorLevel;
public function __construct(
protected string $message,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

$this->level = $errorLevel;
public function __construct(
protected string $message,
protected int $level,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

$this->interceptor = $interceptor;
}
public function __construct(
private PointFilter $pointFilter,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

}
public function __construct(
private PointFilter $pointFilter,
private Interceptor $interceptor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

public function __construct(
private PointFilter $pointFilter,
private Interceptor $interceptor
){}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found 0 spaces
  • Closing brace must be on a line by itself

$this->introducedInterface = $introducedInterface;
}
public function __construct(
private string $introducedTrait,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

}
public function __construct(
private string $introducedTrait,
private string $introducedInterface

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 4 spaces, found 8

public function __construct(
private string $introducedTrait,
private string $introducedInterface
){}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found 0 spaces
  • Closing brace must be on a line by itself

/**
* The read access type
*/
case READ = 'get';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 0 spaces, found 4

/**
* The write access type
*/
case WRITE = 'set';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected 0 spaces, found 4

* The write access type
*/
case WRITE = 'set';
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line indented incorrectly; expected at least 4 spaces, found 0

@lisachenko lisachenko merged commit a0930b2 into master Apr 1, 2024
6 checks passed
@lisachenko lisachenko deleted the feature/refactor-core-to-php82 branch April 1, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants