Showing 181 of 185 total issues
Avoid too many return
statements within this method. Open
return $treeBuilder;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return $transitions;
Avoid too many return
statements within this method. Open
return [];
Avoid too many return
statements within this method. Open
return $this->getCachedIdReader($this->registry, $options['class']);
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return 1;
Avoid too many return
statements within this method. Open
return $this->createHasher($config);
Avoid too many return
statements within this method. Open
return [
'class' => SodiumPasswordHasher::class,
'arguments' => [
$config['time_cost'],
(($config['memory_cost'] ?? 0) << 10) ?: null,
Avoid too many return
statements within this method. Open
return $this->createHasher($config);
Avoid too many return
statements within this method. Open
return [
'class' => NativePasswordHasher::class,
'arguments' => [
$config['time_cost'],
(($config['memory_cost'] ?? 0) << 10) ?: null,
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $config;
Function getMetadata
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getMetadata(string $class): ?array
{
// normalize class name
$class = self::getRealClass(ltrim($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 getServiceProvider
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function getServiceProvider(Container $container, string $name, string $value = null)
{
if (\preg_match('#^[a-z]++:#', $dsn = $value ?? $name)) {
if (null === $value) {
$name = '.cache_connection.'.\md5($dsn);
- 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 guessMaxLength
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function guessMaxLength(string $class, string $property): ?ValueGuess
{
$ret = $this->getMetadata($class);
if ($ret && isset($ret[0]->fieldMappings[$property]) && !$ret[0]->hasAssociation($property)) {
$mapping = $ret[0]->getFieldMapping($property);
- 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 getGenerators
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getGenerators(Container $container, string $entityPath): array
{
$generators = [new Statement(Generator\ResetTables::class)]; // re-declared table schemas (remove columns)
if (\class_exists(\Cycle\Annotated\Configurator::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 boot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function boot(Container $container): void
{
if ($container->has('events.dispatcher')) {
if ($container->shared('events.dispatcher')) {
$container->removeShared('events.dispatcher');
- 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 findServerAddress
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function findServerAddress(?string $address): string
{
if (null === $address) {
$this->hostname = '127.0.0.1';
$this->port = $this->findBestPort();
- 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 register
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function register(Container $container, array $configs = []): void
{
if (!$configs['enabled']) {
return;
}
- 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"