Showing 26 of 145 total issues
SearchEngine
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class SearchEngine
{
/**
* @var string
*/
File SearchEngine.php
has 369 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the Fujes package.
* @link https://github.com/robotomize/fujes
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
Method testCities
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testCities()
{
$this->assertEquals('Vladivostok', SearchFactory::find(
self::$prefix . self::$testUrlName[0],
self::$testMatchString[0],
SearchLevenshteinCompare
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class SearchLevenshteinCompare implements ISearch
{
/**
* @var array
*/
SearchSubstringCompare
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class SearchSubstringCompare implements ISearch
{
/**
* @var array
*/
Method testParseJson
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testParseJson()
{
$searchEngine = new SearchEngine(
self::$prefix . self::$testUrlName[0],
self::$testMatchString[0],
File SearchLevenshteinCompare.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the Fujes package.
* @link https://github.com/robotomize/fujes
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
SearchFacade
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class SearchFacade
{
/**
* @var string
Function __construct
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function __construct(
$urlName,
$matchString,
$depth = 1,
$jsonEncode = true,
- Read upRead up
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 search
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function search($inputArray = [], $key = '', $level = 0)
{
if (0 === count($inputArray)) {
$inputArray = $this->inputArray;
}
- Read upRead up
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 preSearch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function preSearch($inputArray = [], $key = '', $level = 0)
{
if (0 === count($inputArray)) {
$inputArray = $this->inputArray;
}
- Read upRead up
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 preSearch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function preSearch($inputArray = [], $key = '', $level = 0)
{
if (0 === count($inputArray)) {
$inputArray = $this->inputArray;
}
- Read upRead up
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 substringIterator
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function substringIterator($currentString)
{
$currentIterationCount = 0;
$currentMaxStackValue = 0;
- Read upRead up
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 search
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function search($inputArray = [], $key = '', $level = 0)
{
if (0 === count($inputArray)) {
$inputArray = $this->inputArray;
}
- Read upRead up
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 run
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run()
{
$this->parseJsonToArray();
if (0 === count($this->jsonTree)) {
$this->exceptionObject->create('The data is not in JSON format');
Method __construct
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(
$urlName,
$matchString,
$depth = 1,
$jsonEncode = true,
Function run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function run()
{
$this->parseJsonToArray();
if (0 === count($this->jsonTree)) {
$this->exceptionObject->create('The data is not in JSON format');
- Read upRead up
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 __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$urlName,
$matchString,
$depth = 1,
$jsonEncode = true,
$multipleResult = false,
Method find
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$urlName,
$matchString,
$depth = 1,
$jsonEncode = true,
$multipleResult = false,
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$urlName,
$matchString,
$depth = 1,
$jsonEncode = true,
$multipleResult = false,