src/CoreBundle/Security/Authorization/Voter/UserVoter.php
The method voteOnAttribute() has an NPath complexity of 580. The configured NPath complexity threshold is 200. Open
Open
protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
{
/** @var User $currentUser */
$currentUser = $token->getUser();
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
Closing brace must be on a line by itself Open
Open
) {}
- Exclude checks
Add a single space around assignment operators Open
Open
declare(strict_types=1);
- Exclude checks
Missing function doc comment Open
Open
public function __construct(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private Security $security,
- Exclude checks
Expected 0 spaces after opening bracket; newline found Open
Open
if (
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private EntityManagerInterface $entityManager,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 8 Open
Open
private RequestStack $requestStack
- Exclude checks
Closing brace must be on a line by itself Open
Open
) {}
- Exclude checks