Showing 120 of 487 total issues
Avoid too many return
statements within this method. Open
return dirname($file) . '/Resources/views';
Avoid too many return
statements within this method. Open
return new \Twig_Loader_Chain([
$app['twig.loader.array'],
$app['twig.loader.filesystem'],
]);
Avoid too many return
statements within this method. Open
return new RouterController($app['profiler'], $app['twig'], $app['request_matcher'] ?? NULL, $app['routes']);
Avoid too many return
statements within this method. Open
$app['blade.view'] = $app->factory(function () { return new BladeView($this->app['blade.context']); });
Avoid too many return
statements within this method. Open
function () use ($app) { return new CompilerEngine($app['blade.compiler'], $app['files']); });
Avoid too many return
statements within this method. Open
return new TwigRenderer($app['twig.form.engine'], $app['csrf.token_manager']);
Avoid too many return
statements within this method. Open
$collectors['form'] = function ($app) { return new FormDataCollector($app['data_collectors.form.extractor']); };
Avoid too many return
statements within this method. Open
return $collectors;
Avoid too many return
statements within this method. Open
return $loader;
Avoid too many return
statements within this method. Open
return dirname(dirname($r->getFileName())) . '/Resources/views';
Avoid too many return
statements within this method. Open
return new ProfilerListener($app['profiler'], $app['request_stack'], $app['profiler.request_matcher'], $app['profiler.only_exceptions'], $app['profiler.only_master_requests']);
Avoid too many return
statements within this method. Open
return new ProfilerListener($app['profiler'], $app['profiler.request_matcher'], $app['profiler.only_exceptions'], $app['profiler.only_master_requests'], $app['request_stack']);
Function array_get
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function array_get($array, $key, $default = NULL)
{
if (NULL === $key) {
return $array;
}
- 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 array_query
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function array_query($array, $key, $default = NULL)
{
if ($key instanceof \Closure) {
return $key($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"
Further reading
Function include_template
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function include_template($template, array $data = [])
{
static $cache = [];
foreach ($this->templatePaths as $template_path)
- 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 array_has
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function array_has($array, $key)
{
if ([] === $array || NULL === $key) {
return FALSE;
}
- 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 parseContainer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function parseContainer(Container $container)
{
$map = [];
foreach ($container->keys() as $name) {
- 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 build
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
- 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 env
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function env($key, $default = NULL)
{
$value = getenv($key);
if ($value === FALSE) {
- 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 array_fetch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function array_fetch($array, $key)
{
$results = [];
foreach (explode('.', $key) as $segment) {
- 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"