Showing 306 of 306 total issues
Function compileClasses
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function compileClasses()
{
$preloader = (new Factory())->create(['skip' => true]);
$path = $this->laravel->getCachedCompilePath();
- 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 handle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Manager $manager, Container $container, Composer $composer)
{
$output = new OperationFileOutput($this->outputFileName);
$composer->run($output, $this->extensionsNames);
- 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 add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function add($name, $source, $dependencies = [], $attributes = [], $replaces = [])
Method buffer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function buffer(&$buffer, $elements, $item, $after, $current)
Method script
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function script($name, $source, $dependencies = [], $attributes = [], $replaces = [])
Method inlineScript
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function inlineScript($name, $source = null, $dependencies = [], $attributes = [], $replaces = [])
Method evaluateAsset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function evaluateAsset($asset, $value, $original, &$sorted, &$assets)
Method compileColumnQuery
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function compileColumnQuery($query, $method, $parameters, $column, $keyword)
Method show
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function show($param, $type = null, $width = 40, $height = 40, $widget = false)
Method style
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function style($name, $source, $dependencies = [], $attributes = [], $replaces = [])
Method checkable
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function checkable($type, $name, $value, $checked, $options)
Method select
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function select($name, $list = [], $selected = null, $options = [], $optionsData = [])
Method save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function save($key, $value, $isNew = false, $brandId = false, $flag = null)
Method addContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function addContent($message, $view, $plain, $raw, $data)
Method selectYear
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function selectYear($name, $begin, $end, $selected = null, $options = [])
Method allow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function allow($roles, $actions, $allow = true, $descriptions = null, $categories = null)
Method generateCheckboxByGroup
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function generateCheckboxByGroup($id, $label, $name, $checked, array $options)
Method selectRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function selectRange($name, $begin, $end, $selected = null, $options = [])
Method checkboxes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function checkboxes($name, array $list = [], $checked = null, array $options = [], $separator = '<br>')
Function show
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function show($param, $type = null, $width = 40, $height = 40, $widget = false)
{
$filename = public_path('avatars/' . implode('_', [$type, (is_numeric($param) ? $param : camel_case($param)), $width, $height]) . '.png');
if (!$this->filesystem->exists(dirname($filename))) {
$this->filesystem->makeDirectory(dirname($filename));
- 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"