Aerendir/console-styles-bundle

View on GitHub

Showing 34 of 34 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function choice($question, array $choices, $default = null): string
    {
        trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
        if (null !== $default) {
            $values  = \Safe\array_flip($choices);
Severity: Minor
Found in src/Console/Style/SerendipityHQStyleSF5.php and 1 other location - About 45 mins to fix
src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 486..495

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    public function choice($question, array $choices, $default = null): string
    {
        trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
        if (null !== $default) {
            $values  = \Safe\array_flip($choices);
Severity: Minor
Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php and 1 other location - About 45 mins to fix
src/Console/Style/SerendipityHQStyleSF5.php on lines 476..485

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 96.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    protected function createBlock($messages, $type = null, $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
Severity: Minor
Found in src/Console/Style/SerendipityHQStyleSF5.php - About 45 mins to fix

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

        protected function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false)
    Severity: Minor
    Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php - About 45 mins to fix

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          public function section($message): void
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $this->autoPrependBlock();
              $this->writeln([
      Severity: Major
      Found in src/Console/Style/SerendipityHQStyleSF5.php and 3 other locations - About 45 mins to fix
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 112..121
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 128..137
      src/Console/Style/SerendipityHQStyleSF5.php on lines 104..113

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 95.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          public function section($message): void
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $this->autoPrependBlock();
              $this->writeln([
      Severity: Major
      Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php and 3 other locations - About 45 mins to fix
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 112..121
      src/Console/Style/SerendipityHQStyleSF5.php on lines 104..113
      src/Console/Style/SerendipityHQStyleSF5.php on lines 120..129

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 95.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          public function title($message): void
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $this->autoPrependBlock();
              $this->writeln([
      Severity: Major
      Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php and 3 other locations - About 45 mins to fix
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 128..137
      src/Console/Style/SerendipityHQStyleSF5.php on lines 104..113
      src/Console/Style/SerendipityHQStyleSF5.php on lines 120..129

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 95.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

          public function title($message): void
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $this->autoPrependBlock();
              $this->writeln([
      Severity: Major
      Found in src/Console/Style/SerendipityHQStyleSF5.php and 3 other locations - About 45 mins to fix
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 112..121
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 128..137
      src/Console/Style/SerendipityHQStyleSF5.php on lines 120..129

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 95.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false): void
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $messages = \is_array($messages) ? \array_values($messages) : [$messages];
      
      
      Severity: Minor
      Found in src/Console/Style/SerendipityHQStyleSF5.php and 1 other location - About 40 mins to fix
      src/Console/Style/SF4/SerendipityHQStyleSF4.php on lines 97..105

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 93.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
          {
              trigger_error('Use Symfony\Component\Console\Style\SymfonyStyle corresponding method instead.', E_USER_DEPRECATED);
              $messages = \is_array($messages) ? \array_values($messages) : [$messages];
      
      
      Severity: Minor
      Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php and 1 other location - About 40 mins to fix
      src/Console/Style/SerendipityHQStyleSF5.php on lines 89..97

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 93.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

          protected function createLine(string $message, $type = null, $style = null, string $prefix = '', bool $escape = false): string
      Severity: Minor
      Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php - About 35 mins to fix

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

            public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false)
        Severity: Minor
        Found in src/Console/Style/SF4/SerendipityHQStyleSF4.php - About 35 mins to fix

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

              protected function createLine(string $message, $type = null, $style = null, string $prefix = '', bool $escape = false): string
          Severity: Minor
          Found in src/Console/Style/SerendipityHQStyleSF5.php - About 35 mins to fix

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

                public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false): void
            Severity: Minor
            Found in src/Console/Style/SerendipityHQStyleSF5.php - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language