wsssoftware/cakephp-datatables

View on GitHub

Showing 30 of 74 total issues

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

    public function setPluginSelectLanguageCells($cells) {
        if (!in_array(getType($cells), ['string', 'array'])) {
            throw new InvalidArgumentException('Cells must be a string or a array with plural translations.');
        } elseif (is_array($cells)) {
            $allowedKeys = ['_', '0', '1'];
Severity: Major
Found in src/Table/Option/Section/PluginSelectTrait.php and 2 other locations - About 3 hrs to fix
src/Table/Option/Section/PluginSelectTrait.php on lines 115..129
src/Table/Option/Section/PluginSelectTrait.php on lines 168..182

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

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

    public function setPluginSelectLanguageColumns($columns) {
        if (!in_array(getType($columns), ['string', 'array'])) {
            throw new InvalidArgumentException('Columns must be a string or a array with plural translations.');
        } elseif (is_array($columns)) {
            $allowedKeys = ['_', '0', '1'];
Severity: Major
Found in src/Table/Option/Section/PluginSelectTrait.php and 2 other locations - About 3 hrs to fix
src/Table/Option/Section/PluginSelectTrait.php on lines 62..76
src/Table/Option/Section/PluginSelectTrait.php on lines 168..182

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

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

    public function setPluginSelectLanguageRows($rows) {
        if (!in_array(getType($rows), ['string', 'array'])) {
            throw new InvalidArgumentException('Rows must be a string or a array with plural translations.');
        } elseif (is_array($rows)) {
            $allowedKeys = ['_', '0', '1'];
Severity: Major
Found in src/Table/Option/Section/PluginSelectTrait.php and 2 other locations - About 3 hrs to fix
src/Table/Option/Section/PluginSelectTrait.php on lines 62..76
src/Table/Option/Section/PluginSelectTrait.php on lines 115..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 150.

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

    public function testOrderable() {
        $col = $this->Columns->getColumnByIndex(0);
        static::assertEquals(null, $col->isOrderable());
        $col->setOrderable(true);
        static::assertEquals(true, $col->isOrderable());
Severity: Major
Found in tests/TestCase/Table/ColumnTest.php and 2 other locations - About 2 hrs to fix
tests/TestCase/Table/ColumnTest.php on lines 229..238
tests/TestCase/Table/ColumnTest.php on lines 273..282

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

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

    public function testVisible() {
        $col = $this->Columns->getColumnByIndex(0);
        static::assertEquals(null, $col->isVisible());
        $col->setVisible(true);
        static::assertEquals(true, $col->isVisible());
Severity: Major
Found in tests/TestCase/Table/ColumnTest.php and 2 other locations - About 2 hrs to fix
tests/TestCase/Table/ColumnTest.php on lines 215..224
tests/TestCase/Table/ColumnTest.php on lines 229..238

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

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

    public function testSearchable() {
        $col = $this->Columns->getColumnByIndex(0);
        static::assertEquals(null, $col->isSearchable());
        $col->setSearchable(true);
        static::assertEquals(true, $col->isSearchable());
Severity: Major
Found in tests/TestCase/Table/ColumnTest.php and 2 other locations - About 2 hrs to fix
tests/TestCase/Table/ColumnTest.php on lines 215..224
tests/TestCase/Table/ColumnTest.php on lines 273..282

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

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

    public function testSetPluginSelectLanguageCells() {
        $this->MainOption->setPluginSelectLanguageCells('abc');
        $this->assertEquals('abc', $this->MainOption->getPluginSelectLanguageCells());
        $this->MainOption->setPluginSelectLanguageCells(['_' => 'abc']);
        $this->assertEquals(['_' => 'abc'], $this->MainOption->getPluginSelectLanguageCells());
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 64..71
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 116..123

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

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

    public function testSetPluginSelectLanguageRows() {
        $this->MainOption->setPluginSelectLanguageRows('abc');
        $this->assertEquals('abc', $this->MainOption->getPluginSelectLanguageRows());
        $this->MainOption->setPluginSelectLanguageRows(['_' => 'abc']);
        $this->assertEquals(['_' => 'abc'], $this->MainOption->getPluginSelectLanguageRows());
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 64..71
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 186..193

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

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

    public function testSetPluginSelectLanguageColumns() {
        $this->MainOption->setPluginSelectLanguageColumns('abc');
        $this->assertEquals('abc', $this->MainOption->getPluginSelectLanguageColumns());
        $this->MainOption->setPluginSelectLanguageColumns(['_' => 'abc']);
        $this->assertEquals(['_' => 'abc'], $this->MainOption->getPluginSelectLanguageColumns());
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 116..123
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 186..193

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
Severity: Major
Found in tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php and 6 other locations - About 55 mins to fix
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
Severity: Major
Found in tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php and 6 other locations - About 55 mins to fix
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

    public function setUp(): void {
        parent::setUp();
        $plugin = new Plugin();
        $plugin->bootstrap(new Application(''));
        $plugin->routes(Router::createRouteBuilder(''));
Severity: Major
Found in tests/TestCase/Table/Option/Callback/CallBacksTraitTest.php and 6 other locations - About 55 mins to fix
tests/TestCase/Table/Option/Section/AjaxOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/FeaturesOptionTraitTest.php on lines 40..48
tests/TestCase/Table/Option/Section/LanguageOptionTraitTest.php on lines 41..49
tests/TestCase/Table/Option/Section/OptionsOptionAOTraitTest.php on lines 45..53
tests/TestCase/Table/Option/Section/OptionsOptionPZTraitTest.php on lines 44..52
tests/TestCase/Table/Option/Section/PluginSelectTraitTest.php on lines 40..48

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

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

        Assets::PLUGIN_KEY_TABLE => [
            Assets::THEME_BASE => [650 => 'plugins/key-table/keyTable.dataTables.min.css'],
            Assets::THEME_BOOTSTRAP3 => [650 => 'plugins/key-table/keyTable.bootstrap.min.css'],
            Assets::THEME_BOOTSTRAP4 => [650 => 'plugins/key-table/keyTable.bootstrap4.min.css'],
            Assets::THEME_FOUNDATION => [650 => 'plugins/key-table/keyTable.foundation.min.css'],
Severity: Major
Found in src/Controller/Component/CssComponent.php and 11 other locations - About 40 mins to fix
src/Controller/Component/CssComponent.php on lines 62..69
src/Controller/Component/CssComponent.php on lines 70..77
src/Controller/Component/CssComponent.php on lines 78..85
src/Controller/Component/CssComponent.php on lines 86..93
src/Controller/Component/CssComponent.php on lines 94..101
src/Controller/Component/CssComponent.php on lines 110..117
src/Controller/Component/CssComponent.php on lines 118..125
src/Controller/Component/CssComponent.php on lines 126..133
src/Controller/Component/CssComponent.php on lines 134..141
src/Controller/Component/CssComponent.php on lines 142..149
src/Controller/Component/CssComponent.php on lines 150..157

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

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

        Assets::PLUGIN_FIXED_COLUMNS => [
            Assets::THEME_BASE => [450 => 'plugins/fixed-columns/fixedColumns.dataTables.min.css'],
            Assets::THEME_BOOTSTRAP3 => [450 => 'plugins/fixed-columns/fixedColumns.bootstrap.min.css'],
            Assets::THEME_BOOTSTRAP4 => [450 => 'plugins/fixed-columns/fixedColumns.bootstrap4.min.css'],
            Assets::THEME_FOUNDATION => [450 => 'plugins/fixed-columns/fixedColumns.foundation.min.css'],
Severity: Major
Found in src/Controller/Component/CssComponent.php and 11 other locations - About 40 mins to fix
src/Controller/Component/CssComponent.php on lines 62..69
src/Controller/Component/CssComponent.php on lines 70..77
src/Controller/Component/CssComponent.php on lines 78..85
src/Controller/Component/CssComponent.php on lines 94..101
src/Controller/Component/CssComponent.php on lines 102..109
src/Controller/Component/CssComponent.php on lines 110..117
src/Controller/Component/CssComponent.php on lines 118..125
src/Controller/Component/CssComponent.php on lines 126..133
src/Controller/Component/CssComponent.php on lines 134..141
src/Controller/Component/CssComponent.php on lines 142..149
src/Controller/Component/CssComponent.php on lines 150..157

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

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

        Assets::PLUGIN_SCROLLER => [
            Assets::THEME_BASE => [1050 => 'plugins/scroller/scroller.dataTables.min.css'],
            Assets::THEME_BOOTSTRAP3 => [1050 => 'plugins/scroller/scroller.bootstrap.min.css'],
            Assets::THEME_BOOTSTRAP4 => [1050 => 'plugins/scroller/scroller.bootstrap4.min.css'],
            Assets::THEME_FOUNDATION => [1050 => 'plugins/scroller/scroller.foundation.min.css'],
Severity: Major
Found in src/Controller/Component/CssComponent.php and 11 other locations - About 40 mins to fix
src/Controller/Component/CssComponent.php on lines 62..69
src/Controller/Component/CssComponent.php on lines 70..77
src/Controller/Component/CssComponent.php on lines 78..85
src/Controller/Component/CssComponent.php on lines 86..93
src/Controller/Component/CssComponent.php on lines 94..101
src/Controller/Component/CssComponent.php on lines 102..109
src/Controller/Component/CssComponent.php on lines 110..117
src/Controller/Component/CssComponent.php on lines 118..125
src/Controller/Component/CssComponent.php on lines 126..133
src/Controller/Component/CssComponent.php on lines 142..149
src/Controller/Component/CssComponent.php on lines 150..157

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

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

        Assets::PLUGIN_SEARCH_PANES => [
            Assets::THEME_BASE => [1150 => 'plugins/search-panes/searchPanes.dataTables.min.css'],
            Assets::THEME_BOOTSTRAP3 => [1150 => 'plugins/search-panes/searchPanes.bootstrap.min.css'],
            Assets::THEME_BOOTSTRAP4 => [1150 => 'plugins/search-panes/searchPanes.bootstrap4.min.css'],
            Assets::THEME_FOUNDATION => [1150 => 'plugins/search-panes/searchPanes.foundation.min.css'],
Severity: Major
Found in src/Controller/Component/CssComponent.php and 11 other locations - About 40 mins to fix
src/Controller/Component/CssComponent.php on lines 62..69
src/Controller/Component/CssComponent.php on lines 70..77
src/Controller/Component/CssComponent.php on lines 78..85
src/Controller/Component/CssComponent.php on lines 86..93
src/Controller/Component/CssComponent.php on lines 94..101
src/Controller/Component/CssComponent.php on lines 102..109
src/Controller/Component/CssComponent.php on lines 110..117
src/Controller/Component/CssComponent.php on lines 118..125
src/Controller/Component/CssComponent.php on lines 126..133
src/Controller/Component/CssComponent.php on lines 134..141
src/Controller/Component/CssComponent.php on lines 150..157

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

Severity
Category
Status
Source
Language