clean/assure

View on GitHub
src/assure.php

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Showing 4 of 4 total issues

Avoid too many return statements within this method.
Open

return $value != $operand;
Severity: Major
Found in src/assure.php - About 30 mins to fix

Avoid too many return statements within this method.
Open

return $value < $operand;
Severity: Major
Found in src/assure.php - About 30 mins to fix

Function assure has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function assure(&$value, $assures)
{
static $instances = [];
 
$assures = (array)$assures;
Severity: Minor
Found in src/assure.php - About 25 mins to fix

Missing class import via use statement (line '55', column '27').
Open

throw new \InvalidArgumentException("Unknown operator '$operator' given");
Severity: Minor
Found in src/assure.php by phpmd

There are no issues that match your filters.

Category
Status