Showing 60 of 447 total issues
File OrmTestCase.php
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Copyright (C) 2015 Derek J. Lambert
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
- Create a ticketCreate a ticket
File MultiPolygonTest.php
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace CrEOF\Spatial\Tests\PHP\Types\Geometry;
- Create a ticketCreate a ticket
Method testSelectArea
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectArea()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Method testSelectSTArea
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTArea()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Method testAreaWhere
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAreaWhere()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Method testSTAreaWhere
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTAreaWhere()
{
$entity1 = new PolygonEntity();
$rings1 = array(
new LineString(array(
- Create a ticketCreate a ticket
Function validateArguments
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function validateArguments(array $argv = null)
{
$argc = count($argv);
if (1 == $argc && is_array($argv[0])) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method testSolidMultiPolygonAddPolygon
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSolidMultiPolygonAddPolygon()
{
$expected = array(
new Polygon(
array(
- Create a ticketCreate a ticket
Function onNotSuccessfulTest
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function onNotSuccessfulTest(\Exception $e)
{
if (! $GLOBALS['opt_use_debug_stack'] || $e instanceof \PHPUnit_Framework_AssertionFailedError) {
throw $e;
}
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method testSolidMultiPolygonFromObjectsToArray
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSolidMultiPolygonFromObjectsToArray()
{
$expected = array(
array(
array(
- Create a ticketCreate a ticket
Method testSolidMultiPolygonFromArraysGetPolygons
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSolidMultiPolygonFromArraysGetPolygons()
{
$expected = array(
new Polygon(
array(
- Create a ticketCreate a ticket
Method setUpFunctions
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function setUpFunctions()
{
$configuration = $this->getEntityManager()->getConfiguration();
if ($this->getPlatform()->getName() == 'postgresql') {
- Create a ticketCreate a ticket
Method testMBRDisjointWhereParameter
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testMBRDisjointWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSTDisjointWhereParameter
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTDisjointWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testDisjointWhereParameter
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testDisjointWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTDisjoint
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTDisjoint()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectMBRDisjoint
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectMBRDisjoint()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectDisjoint
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectDisjoint()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testGeometryWalkerText
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGeometryWalkerText()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(2, 2),
- Create a ticketCreate a ticket
Method testGeometryWalkerBinary
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGeometryWalkerBinary()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(2, 2),
- Create a ticketCreate a ticket