mimmi20/monolog-factory

View on GitHub

Showing 127 of 127 total issues

Method __invoke has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __invoke(
        ContainerInterface $container,
        $requestedName,
        array | null $options = null,
    ): ElasticsearchHandler {
Severity: Major
Found in src/Handler/ElasticsearchHandlerFactory.php - About 4 hrs to fix

    Method getMonologHandlerConfig has 116 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getMonologHandlerConfig(): array
        {
            return [
                'aliases' => [
                    'amqp' => AmqpHandler::class,
    Severity: Major
    Found in src/ConfigProvider.php - About 4 hrs to fix

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

          public function __invoke(
              ContainerInterface $container,
              $requestedName,
              array | null $options = null,
          ): ElasticsearchHandler {
      Severity: Minor
      Found in src/Handler/ElasticsearchHandlerFactory.php - About 3 hrs 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 __invoke has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __invoke(
              ContainerInterface $container,
              $requestedName,
              array | null $options = null,
          ): LogmaticFormatter {
      Severity: Minor
      Found in src/Formatter/LogmaticFormatterFactory.php - About 3 hrs 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 __invoke has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function __invoke(
              ContainerInterface $container,
              $requestedName,
              array | null $options = null,
          ): SlackWebhookHandler {
      Severity: Major
      Found in src/Handler/SlackWebhookHandlerFactory.php - About 2 hrs to fix

        Method __invoke has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __invoke(
                ContainerInterface $container,
                $requestedName,
                array | null $options = null,
            ): ElasticaHandler {
        Severity: Major
        Found in src/Handler/ElasticaHandlerFactory.php - About 2 hrs to fix

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

              public function __invoke(
                  ContainerInterface $container,
                  $requestedName,
                  array | null $options = null,
              ): LineFormatter {
          Severity: Minor
          Found in src/Formatter/LineFormatterFactory.php - About 2 hrs 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 addHandlers has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              private function addHandlers(ContainerInterface $container, array $options, Logger $monolog): void
              {
                  try {
                      $monologHandlerPluginManager = $container->get(MonologHandlerPluginManager::class);
                      assert(
          Severity: Minor
          Found in src/MonologFactory.php - About 2 hrs 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 __invoke has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              public function __invoke(
                  ContainerInterface $container,
                  $requestedName,
                  array | null $options = null,
              ): JsonFormatter {
          Severity: Minor
          Found in src/Formatter/JsonFormatterFactory.php - About 2 hrs 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 getActivationStrategy has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function getActivationStrategy(
                  ContainerInterface $container,
                  ActivationStrategyInterface | Level | int | array | string | null $activationStrategy,
              ): ActivationStrategyInterface | Level | null {
                  if ($activationStrategy === null) {
          Severity: Major
          Found in src/Handler/FingersCrossedHandlerFactory.php - About 2 hrs to fix

            Method __invoke has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function __invoke(
                    ContainerInterface $container,
                    $requestedName,
                    array | null $options = null,
                ): RollbarHandler {
            Severity: Major
            Found in src/Handler/RollbarHandlerFactory.php - About 2 hrs to fix

              Method __invoke has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function __invoke(
                      ContainerInterface $container,
                      $requestedName,
                      array | null $options = null,
                  ): RotatingFileHandler {
              Severity: Major
              Found in src/Handler/RotatingFileHandlerFactory.php - About 2 hrs to fix

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

                    public function __invoke(
                        ContainerInterface $container,
                        $requestedName,
                        array | null $options = null,
                    ): LogglyFormatter {
                Severity: Minor
                Found in src/Formatter/LogglyFormatterFactory.php - About 2 hrs 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 __invoke has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function __invoke(
                        ContainerInterface $container,
                        $requestedName,
                        array | null $options = null,
                    ): PushoverHandler {
                Severity: Major
                Found in src/Handler/PushoverHandlerFactory.php - About 2 hrs to fix

                  Method __invoke has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function __invoke(
                          ContainerInterface $container,
                          $requestedName,
                          array | null $options = null,
                      ): LogmaticFormatter {
                  Severity: Major
                  Found in src/Formatter/LogmaticFormatterFactory.php - About 2 hrs to fix

                    Method __invoke has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function __invoke(
                            ContainerInterface $container,
                            $requestedName,
                            array | null $options = null,
                        ): LineFormatter {
                    Severity: Major
                    Found in src/Formatter/LineFormatterFactory.php - About 2 hrs to fix

                      Method __invoke has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function __invoke(
                              ContainerInterface $container,
                              $requestedName,
                              array | null $options = null,
                          ): MicrosoftTeamsHandler {
                      Severity: Major
                      Found in src/Handler/MicrosoftTeamsHandlerFactory.php - About 2 hrs to fix

                        Method __invoke has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function __invoke(
                                ContainerInterface $container,
                                $requestedName,
                                array | null $options = null,
                            ): JsonFormatter {
                        Severity: Major
                        Found in src/Formatter/JsonFormatterFactory.php - About 2 hrs to fix

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

                              public function __invoke(ContainerInterface $container, $requestedName, array | null $options = null): AmqpHandler
                              {
                                  if (!is_array($options)) {
                                      throw new ServiceNotCreatedException('Options must be an Array');
                                  }
                          Severity: Minor
                          Found in src/Handler/AmqpHandlerFactory.php - About 2 hrs 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 __invoke has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function __invoke(
                                  ContainerInterface $container,
                                  $requestedName,
                                  array | null $options = null,
                              ): GelfMessageFormatter {
                          Severity: Minor
                          Found in src/Formatter/GelfMessageFormatterFactory.php - About 2 hrs 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

                          Severity
                          Category
                          Status
                          Source
                          Language