brandon14/brand0n.gg

View on GitHub

Showing 1,121 of 1,121 total issues

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

        DEFAULT: {
          css: {
            color: theme('colors.neutral.DEFAULT'),
            '[class~="lead"]': {
              color: theme('colors.neutral.DEFAULT'),
Severity: Major
Found in tailwind.config.typography.js and 1 other location - About 7 hrs to fix
tailwind.config.typography.js on lines 58..99

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 194.

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 2 locations. Consider refactoring.
Open

        dark: {
          css: {
            color: theme('colors.neutral.50'),
            '[class~="lead"]': {
              color: theme('colors.neutral.50'),
Severity: Major
Found in tailwind.config.typography.js and 1 other location - About 7 hrs to fix
tailwind.config.typography.js on lines 16..57

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 194.

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 2 locations. Consider refactoring.
Open

<?php

namespace App\Services\Status\Providers;

use Brand0nGG\Services\Status\Providers\PredisProvider;
Severity: Major
Found in app/Services/Status/Providers/LaravelPredisProvider.php and 1 other location - About 1 hr to fix
app/Services/Status/Providers/LaravelPhpRedisProvider.php on lines 1..29

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 118.

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 2 locations. Consider refactoring.
Open

<?php

namespace App\Services\Status\Providers;

use Brand0nGG\Services\Status\Providers\PhpRedisProvider;
Severity: Major
Found in app/Services/Status/Providers/LaravelPhpRedisProvider.php and 1 other location - About 1 hr to fix
app/Services/Status/Providers/LaravelPredisProvider.php on lines 1..29

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 118.

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 registerProviders has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function registerProviders(): void
    {
        $config = $this->app->make('config');
        // Get the list of `'alias' => 'provider'` from the config.
        $providers = $config->get('status.providers');
Severity: Minor
Found in app/Providers/StatusServiceProvider.php - About 1 hr to fix

    Avoid using short method names like CreatePasswordResetsTable::up(). The configured minimum method name length is 3.
    Open

        public function up()
        {
            Schema::create('password_resets', function (Blueprint $table) {
                $table->string('email')->index();
                $table->string('token');

    ShortMethodName

    Since: 0.2

    Detects when very short method names are used.

    Example

    class ShortMethod {
        public function a( $index ) { // Violation
        }
    }

    Source https://phpmd.org/rules/naming.html#shortmethodname

    Avoid using short method names like CreateUsersTable::up(). The configured minimum method name length is 3.
    Open

        public function up()
        {
            Schema::create('users', function (Blueprint $table) {
                $table->id();
                $table->string('name');

    ShortMethodName

    Since: 0.2

    Detects when very short method names are used.

    Example

    class ShortMethod {
        public function a( $index ) { // Violation
        }
    }

    Source https://phpmd.org/rules/naming.html#shortmethodname

    Avoid using short method names like CreateFailedJobsTable::up(). The configured minimum method name length is 3.
    Open

        public function up()
        {
            Schema::create('failed_jobs', function (Blueprint $table) {
                $table->id();
                $table->string('uuid')->unique();

    ShortMethodName

    Since: 0.2

    Detects when very short method names are used.

    Example

    class ShortMethod {
        public function a( $index ) { // Violation
        }
    }

    Source https://phpmd.org/rules/naming.html#shortmethodname

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

        private function createThumbnail($import, $export, $width, $height, $background, $border)
        {
            $svg           = file_get_contents($import);
            $svgObj        = simplexml_load_string($svg);
            $viewBox       = explode(' ', $svgObj['viewBox']);
    Severity: Minor
    Found in app/Listeners/GenerateFavicons.php - About 1 hr to fix

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

                '.outer-grid': {
                  rowGap: theme('spacing.24'),
                  paddingTop: theme('spacing.24'),
                  paddingBottom: theme('spacing.24'),
                  '& > *:last-child.w-full': {
      Severity: Major
      Found in tailwind.config.peak.js and 1 other location - About 1 hr to fix
      tailwind.config.peak.js on lines 159..166

      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 59.

      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 2 locations. Consider refactoring.
      Open

                '.outer-grid': {
                  rowGap: theme('spacing.16'),
                  paddingTop: theme('spacing.16'),
                  paddingBottom: theme('spacing.16'),
                  '& > *:last-child.w-full': {
      Severity: Major
      Found in tailwind.config.peak.js and 1 other location - About 1 hr to fix
      tailwind.config.peak.js on lines 176..183

      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 59.

      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 getStatus has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getStatus(): array
          {
              try {
                  $request = $this->requestFactory->createRequest('GET', $this->routeToPing);
      
      
      Severity: Minor
      Found in bgg/src/Services/Status/Providers/WebsiteProvider.php - About 1 hr to fix

        Each class must be in a namespace of at least one level (a top-level vendor name)
        Open

        class CreatePasswordResetsTable extends Migration

        Each class must be in a namespace of at least one level (a top-level vendor name)
        Open

        class CreateUsersTable extends Migration

        Each class must be in a namespace of at least one level (a top-level vendor name)
        Open

        class CreateFailedJobsTable extends Migration

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

                ClientInterface $httpClient,
                RequestFactoryInterface $requestFactory,
                string $routeToPing,
                int $desiredTime = 200,
                bool $addHeaders = true,
        Severity: Major
        Found in bgg/src/Services/Status/Providers/WebsiteProvider.php - About 50 mins to fix

          A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 6 and the first side effect is on line 20.
          Open

          <?php
          Severity: Minor
          Found in public/index.php by phpcodesniffer

          Avoid variables with short names like $im. Configured minimum length is 3.
          Open

                  $im = new \Imagick();
          Severity: Minor
          Found in app/Listeners/GenerateFavicons.php by phpmd

          ShortVariable

          Since: 0.2

          Detects when a field, local, or parameter has a very short name.

          Example

          class Something {
              private $q = 15; // VIOLATION - Field
              public static function main( array $as ) { // VIOLATION - Formal
                  $r = 20 + $this->q; // VIOLATION - Local
                  for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                      $r += $this->q;
                  }
              }
          }

          Source https://phpmd.org/rules/naming.html#shortvariable

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

              private function createThumbnail($import, $export, $width, $height, $background, $border)
          Severity: Minor
          Found in app/Listeners/GenerateFavicons.php - About 45 mins to fix

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

                    string $apiKey,
                    bool $isCacheEnabled = true,
                    int $cacheTtl = 30,
                    string $cacheKey = 'apexapi',
                    string $hashAlgo = 'sha512'
            Severity: Minor
            Found in bgg/src/Contracts/Services/ApexApi/ApexApiOptions.php - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language