Showing 479 of 479 total issues

Function unveil has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.unveil = function(threshold, callback) {

    var $w = $(window),
        th = threshold || 0,
        retina = window.devicePixelRatio > 1,
Severity: Minor
Found in src/resources/js/jquery.unveil.js - About 1 hr to fix

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

        public function ajax()
        {
            return datatables()
                ->eloquent($this->query())
                ->addColumn('characters', function ($row) {
    Severity: Minor
    Found in src/Http/DataTables/Squads/MembersDataTable.php - About 1 hr to fix

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

          public function getMoonIndicatorsAttribute()
          {
              if (is_null($this->moon_indicators)) {
                  $this->moon_indicators = (object) [
                      'ubiquitous' => $this->content->filter(function ($type) {
      Severity: Minor
      Found in src/Models/UniverseMoonReport.php - About 1 hr to fix

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

                        $query->whereHas($relation, function ($q2) use ($query_operator, $relation_rules) {
                            $q2->where(function ($q3) use ($relation_rules, $query_operator) {
                                foreach ($relation_rules as $index => $rule) {
                                    if ($rule->operator == 'contains') {
                                        $json_operator = $query_operator == 'where' ? 'whereJsonContains' : 'orWhereJsonContains';
        Severity: Major
        Found in src/Models/Filterable.php and 1 other location - About 1 hr to fix
        src/Models/Filterable.php on lines 167..178

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

        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

                    } else {
                        $query->where(function ($q2) use ($relation_rules, $query_operator) {
                            foreach ($relation_rules as $index => $rule) {
                                if ($rule->operator == 'contains') {
                                    $json_operator = $query_operator == 'where' ? 'whereJsonContains' : 'orWhereJsonContains';
        Severity: Major
        Found in src/Models/Filterable.php and 1 other location - About 1 hr to fix
        src/Models/Filterable.php on lines 155..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 104.

        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

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $skins = Profile::$options['skins'];

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $allowed_tracking = implode(',', Seat::$options['allow_tracking']);
        Severity: Minor
        Found in src/Http/Validation/SeatSettings.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $thousand = Profile::$options['thousand_seperator'];

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $allowed_cleanup = implode(',', Seat::$options['cleanup_data']);
        Severity: Minor
        Found in src/Http/Validation/SeatSettings.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $allowed_registration = implode(',', Seat::$options['registration']);
        Severity: Minor
        Found in src/Http/Validation/SeatSettings.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $allowed_skins = implode(',', Profile::$options['skins']);

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $allowed_sidebar = implode(',', Profile::$options['sidebar']);

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$corporation' which will lead to PHP notices.
        Open

                    ->with('success', sprintf('Alliance %s has been successfully removed.', $corporation->name));

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $mail_threads = implode(',', Profile::$options['mail_threads']);

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $decimal = Profile::$options['decimal_seperator'];

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$options' which will lead to PHP notices.
        Open

                $sidebar = Profile::$options['sidebar'];

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Method findOrCreateUser has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function findOrCreateUser(SocialiteUser $eve_user): User
            {
        
                // remove all existing tokens with a different hash.
                // in case a hash has been altered, it might be because
        Severity: Minor
        Found in src/Http/Controllers/Auth/SsoController.php - About 1 hr to fix

          Method ajax has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function ajax()
              {
                  return datatables()
                      ->eloquent($this->applyScopes($this->query()))
                      ->editColumn('type.typeName', function ($row) {
          Severity: Minor
          Found in src/Http/DataTables/Corporation/Military/StructureDataTable.php - About 1 hr to fix

            Method addCharacterPermissionScope has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function addCharacterPermissionScope($query, string $ability)
                {
                    if (auth()->user()->isAdmin())
                        return $query;
            
            
            Severity: Minor
            Found in src/Http/Validation/StandingsExistingElementAdd.php - About 1 hr to fix

              Method ajax has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function ajax()
                  {
                      return datatables()
                          ->eloquent($this->applyScopes($this->query()))
                          ->editColumn('name', function ($row) {
              Severity: Minor
              Found in src/Http/DataTables/Character/CharacterDataTable.php - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language