tests/CrEOF/Spatial/Tests/ORM/Query/WrappingTest.php
Method testTypeWrappingSelect
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testTypeWrappingSelect()
{
$lineString = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Avoid using static access to class '\Doctrine\ORM\Version' in method 'testTypeWrappingWhere'. Open
Open
if (Version::compare('2.5') <= 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Doctrine\ORM\Version' in method 'testTypeWrappingSelect'. Open
Open
if (Version::compare('2.5') <= 0) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Line exceeds 120 characters; contains 147 characters Open
Open
throw new UnsupportedPlatformException(sprintf('DBAL platform "%s" is not currently supported.', $this->getPlatform()->getName()));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
Open
$query = $this->getEntityManager()->createQuery('SELECT g FROM CrEOF\Spatial\Tests\Fixtures\GeometryEntity g WHERE g.geometry = :geometry');
- Create a ticketCreate a ticket
- Exclude checks