Showing 265 of 306 total issues
Method up
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
try {
$this->down();
Schema::create('tbl_log_priorities', function(Blueprint $table) {
QueryBuilderEngine
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class QueryBuilderEngine extends BaseEngine
{
/**
* @param \Illuminate\Database\Query\Builder $builder
Function resolveFieldValue
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function resolveFieldValue($name, $row, Fluent $control)
{
if (ends_with($name, '[]')) {
$fieldnameInRequest = str_replace('[]', '', $name);
$oldRequest = $this->request->old($fieldnameInRequest);
- 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 validateSource
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function validateSource($attribute, $value, $parameters)
{
$name = $value->getClientOriginalName();
$directory = $value->directory;
$filename = $value->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"
Further reading
Method render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
app('antares.asset')->container('antares/foundation::application')->add('webpack_forms_basic', '/webpack/forms_basic.js', ['app_cache']);
$grid = $this->grid;
$action = '';
Method validateSource
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validateSource($attribute, $value, $parameters)
{
$name = $value->getClientOriginalName();
$directory = $value->directory;
$filename = $value->filename;
Method filtering
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function filtering()
{
$this->query->where(
function ($query) {
$globalKeyword = $this->setupKeyword($this->request->keyword());
Method fieldset
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function fieldset()
{
return $this->grid->fieldset('user-fieldset', function (Fieldset $fieldset) {
$fieldset->control('input:text', 'email')
Method mailer
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function mailer($model)
{
return $this->grid->fieldset(trans('antares/foundation::label.settings.mail'), function (Fieldset $fieldset) use ($model) {
$fieldset->legend('Mail configuration');
Function schedule
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function schedule(Schedule $schedule)
{
if (!extension_active('automation')) {
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 ordering
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function ordering()
{
if ($this->orderCallback) {
call_user_func($this->orderCallback, $this->getQueryBuilder());
- 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 form
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function form(array $configuration = array())
{
Event::fire('antares.forms', 'commands.' . $this->name);
Method getFilters
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFilters()
{
$str = new Twig_SimpleFilter(
'str_*', function ($name) {
$arguments = array_slice(func_get_args(), 1);
Function attachRules
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function attachRules(&$grid, array $rules = null)
{
$fieldsets = $grid->fieldsets();
if (!empty(Input::get('ajax')) && Request::ajax() && !is_null($key = Input::get('key'))) {
- 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 up
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
$this->down();
Schema::create('tbl_widgets', function(Blueprint $table) {
$table->increments('id');
Method prepareToSave
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function prepareToSave($classname, array $params = [], array $paramsFromSession = null)
{
$column = $params['column'];
$return = [];
if (is_null($paramsFromSession)) {
Function setValueOptions
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function setValueOptions($options): SelectType
{
if (is_array($options) || $options instanceof \Traversable) {
foreach ($options as $key => $value) {
if (!$value instanceof Option) {
- 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 customfieldsByFieldset
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function customfieldsByFieldset($grid, $name)
{
if (!extension_active('customfields')) {
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
Function resolveUIComponentNamespace
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function resolveUIComponentNamespace($src, $i = 0)
{
$tokens = token_get_all($src);
$count = count($tokens);
$namespace = '';
- 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 setValueOptions
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function setValueOptions($options): MultiCheckboxType
{
if (is_array($options) || $options instanceof \Traversable) {
foreach ($options as $key => $value) {
if (!$value instanceof Option) {
- 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"