mimmi20/monolog-factory

View on GitHub

Showing 127 of 127 total issues

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

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

    private function getHandlers(ContainerInterface $container, array $options): array
    {
        if (!array_key_exists('handlers', $options) || !is_array($options['handlers'])) {
            throw new ServiceNotCreatedException(
                'No Service names provided for the required handler classes',
Severity: Minor
Found in src/Handler/GetHandlersTrait.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 __invoke has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __invoke(
        ContainerInterface $container,
        $requestedName,
        array | null $options = null,
    ): StreamHandler {
Severity: Minor
Found in src/Handler/StreamHandlerFactory.php - About 1 hr to fix

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

        public function __invoke(
            ContainerInterface $container,
            $requestedName,
            array | null $options = null,
        ): OverflowHandler {
    Severity: Minor
    Found in src/Handler/OverflowHandlerFactory.php - About 1 hr to fix

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

          public function __invoke(
              ContainerInterface $container,
              $requestedName,
              array | null $options = null,
          ): SocketHandler {
      Severity: Minor
      Found in src/Handler/SocketHandlerFactory.php - About 1 hr to fix

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

            public function __invoke(
                ContainerInterface $container,
                $requestedName,
                array | null $options = null,
            ): FlowdockHandler {
        Severity: Minor
        Found in src/Handler/FlowdockHandlerFactory.php - About 1 hr to fix

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

              public function __invoke(
                  ContainerInterface $container,
                  $requestedName,
                  array | null $options = null,
              ): FleepHookHandler {
          Severity: Minor
          Found in src/Handler/FleepHookHandlerFactory.php - About 1 hr to fix

            Method init has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function init(ModuleManagerInterface $manager): void
                {
                    $event     = $manager->getEvent();
                    $container = $event->getParam('ServiceManager');
            
            
            Severity: Minor
            Found in src/Module.php - About 1 hr to fix

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

                  public function __invoke(
                      ContainerInterface $container,
                      $requestedName,
                      array | null $options = null,
                  ): BufferHandler {
              Severity: Minor
              Found in src/Handler/BufferHandlerFactory.php - About 1 hr to fix

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

                    public function __invoke(ContainerInterface $container, $requestedName, array | null $options = null): V8Client
                    {
                        if (!is_array($options)) {
                            throw new ServiceNotCreatedException('Options must be an Array');
                        }
                Severity: Minor
                Found in src/Client/ElasticsearchV8Factory.php - About 1 hr to fix

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

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

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

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

                      public function __invoke(
                          ContainerInterface $container,
                          $requestedName,
                          array | null $options = null,
                      ): DoctrineCouchDBHandler {
                  Severity: Minor
                  Found in src/Handler/DoctrineCouchDBHandlerFactory.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 __invoke has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function __invoke(
                          ContainerInterface $container,
                          $requestedName,
                          array | null $options = null,
                      ): ProcessHandler {
                  Severity: Minor
                  Found in src/Handler/ProcessHandlerFactory.php - About 1 hr to fix

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

                        public function __invoke(
                            ContainerInterface $container,
                            $requestedName,
                            array | null $options = null,
                        ): HtmlFormatter {
                    Severity: Minor
                    Found in src/Formatter/HtmlFormatterFactory.php - About 1 hr to fix

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

                          public function __invoke(
                              ContainerInterface $container,
                              $requestedName,
                              array | null $options = null,
                          ): WildfireFormatter {
                      Severity: Minor
                      Found in src/Formatter/WildfireFormatterFactory.php - About 1 hr to fix

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

                            public function __invoke(
                                ContainerInterface $container,
                                $requestedName,
                                array | null $options = null,
                            ): IFTTTHandler {
                        Severity: Minor
                        Found in src/Handler/IFTTTHandlerFactory.php - About 1 hr to fix

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

                              public function __invoke(
                                  ContainerInterface $container,
                                  $requestedName,
                                  array | null $options = null,
                              ): NormalizerFormatter {
                          Severity: Minor
                          Found in src/Formatter/NormalizerFormatterFactory.php - About 1 hr to fix

                            Method addProcessor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private function addProcessor(
                                    ContainerInterface $container,
                                    HandlerInterface $handler,
                                    array | null $options = null,
                                ): void {
                            Severity: Minor
                            Found in src/AddProcessorTrait.php - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language