Showing 16 of 20 total issues
Function handle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function handle(?AbstractCallback $callback = null, ?Model $model = null): string
{
$output = '';
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflection */
$reflection = $callback->getParameters()[static::PARAM_REF];
- 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 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Configuration $configuration,
FormConfiguration $formConfiguration,
Settings $settings,
PageRenderer $pageRenderer,
Typo3Version $typo3Version
Function assignResultsToModel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function assignResultsToModel(array $values, Model $model, AbstractCallback $callback): void
{
$params = $callback->getParameters();
/** @var \ReflectionMethod $reflectionMethod */
$reflectionMethod = $params[static::PARAM_ADDITIONAL][static::PARAM_REFLECTION_METHOD];
- 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 processGroups
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function processGroups(array &$moduleSettings): array
{
$result = [];
$validation = Krexx::$pool->config->validation;
- 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 addPropertyDumper
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function addPropertyDumper(array &$stuffToDump): void
{
$isInScope = $this->pool->scope->isInScope();
$config = $this->pool->config;
- 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 isAllowedDebugCall
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isAllowedDebugCall(object $data, string $method): bool
{
// Check if the class itself is blacklisted.
foreach ($this->classBlacklist as $classname) {
if ($data instanceof $classname) {
- 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 parse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parse(string $string = "\n"): string
{
switch ($result = $this->read(1)) {
case 'N':
// Null handling.
- 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 generateComplicatedStuff
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function generateComplicatedStuff(Model $model): string
{
// Define a fallback value.
$result = static::UNKNOWN_VALUE;
- 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 getCurrentUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getCurrentUrl(): string
{
$server = $this->pool->getServer();
// Check if someone has been messing with the $_SERVER, to prevent
- 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 handleUndeclaredProperties
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function handleUndeclaredProperties(
array &$refProps,
$data,
array $publicProps,
ReflectionClass $ref
- 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 retrieveSql
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function retrieveSql($query): string
{
try {
if ($query instanceof QueryInterface) {
$query = GeneralUtility::makeInstance(Typo3DbQueryParser::class)
- 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 retrieveDeclaringClassFromTraits
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function retrieveDeclaringClassFromTraits(
array $traits,
ReflectionProperty $refProperty,
ReflectionClass $originalRef
): ?ReflectionClass {
- 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 generateName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function generateName(ReflectionClass $ref): string
{
$result = '';
$messages = $this->pool->messages;
- 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 cleanupOldChunks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function cleanupOldChunks(): Cleanup
{
// Check for write access. We also do this only once.
if (static::$chunksDone || !$this->pool->chunks->isChunkAllowed()) {
return $this;
- 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 populateGetterLists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function populateGetterLists(ReflectionMethod $method, ReflectionClass $ref): void
{
// Check, if the method is really available, inside the analysis
// context. An inherited private method can not be called inside the
// $this context.
- 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 translateDefaultValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function translateDefaultValue($default)
{
if (is_string($default)) {
$default = '\'' . str_replace('\'', '\\\'', $default) . '\'';
} elseif (is_array($default)) {
- 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"