Issues

Filter by
MEDIUM

Code complexity

The class TypeGuesserTest has a coupling between objects value of 34. Consider to reduce the number of dependencies under 13.

tests/Functional/App/Helper/

TypeGuesserTest.php

21class TypeGuesserTest extends TestCase
MEDIUM

Code complexity

The class ConstraintTransformerContext has 21 non-getter- and setter-methods. Consider refactoring ConstraintTransformerContext to keep number of methods under 10.

features/bootstrap/

ConstraintTransformerContext.php

16class ConstraintTransformerContext extends AbstractContext
MEDIUM

Code complexity

The class DocTypeHelperTest has a coupling between objects value of 18. Consider to reduce the number of dependencies under 13.

tests/Functional/App/Helper/

DocTypeHelperTest.php

26class DocTypeHelperTest extends TestCase
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

src/Infra/Transformer/

ConstraintToParamsDocTransformer.php

29 private $constraintPayloadDocHelper;
HIGH

Security

Insecure Modules Libraries

The method givenIHaveTheFollowingConstraint() contains an eval expression.

features/bootstrap/

ConstraintTransformerContext.php

28 $this->lastConstraint = eval($phpCode->getRaw());
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'thenIShouldHaveFollowingConstraintDoc'.

features/bootstrap/

ConstraintTransformerContext.php

59 Assert::assertSame($class, get_class($this->lastDocumenation));
MEDIUM

Best practice

Avoid using static access to class '\Prophecy\Argument' in method 'testShouldHandleCollectionConstraintAsArrayDoc'.

tests/Functional/Infra/Transformer/

ConstraintToParamsDocTransformerTest.php

159 $this->docTypeHelper->guess(Argument::cetera())
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

tests/Technical/App/Helper/

DocTypeHelperTest.php

25 private $constraintPayloadDocHelper;
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

tests/Functional/Infra/Transformer/

ConstraintToParamsDocTransformerTest.php

37 private $constraintPayloadDocHelper;
MEDIUM

Best practice

Avoid using static access to class '\Prophecy\Argument' in method 'testShouldDoNothingIfNoPayloadDocDefined'.

tests/Functional/App/Helper/ConstraintPayloadDocHelper/

AppendPayloadDocTest.php

36 $doc->setRequired(Argument::cetera())->shouldNotBeCalled();
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'thenConstraintDocShouldHaveXSiblings'.

features/bootstrap/

ConstraintTransformerContext.php

77 Assert::assertCount((int) $count, $this->lastDocumenation->getSiblingList());
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

src/Infra/Transformer/

ConstraintToParamsDocTransformer.php

62 ConstraintPayloadDocHelper $constraintPayloadDocHelper
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

features/bootstrap/

ConstraintTransformerContext.php

36 $constraintPayloadDocHelper = new ConstraintPayloadDocHelper();
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'assertMethodCallResult'.

features/bootstrap/

ConstraintTransformerContext.php

245 Assert::assertSame($result, call_user_func_array([$object, $methodName], []));
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'findSiblingNamed'.

features/bootstrap/

ConstraintTransformerContext.php

227 Assert::assertInstanceOf(CollectionDoc::class, $this->lastDocumenation);
MEDIUM

Code complexity

The class ConstraintToParamsDocTransformer has 12 non-getter- and setter-methods. Consider refactoring ConstraintToParamsDocTransformer to keep number of methods under 10.

src/Infra/Transformer/

ConstraintToParamsDocTransformer.php

18class ConstraintToParamsDocTransformer
MEDIUM

Code complexity

The class MinMaxHelper has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.

src/App/Helper/

MinMaxHelper.php

14class MinMaxHelper
MEDIUM

Code complexity

The class StringDocHelperTest has a coupling between objects value of 25. Consider to reduce the number of dependencies under 13.

tests/Functional/App/Helper/

StringDocHelperTest.php

17class StringDocHelperTest extends TestCase
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

tests/Functional/App/Helper/

DocTypeHelperTest.php

31 private $constraintPayloadDocHelper;
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

src/App/Helper/

DocTypeHelper.php

46 public function __construct(ConstraintPayloadDocHelper $constraintPayloadDocHelper, TypeGuesser $typeGuesser)
MEDIUM

Code complexity

The class ConstraintToParamsDocTransformerTest has 13 non-getter- and setter-methods. Consider refactoring ConstraintToParamsDocTransformerTest to keep number of methods under 10.

tests/Functional/Infra/Transformer/

ConstraintToParamsDocTransformerTest.php

26class ConstraintToParamsDocTransformerTest extends TestCase
MEDIUM

Code complexity

The class TypeGuesser has a coupling between objects value of 15. Consider to reduce the number of dependencies under 13.

src/App/Helper/

TypeGuesser.php

18class TypeGuesser
MEDIUM

Code complexity

The method provideConstraints() has 117 lines of code. Current threshold is set to 100. Avoid really long methods.

tests/Functional/App/Helper/

TypeGuesserTest.php

48 public function provideConstraints()
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'thenConstraintDocItemValidationShouldBeOfType'.

features/bootstrap/

ConstraintTransformerContext.php

68 Assert::assertSame($class, get_class($itemValidation));
MEDIUM

Code complexity

The class ConstraintToParamsDocTransformer has a coupling between objects value of 18. Consider to reduce the number of dependencies under 13.

src/Infra/Transformer/

ConstraintToParamsDocTransformer.php

18class ConstraintToParamsDocTransformer
MINOR

Code style

Avoid excessively long variable names like $constraintPayloadDocHelper. Keep variable name length under 25.

src/App/Helper/

DocTypeHelper.php

22 private $constraintPayloadDocHelper;
MEDIUM

Code complexity

The class ConstraintToParamsDocTransformerTest has a coupling between objects value of 24. Consider to reduce the number of dependencies under 13.

tests/Functional/Infra/Transformer/

ConstraintToParamsDocTransformerTest.php

26class ConstraintToParamsDocTransformerTest extends TestCase
MEDIUM

Best practice

Avoid using static access to class '\PHPUnit\Framework\Assert' in method 'thenConstraintDocShouldHaveASiblingName'.

features/bootstrap/

ConstraintTransformerContext.php

87 Assert::assertInstanceOf($class, $sibling);