Showing 139 of 139 total issues
Method makeField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function makeField($columnConfig, $label, $column, $value, $errors)
Function parseFields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parseFields($formFields)
{
$fields = [];
if (empty($formFields)) {
- 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 formSubmitHtml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function formSubmitHtml()
{
$html = '';
$onSubmit = null;
- 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 isChecked
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isChecked($name, $value, $options)
{
if (is_null($value) && isset($options['attributes']['value'])) {
$value = $options['attributes']['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 make
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function make()
{
if ($this->orientation === 'horizontal') {
$this->formClass = $this->formClass ?? config('forms.form.horizontal-class', 'form-horizontal');
}
- 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
Avoid too many return
statements within this method. Open
return implode('', $formBuild);
Avoid too many return
statements within this method. Open
return "<figure><blockquote style=\"text-align: {$alignment};\">{$text}</blockquote><figcaption>{$caption}</figcaption></figure>";
Avoid too many return
statements within this method. Open
return "<table>{$contents}</table>";
Avoid too many return
statements within this method. Open
return $checklist;
Avoid too many return
statements within this method. Open
return $this->buildColumnForm($formBuild, null, true);
Avoid too many return
statements within this method. Open
return $this->buildColumnForm($formBuild, null);
Avoid too many return
statements within this method. Open
return $this->buildColumnForm($formBuild, 6);
Avoid too many return
statements within this method. Open
return "<img src=\"{$file['url']}\" title=\"{$caption}\" alt=\"{$caption}\">";
Avoid too many return
statements within this method. Open
return '';
Avoid too many return
statements within this method. Open
return "<{$listStyle}l>{$listItems}</{$listStyle}l>";
Avoid too many return
statements within this method. Open
return "<pre><code>{$code}</code></pre>";
Function fromObject
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function fromObject($object, $fields = [])
{
$fieldCollection = [];
if (empty($fields)) {
- 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 make
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function make($name, $options = []): FieldConfigProcessor
{
$field = new static();
$options = static::parseOptions($options);
$options['type'] = static::getType() ?? 'text';
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
public function handle($request, Closure $next)
{
if ($request->has('h-captcha-response')) {
if ($request->get('h-captcha-response')) {
$response = Http::post('https://hcaptcha.com/siteverify', [
- 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"