Showing 265 of 306 total issues
Function getFunctions
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getFunctions()
{
return [
new Twig_SimpleFunction('memorize', function ($key, $default = null) {
return app('antares.platform.memory')->get($key, $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 argumentsToString
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function argumentsToString($args)
{
$count = 0;
$isAssoc = $args !== array_values($args);
- 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 render
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function render($request, Exception $e)
{
if ($e instanceof ValidationException) {
return parent::render($request, $e);
}
- 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 columnSearch
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function columnSearch()
{
$columns = $this->request->get('columns', []);
foreach ($columns as $index => $column) {
- 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 getRecipients
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getRecipients()
{
if (empty($this->recipients)) {
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"
Further reading
File Fieldset.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Part of the Antares package.
*
Method updatePermissions
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updatePermissions($name, $values, $isNew = false, $brandId = null)
{
try {
if ($name === null) {
return false;
Method up
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
$this->down();
Schema::create('tbl_notifications', function(Blueprint $table) {
File JSMin.php
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Part of the Antares package.
*
File Foundation.php
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Part of the Antares package.
*
Fieldset
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Fieldset extends BaseGrid implements FieldsetContract
{
/**
* Fieldset name.
AbstractNotificationTemplate
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractNotificationTemplate extends Job implements NotificationContract, ShouldQueue
{
use InteractsWithQueue,
SerializesModels;
HtmlBuilder
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class HtmlBuilder
{
use Macroable,
ObfuscateTrait;
Function verify
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
protected function verify(array $items = [], $brandId = null)
{
$items = $this->clear($items);
$changed = [];
- 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
File User.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Part of the Antares package.
*
Function attributes
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function attributes(FieldView $field)
{
if (is_null($field)) {
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 wrap_html
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function wrap_html($str, $size = 50, $splitter = '<br />')
{
$html = false;
$i = 0;
$chars = str_split($str);
- 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 attributes
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function attributes(FieldView $field)
{
if (is_null($field)) {
return $this;
}
Method inline
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function inline()
{
$inline = <<<EOD
$(document).ready(function(){
var element =null;
Method beforeTable
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function beforeTable()
{
$hasMassActions = $this->hasMassActions();
$filters = $this->filterAdapter->getFilters();
$hasColumnFilter = $this->hasColumnFilter();