components-web-app/api-components-bundle

View on GitHub

Showing 108 of 108 total issues

Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function __construct(ManagerRegistry $registry, UploadableAttributeReader $annotationReader, FilesystemProvider $filesystemProvider, FlysystemDataLoader $flysystemDataLoader, FileInfoCacheManager $fileInfoCacheManager, ?CacheManager $imagineCacheManager, ?FilterService $filterService = null)
Severity: Major
Found in src/Helper/Uploadable/UploadableFileManager.php - About 50 mins to fix

    Method create has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function create(string $username, string $password, ?string $email = null, bool $inactive = false, bool $superAdmin = false, bool $admin = false, bool $overwrite = false): void
    Severity: Major
    Found in src/Factory/User/UserFactory.php - About 50 mins to fix

      Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function __construct(ContainerInterface $container, EventDispatcherInterface $eventDispatcher, string $subject, bool $enabled = true, ?string $defaultRedirectPath = null, ?string $redirectPathQueryKey = null, array $emailContext = [])
      Severity: Major
      Found in src/Factory/User/Mailer/AbstractUserEmailFactory.php - About 50 mins to fix

        Method filterProperty has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
        Severity: Major
        Found in src/Filter/OrSearchFilter.php - About 50 mins to fix

          Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function __construct(EntityManagerInterface $entityManager, ValidatorInterface $validator, UserRepositoryInterface $userRepository, TimestampedDataPersister $timestampedDataPersister, UserPasswordHasherInterface $passwordHasher, string $userClass)
          Severity: Minor
          Found in src/Factory/User/UserFactory.php - About 45 mins to fix

            Function __invoke has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public function __invoke(FormSuccessEvent $event): void
                {
                    // This is not a sub-request because forms have greater permissions to create entitites with whatever properties wanted.
            
                    if (
            Severity: Minor
            Found in src/EventListener/Form/EntityPersistFormListener.php - About 45 mins to fix

            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

            Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function __construct(string $path, string $mimeType, int $fileSize, ?int $width, ?int $height, ?string $filter = null)
            Severity: Minor
            Found in src/Entity/Core/FileInfo.php - About 45 mins to fix

              Function checkPreAuth has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function checkPreAuth(UserInterface $user): void
                  {
                      if (!$user instanceof AbstractUser) {
                          return;
                      }
              Severity: Minor
              Found in src/Security/UserChecker.php - About 45 mins to fix

              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

              Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function __construct(string $username = '', string $emailAddress = '', bool $emailAddressVerified = false, array $roles = ['ROLE_USER'], string $password = '', bool $enabled = true)
              Severity: Minor
              Found in src/Entity/User/AbstractUser.php - About 45 mins to fix

                Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        ManagerRegistry $managerRegistry,
                        IriConverterInterface $iriConverter,
                        ?PropertyAccessorInterface $propertyAccessor = null,
                        ?LoggerInterface $logger = null,
                        ?array $properties = null,
                Severity: Minor
                Found in src/Filter/OrSearchFilter.php - About 45 mins to fix

                  Method applyToItem has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function applyToItem(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, ?Operation $operation = null, array $context = []): void
                  Severity: Minor
                  Found in src/Doctrine/Extension/ORM/PublishableExtension.php - About 45 mins to fix

                    Method init has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            ManagerRegistry $registry,
                            TimestampedAttributeReader $timestampedAnnotationReader,
                            TimestampedDataPersister $timestampedDataPersister,
                            UserEventListener $userEventListener,
                            NormalizerInterface $normalizer,
                    Severity: Minor
                    Found in src/EventListener/Form/EntityPersistFormListener.php - About 45 mins to fix

                      Method applyToCollection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
                      Severity: Minor
                      Found in src/Doctrine/Extension/ORM/RoutableExtension.php - About 35 mins to fix

                        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                public string $adapter,
                                public string $urlGenerator = 'api',
                                public string $property = 'filename',
                                public ?string $prefix = null,
                                public ?array $imagineFilters = []
                        Severity: Minor
                        Found in src/Annotation/UploadableField.php - About 35 mins to fix

                          Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              public function __construct(DataUriFile $file, ?string $originalName = null, ?string $mimeType = null, ?int $error = null, bool $test = false)
                          Severity: Minor
                          Found in src/Model/Uploadable/UploadedDataUriFile.php - About 35 mins to fix

                            Method applyToCollection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
                            Severity: Minor
                            Found in src/Doctrine/Extension/ORM/PublishableExtension.php - About 35 mins to fix

                              Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                      EntityManagerInterface $entityManager,
                                      UserRepositoryInterface $userRepository,
                                      PasswordHasherFactoryInterface $passwordHasherFactory,
                                      UserDataProcessor $userDataProcessor,
                                      UserEventListener $userEventListener
                              Severity: Minor
                              Found in src/Helper/User/EmailAddressManager.php - About 35 mins to fix

                                Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function __construct(string $fieldName = 'publishedAt', ?string $isGranted = null, string $associationName = 'publishedResource', string $reverseAssociationName = 'draftResource', ?array $validationGroups = null)
                                Severity: Minor
                                Found in src/Annotation/Publishable.php - About 35 mins to fix

                                  Method applyToCollection has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public function applyToCollection(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
                                  Severity: Minor
                                  Found in src/Doctrine/Extension/ORM/RouteExtension.php - About 35 mins to fix

                                    Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        public function __construct(?string $securityStr, ResourceAccessCheckerInterface $resourceAccessChecker, Security $security, AbstractPageDataRepository $pageDataRepository, DenyAccessListener $denyAccessListener)
                                    Severity: Minor
                                    Found in src/Security/Voter/RoutableVoter.php - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language