soliantconsulting/SimpleFM

View on GitHub

Showing 41 of 330 total issues

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

<?php
declare(strict_types = 1);

namespace Soliant\SimpleFM\Repository\Builder\Type;

Severity: Major
Found in src/Repository/Builder/Type/DecimalType.php and 1 other location - About 1 hr to fix
src/Repository/Builder/Type/DateTimeType.php on lines 1..30

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

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

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

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

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

Refactorings

Further Reading

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

        $entityMetadata = new Entity('foo', get_class($entityPrototype), [], [], [], [], [
            new OneToOne(
                'baz',
                'bar',
                'child',
Severity: Major
Found in test/Repository/Builder/MetadataHydrationTest.php and 1 other location - About 1 hr to fix
test/Repository/Builder/MetadataHydrationTest.php on lines 297..310

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

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

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

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

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

Refactorings

Further Reading

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

        $entityMetadata = new Entity('foo', get_class($entityPrototype), [], [], [], [], [
            new OneToOne(
                'baz',
                'bar',
                'child',
Severity: Major
Found in test/Repository/Builder/MetadataHydrationTest.php and 1 other location - About 1 hr to fix
test/Repository/Builder/MetadataHydrationTest.php on lines 358..371

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

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&foo=bar&-recid=1&-modid=1&-edit',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 310..316
test/Repository/RepositoryTest.php on lines 335..341
test/Repository/RepositoryTest.php on lines 390..396
test/Repository/RepositoryTest.php on lines 411..417
test/Repository/RepositoryTest.php on lines 441..447

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&-recid=1&-delete&-modid=1',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 310..316
test/Repository/RepositoryTest.php on lines 335..341
test/Repository/RepositoryTest.php on lines 369..375
test/Repository/RepositoryTest.php on lines 390..396
test/Repository/RepositoryTest.php on lines 411..417

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&foo=bar&-recid=1&-edit',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 310..316
test/Repository/RepositoryTest.php on lines 369..375
test/Repository/RepositoryTest.php on lines 390..396
test/Repository/RepositoryTest.php on lines 411..417
test/Repository/RepositoryTest.php on lines 441..447

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&foo=bar&-recid=1&-modid=1&-edit',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 335..341
test/Repository/RepositoryTest.php on lines 369..375
test/Repository/RepositoryTest.php on lines 390..396
test/Repository/RepositoryTest.php on lines 411..417
test/Repository/RepositoryTest.php on lines 441..447

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&-recid=1&-delete&-modid=1',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 310..316
test/Repository/RepositoryTest.php on lines 335..341
test/Repository/RepositoryTest.php on lines 369..375
test/Repository/RepositoryTest.php on lines 411..417
test/Repository/RepositoryTest.php on lines 441..447

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

        $repository = $this->createAssertiveRepository(function (Command $command) use (&$index) {
            $this->assertSame([
                '-lay=foo&-recid=1&-find&-max=1',
                '-lay=foo&-recid=1&-delete',
            ][++$index], (string) $command);
Severity: Major
Found in test/Repository/RepositoryTest.php and 5 other locations - About 55 mins to fix
test/Repository/RepositoryTest.php on lines 310..316
test/Repository/RepositoryTest.php on lines 335..341
test/Repository/RepositoryTest.php on lines 369..375
test/Repository/RepositoryTest.php on lines 390..396
test/Repository/RepositoryTest.php on lines 441..447

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

        $entityMetadata = new Entity('foo', get_class($entityPrototype), [], [], [], [
            new ManyToOne(
                'bat',
                'baz',
                'bar',
Severity: Minor
Found in test/Repository/Builder/MetadataHydrationTest.php and 1 other location - About 45 mins to fix
test/Repository/Builder/MetadataHydrationTest.php on lines 259..271

Duplicated Code

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

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

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

Tuning

This issue has a mass of 96.

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

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

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

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

Refactorings

Further Reading

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

        $entityMetadata = new Entity('foo', get_class($entityPrototype), [], [], [], [
            new ManyToOne(
                'bat',
                'baz',
                'bar',
Severity: Minor
Found in test/Repository/Builder/MetadataHydrationTest.php and 1 other location - About 45 mins to fix
test/Repository/Builder/MetadataHydrationTest.php on lines 199..211

Duplicated Code

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

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

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

Tuning

This issue has a mass of 96.

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

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

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

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

Refactorings

Further Reading

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

    public function testAddMultipleAndQueries()
    {
        $findQuery = new FindQuery();
        $findQuery->addAndQueries(new Query('foo', 'bar'), new Query('baz', 'bat', true));
        $this->assertSame([
Severity: Minor
Found in test/Repository/Query/FindQueryTest.php and 1 other location - About 40 mins to fix
test/Repository/Query/FindQueryTest.php on lines 53..64

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

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

    public function testAddMultipleOrQueries()
    {
        $findQuery = new FindQuery();
        $findQuery->addOrQueries(new Query('foo', 'bar'), new Query('baz', 'bat', true));
        $this->assertSame([
Severity: Minor
Found in test/Repository/Query/FindQueryTest.php and 1 other location - About 40 mins to fix
test/Repository/Query/FindQueryTest.php on lines 40..51

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

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

    public function testReadOnlyOneToOne()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('ReadOnly');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testReadOnlyFields()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('ReadOnly');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testEagerHydrationOneToMany()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('EagerHydration');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testReadOnlyManyToOne()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('ReadOnly');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testEagerHydrationOneToOneOwning()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('EagerHydration');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testEagerHydrationManyToOne()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('EagerHydration');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 162..170
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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

    public function testRepeatable()
    {
        $builder = new MetadataBuilder(__DIR__ . '/TestAssets');
        $metadata = $builder->getMetadata('Repeatable');

Severity: Major
Found in test/Repository/Builder/Metadata/MetadataBuilderTest.php and 7 other locations - About 35 mins to fix
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 172..180
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 182..190
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 192..200
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 202..210
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 212..220
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 222..230
test/Repository/Builder/Metadata/MetadataBuilderTest.php on lines 232..240

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

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