Showing 331 of 503 total issues
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'فارسی',
'button_save' => 'ذخیره',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => '中文',
'button_save' => '保存',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'ภาษาไทย',
'button_save' => 'บันทึก',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'Bahasa',
'button_save' => 'Simpan',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'Italiano',
'button_save' => 'Salva',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'Polski',
'button_save' => 'Zapisz',
File admin.php
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'Türkçe',
'button_save' => 'Kaydet',
File admin.php
has 506 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
'language_name' => 'Español',
'button_save' => 'Guardar',
File Api.php
has 505 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace luya\admin\ngrest\base;
use luya\admin\base\RestActiveController;
File _angulardirectives.php
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
use luya\admin\Module as Admin;
?>
<div class="loading-overlay" ng-if="LuyaLoading.getState()">
Function getModules
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getModules()
{
if ($this->_modules !== null) {
return $this->_modules;
}
- 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
NgRestModel
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class NgRestModel extends ActiveRecord implements GenericSearchInterface, NgRestModelInterface
{
/**
* @var string This event will be trigger after the find population of each row when ngrest loads the data from the server to edit data. (When click on edit icon)
*/
File NgRestModel.php
has 454 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace luya\admin\ngrest\base;
use luya\admin\base\GenericSearchInterface;
File main.php
has 446 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
use luya\admin\Module as Admin;
use luya\helpers\Url;
$user = Yii::$app->adminuser->getIdentity();
Function getModuleItems
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
Open
public function getModuleItems($nodeId)
{
if (isset($this->_nodeItems[$nodeId])) {
return $this->_nodeItems[$nodeId];
}
- 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
Config
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Config extends BaseObject implements ConfigInterface
{
private $_model;
/**
File BaseFileSystemStorage.php
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace luya\admin\storage;
use luya\admin\events\FileEvent;
File RenderCrud.php
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace luya\admin\ngrest\render;
use luya\admin\components\Auth;
Function observeLogin
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var observeLogin = function (form, url, secureUrl, twoFaUrl) {
$(form).submit(function (e) {
$('#errorsContainer').hide();
$('.login-btn[type="submit"]').attr('disabled', true);
RenderCrud
has 41 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class RenderCrud extends Render implements ViewContextInterface, RenderCrudInterface
{
public const TYPE_LIST = 'list';
public const TYPE_CREATE = 'create';