mageni/mageni

View on GitHub
src/frontend/app/Http/Livewire/Dashboard/Page.php

Summary

Maintainability
A
1 hr
Test Coverage

File Page.php has 336 lines of code (exceeds 250 allowed). Consider refactoring.
Invalid

<?php

namespace App\Http\Livewire\Dashboard;

use Livewire\Component;
Severity: Minor
Found in src/frontend/app/Http/Livewire/Dashboard/Page.php - About 4 hrs to fix

    Page has 29 functions (exceeds 20 allowed). Consider refactoring.
    Invalid

    class Page extends Component
    {
        public $allvuln;
        public $informational;
        public $criticalvuln;
    Severity: Minor
    Found in src/frontend/app/Http/Livewire/Dashboard/Page.php - About 3 hrs to fix

      Method render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function render(Request $request)
          {
              // dd($request);
      
              return view('livewire.dashboard.page', [
      Severity: Minor
      Found in src/frontend/app/Http/Livewire/Dashboard/Page.php - About 1 hr to fix

        Identical blocks of code found in 3 locations. Consider refactoring.
        Invalid

            public function mount()
            {
                $this->endpoint = "https://www.mageni.net/api/v1/token/plan";
        
                $this->version = Version::select('api_key')->find(1);
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 2 other locations - About 2 hrs to fix
        src/frontend/app/Http/Livewire/Profile/License.php on lines 19..35
        src/frontend/app/Http/Livewire/UserManagement.php on lines 67..83

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnApr()
            {
                $year = date("Y");
                $date1 = $year.'-05-01';
                $date2 = $year.'-04-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnJul()
            {
                $year = date("Y");
                $date1 = $year.'-08-01';
                $date2 = $year.'-07-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnAug()
            {
                $year = date("Y");
                $date1 = $year.'-09-01';
                $date2 = $year.'-08-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnJan()
            {
                $year = date("Y");
                $date1 = $year.'-02-01';
                $date2 = $year.'-01-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnOct()
            {
                $year = date("Y");
                $date1 = $year.'-11-01';
                $date2 = $year.'-10-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnDec()
            {
                $year = date("Y");
                $date1 = $year.'-12-31';
                $date2 = $year.'-12-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnSep()
            {
                $year = date("Y");
                $date1 = $year.'-10-01';
                $date2 = $year.'-09-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnMar()
            {
                $year = date("Y");
                $date1 = $year.'-04-01';
                $date2 = $year.'-03-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnFeb()
            {
                $year = date("Y");
                $date1 = $year.'-03-01';
                $date2 = $year.'-02-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnMay()
            {
                $year = date("Y");
                $date1 = $year.'-06-01';
                $date2 = $year.'-05-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnJun()
            {
                $year = date("Y");
                $date1 = $year.'-07-01';
                $date2 = $year.'-06-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 248..260
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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 12 locations. Consider refactoring.
        Invalid

            public function vulnNov()
            {
                $year = date("Y");
                $date1 = $year.'-12-01';
                $date2 = $year.'-11-01';
        Severity: Major
        Found in src/frontend/app/Http/Livewire/Dashboard/Page.php and 11 other locations - About 1 hr to fix
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 108..120
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 122..134
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 136..148
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 150..162
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 164..176
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 178..190
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 192..204
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 206..218
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 220..232
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 234..246
        src/frontend/app/Http/Livewire/Dashboard/Page.php on lines 262..274

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

        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

        There are no issues that match your filters.

        Category
        Status