Showing 60 of 447 total issues
Method onNotSuccessfulTest
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function onNotSuccessfulTest(\Exception $e)
{
if (! $GLOBALS['opt_use_debug_stack'] || $e instanceof \PHPUnit_Framework_AssertionFailedError) {
throw $e;
}
- Create a ticketCreate a ticket
Method testSTLineCrossingDirectionWhereParameter
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTLineCrossingDirectionWhereParameter()
{
$lineString1 = new LineString(array(
new Point(8, 15),
new Point(4, 8)
- Create a ticketCreate a ticket
Method testSelectSTContains
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTContains()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTCoveredBy
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTCoveredBy()
{
$lineString1 = new LineString(array(
new Point(6, 6),
new Point(10, 6),
- Create a ticketCreate a ticket
Method testSelectContains
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectContains()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTCovers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTCovers()
{
$lineString1 = new LineString(array(
new Point(6, 6),
new Point(10, 6),
- Create a ticketCreate a ticket
Method testSelectSTClosestPoint
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTClosestPoint()
{
$ring1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectMBRContains
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectMBRContains()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTContainsProperly
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTContainsProperly()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testSelectSTCentroid
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSelectSTCentroid()
{
$lineString1 = new LineString(array(
new Point(6, 6),
new Point(10, 6),
- Create a ticketCreate a ticket
Method testMultiPolygonFromObjectsGetLastPolygon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testMultiPolygonFromObjectsGetLastPolygon()
{
$polygon1 = new Polygon(
array(
new LineString(
- Create a ticketCreate a ticket
Method testMultiPolygonFromObjectsGetSinglePolygon
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testMultiPolygonFromObjectsGetSinglePolygon()
{
$polygon1 = new Polygon(
array(
new LineString(
- Create a ticketCreate a ticket
Method testSTCoversWhereParameter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTCoversWhereParameter()
{
$lineString1 = new LineString(array(
new Point(6, 6),
new Point(10, 6),
- Create a ticketCreate a ticket
Method testSTCoveredByWhereParameter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTCoveredByWhereParameter()
{
$lineString1 = new LineString(array(
new Point(6, 6),
new Point(10, 6),
- Create a ticketCreate a ticket
Method testSTContainsProperlyWhereParameter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testSTContainsProperlyWhereParameter()
{
$lineString1 = new LineString(array(
new Point(0, 0),
new Point(10, 0),
- Create a ticketCreate a ticket
Method testAsBinary
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testAsBinary()
{
$lineString1 = array(
new Point(0, 0),
new Point(2, 2),
- Create a ticketCreate a ticket
Method validateArguments
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function validateArguments(array $argv = null)
{
$argc = count($argv);
if (1 == $argc && is_array($argv[0])) {
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
if ((is_numeric($argv[0]) || is_string($argv[0])) && (is_numeric($argv[1]) || is_string($argv[1])) && (is_numeric($argv[2]) || is_null($argv[2]) || is_string($argv[2]))) {
return $argv;
}
- Create a ticketCreate a ticket
Function setUpTypes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function setUpTypes()
{
foreach (array_keys($this->usedTypes) as $typeName) {
if (! isset(static::$addedTypes[$typeName]) && ! Type::hasType($typeName)) {
Type::addType($typeName, static::$types[$typeName]);
- 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
Function testDoctrineTypeMapping
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function testDoctrineTypeMapping()
{
$platform = $this->getPlatform();
foreach ($this->getAllClassMetadata() as $metadata) {
- 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"