Showing 22 of 122 total issues

Method buildTcaArray has 178 lines of code (exceeds 40 allowed). Consider refactoring.
Open

    protected function buildTcaArray(): array
    {
        return [
            'ctrl' => $this->getCtrl(),

    EntityEmailNotification has 31 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class EntityEmailNotification extends EntityNotification implements
        EmailNotification,
        CustomSettingsNotification,
        Creatable,
        Editable,

      Method addDefaultTypo3Columns has 82 lines of code (exceeds 40 allowed). Consider refactoring.
      Open

          private function addDefaultTypo3Columns()
          {
              $defaultColumns = [
                  'sys_language_uid' => [
                      'exclude' => 1,
      Severity: Major
      Found in Classes/Core/Notification/TCA/EntityTcaWriter.php - About 2 hrs to fix

        Method addCommonColumns has 69 lines of code (exceeds 40 allowed). Consider refactoring.
        Open

            private function addCommonColumns()
            {
                $commonColumns = [
                    'title' => [
                        'exclude' => 1,
        Severity: Major
        Found in Classes/Core/Notification/TCA/EntityTcaWriter.php - About 2 hrs to fix

          Method buildTcaArray has 60 lines of code (exceeds 40 allowed). Consider refactoring.
          Open

              protected function buildTcaArray(): array
              {
                  return [
                      'ctrl' => $this->getDefaultCtrl(),
          
          

            Function buildDefinition has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

                public function buildDefinition(): ConfigurationObjectInstance
                {
                    if (null === $this->definitionObject) {
                        if ($this->cacheService->has(NotizConstants::CACHE_KEY_DEFINITION_OBJECT)) {
                            $this->definitionObject = $this->cacheService->get(NotizConstants::CACHE_KEY_DEFINITION_OBJECT);
            Severity: Minor
            Found in Classes/Core/Definition/Builder/DefinitionBuilder.php - About 1 hr 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 registerBackendModule has 48 lines of code (exceeds 40 allowed). Consider refactoring.
            Open

                protected function registerBackendModule()
                {
                    ExtensionUtility::registerModule(
                        'CuyZ.Notiz',
                        'notiz',
            Severity: Minor
            Found in Classes/Service/Extension/TablesConfigurationService.php - About 1 hr to fix

              Function getDropDownFromDefinition has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function getDropDownFromDefinition(): string
                  {
                      $view = $this->getFluidTemplateObject('Backend/ToolBar/NotificationToolBarDropDown');
              
                      if (!$this->definitionService->getValidationResult()->hasErrors()) {
              Severity: Minor
              Found in Classes/Backend/ToolBarItems/NotificationsToolbarItem.php - About 1 hr 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

              Function doLocalize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function doLocalize(string $path, array $arguments = []): string
                  {
                      if (false === strpos($path, ':')) {
                          $possiblePaths = $this->getPossiblePaths('locallang', $path);
                      } elseif (strpos($path, 'LLL:') === 0) {
              Severity: Minor
              Found in Classes/Service/LocalizationService.php - About 55 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

              Function channelsSupportNotifications has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected function channelsSupportNotifications()
                  {
                      foreach ($this->definition->getNotifications() as $notification) {
                          foreach ($notification->getChannels() as $channelDefinition) {
                              $path = 'notifications.' . $notification->getIdentifier() . '.channels.' . $channelDefinition->getIdentifier();
              Severity: Minor
              Found in Classes/Validation/Validator/DefinitionValidator.php - About 55 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

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

                  public function process(...$arguments)
                  {
                      $notifications = $this->notificationDispatcher->fetchNotifications($this->eventDefinition);
              
                      foreach ($notifications as $notification => $dispatchCallback) {
              Severity: Minor
              Found in Classes/Core/Event/Runner/EventRunner.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 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      EventDefinition $eventDefinition,
                      EventFactory $eventFactory,
                      NotificationDispatcher $notificationDispatcher,
                      Dispatcher $signalDispatcher,
                      ExtensionConfigurationService $extensionConfigurationService
              Severity: Minor
              Found in Classes/Core/Event/Runner/EventRunner.php - About 35 mins to fix

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

                    public function compile($argumentsName, $closureName, &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler)
                Severity: Minor
                Found in Classes/ViewHelpers/Slot/RenderViewHelper.php - About 35 mins to fix

                  Function fillPropertyDefinition has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function fillPropertyDefinition(PropertyDefinition $definition)
                      {
                          if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
                              $this->fillPropertyDefinitionLegacy($definition);
                              return;
                  Severity: Minor
                  Found in Classes/Core/Property/Service/TagsPropertyService.php - About 35 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

                  Function doList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function doList(array &$parameters)
                      {
                          foreach ($this->formPersistenceManager->listForms() as $form) {
                              $persistenceIdentifier = $form['persistenceIdentifier'];
                              $formDefinition = $this->formPersistenceManager->load($persistenceIdentifier);
                  Severity: Minor
                  Found in Classes/Domain/Event/Form/Service/ListFormNotifications.php - About 25 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

                  Function fillPropertyDefinitionLegacy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function fillPropertyDefinitionLegacy(PropertyDefinition $definition)
                      {
                          $identifier = $this->getPropertyTagIdentifier($definition);
                  
                          /** @var ClassReflection $eventReflection */
                  Severity: Minor
                  Found in Classes/Core/Property/Service/TagsPropertyService.php - About 25 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

                  Function fetchSettingsClassName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected static function fetchSettingsClassName(array $data): array
                      {
                          $notificationClassName = $data['className'] ?? null;
                  
                          if (class_exists($notificationClassName)
                  Severity: Minor
                  Found in Classes/Core/Definition/Tree/Notification/NotificationDefinition.php - About 25 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

                  Function getSlotValue has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function getSlotValue(array $arguments, RenderingContextInterface $renderingContext): string
                      {
                          self::$currentVariableContainer = $renderingContext->getViewHelperVariableContainer();
                  
                          $result = '';
                  Severity: Minor
                  Found in Classes/ViewHelpers/Slot/RenderViewHelper.php - About 25 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

                  Function mapRecipients has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      protected function mapRecipients(array $recipientsIdentifiers): array
                      {
                          $recipients = [];
                  
                          foreach ($this->eventRecipients as $recipient) {

                  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 getDefaultFiles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function getDefaultFiles(): array
                      {
                          $defaultFiles = [
                              NotizConstants::TYPOSCRIPT_PATH . 'Channel/Channels.Default.typoscript',
                              NotizConstants::TYPOSCRIPT_PATH . 'Notification/Notifications.typoscript',

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language