Showing 265 of 306 total issues
Method build
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build(Grid &$grid)
{
$attributes = array_merge($this->attributes, $grid->ajaxable);
$inputs = [];
$fieldsets = $grid->fieldsets();
Method resolveFieldValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function resolveFieldValue($name, $row, Fluent $control)
{
if (ends_with($name, '[]')) {
$fieldnameInRequest = str_replace('[]', '', $name);
$oldRequest = $this->request->old($fieldnameInRequest);
Method verify
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function verify(array $items = [], $brandId = null)
{
$items = $this->clear($items);
$changed = [];
Method up
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up()
{
$this->down();
/**
Function setEngineInstance
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function setEngineInstance(&$engine)
{
$filters = array_get($engine->getColumnDef(), 'filter', []);
$values = $this->getSessionValue();
if (!$values) {
- 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 add
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function add($name, $source, $dependencies = [], $attributes = [], $replaces = [])
{
if (!is_null($from = array_get($attributes, 'from')) && !is_null($extension = extensions($from))) {
$extensions = app('antares.extension')->getAvailableExtensions();
$path = 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 publishAndPropagate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function publishAndPropagate(array $files = array(), $extension = null, $before = [])
{
$container = $this->assetFactory->container($this->position);
if (empty($files)) {
return $container;
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function build(Grid &$grid)
{
$attributes = array_merge($this->attributes, $grid->ajaxable);
$inputs = [];
$fieldsets = $grid->fieldsets();
- 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 run
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function run(OperationHandlerContract $handler, array $extensionsNames)
{
if (count($extensionsNames) === 0) {
return $handler->operationInfo(new Operation('No extensions to install. Skipping composer.'));
}
- 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 seed
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function seed($name, $paths = null)
{
$directories = is_null($paths) ? $this->getPaths($name, 'seeds') : $paths;
$files = $this->app->make('files');
- 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 getActionsColumn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getActionsColumn(Authorization $acl): Closure
{
return function(ExtensionContract $extension) use($acl) {
$buttons = [];
$name = $extension->getPackage()->getName();
- 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 loadRoutes
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function loadRoutes()
{
$path = $this->extensionPath;
$routes = [
- 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 initiate
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function initiate()
{
$items = [];
$memories = $this->cache instanceof Repository ? $this->getItemsFromCache() : $this->getItemsFromDatabase();
foreach ($memories as $key => $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
Method addMockConnection
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function addMockConnection(Model $model)
{
$resolver = m::mock('\Illuminate\Database\ConnectionResolverInterface');
$model->setConnectionResolver($resolver);
$connection = m::mock('\Illuminate\Database\Connection');
Method handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(GridContract $grid)
{
$runtime = Memory::make('runtime')->get('control');
if (is_null($runtime)) {
return false;
Method boot
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function boot()
{
$path = realpath(__DIR__ . '/../resources');
Method componentForced
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function componentForced()
{
$function = function ($name = null, array $params = []) {
if (is_null($name)) {
Method attachRules
has 26 lines of code (exceeds 25 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'))) {
Method getFunctions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFunctions()
{
$avatar = new Twig_SimpleFunction('avatar', function ($name, $type, $width = 40, $height = 40) {
return $this->show($name, $type, $width, $height);
});
Method detectUiComponents
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function detectUiComponents()
{
$components = [];
$factory = app('antares.extension');
$directories = [];