Showing 331 of 503 total issues
Method injector
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static function injector($type, $ngModel, $label, $options = [], array $mergeOptions = [])
Method generateModelContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function generateModelContent($fileNamepsace, $className, $apiEndpoint, TableSchema $schema, $i18nFields)
Method itemRoute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function itemRoute($name, $route, $icon, $searchModelClass = null, array $options = [])
Method lock
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function lock($userId, $table, $pk, $translation, array $translationArgs = [])
Method sendArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private function sendArray($refresh, array $errors = [], $enterSecureToken = false, $message = null, $enterTwoFaToken = false)
Function getDataInstance
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static function getDataInstance(ActiveQuery $query)
{
$class = $query->modelClass;
$keys = [$class];
- 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 actionRelationCall
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function actionRelationCall($arrayIndex, $id, $modelClass, $query = null)
{
$modelClass = base64_decode($modelClass);
if (!class_exists($modelClass)) {
- 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 processThumbnails
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function processThumbnails()
{
foreach ($this->findFiles(['is_hidden' => false, 'is_deleted' => false]) as $file) {
if ($file->isImage) {
// create tiny thumbnail
- 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 renderElementPlugins
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function renderElementPlugins($configContext, $typeConfig, $uniqueId, $attribute, $ngRestModel, $label, $elmni18n)
{
$args = $typeConfig['args'];
$args['renderContext'] = $this;
$obj = NgRest::createPluginObject($typeConfig['class'], $attribute, $label, $elmni18n, $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 onFinish
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function onFinish()
{
foreach ($this->getPrimaryKey() as $pk) {
if (!$this->hasField('list', $pk)) {
$alias = $pk;
- 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 ngRestConfigButtonCondition
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function ngRestConfigButtonCondition($arrayConfig)
{
if (!isset($arrayConfig[2]) || !isset($arrayConfig[2]['buttonCondition'])) {
$buttonCondition = '';
} elseif (is_string($arrayConfig[2]['buttonCondition'])) {
- 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 syncDataInternal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function syncDataInternal()
{
Console::startProgress(0, $this->getOffsetTotal(), 'Fetch: ' . $this->getName() . ' ');
$this->_contentRowsCount = 0;
- 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 getAvailableApiEndpoints
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getAvailableApiEndpoints()
{
$data = [];
$generic = [];
$userId = $this->model->id;
- 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 actionAsyncToken
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function actionAsyncToken()
{
if (($lockout = $this->sessionBruteForceLock(Yii::$app->session->get('secureId')))) {
return $this->sendArray(false, [Module::t('login_async_submission_limit_reached', ['time' => Yii::$app->formatter->asRelativeTime($lockout)])]);
}
- 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 isActionAllowed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isActionAllowed($action)
{
if ($this->isActionAuthOptional($action)) {
return true;
}
- 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 actionIndex
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function actionIndex($identifier, $token)
{
$machine = ProxyMachine::findOne(['identifier' => $identifier, 'is_deleted' => false]);
if (!$machine) {
- 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 actionSessionUpdate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function actionSessionUpdate()
{
$identity = Yii::$app->adminuser->identity;
$user = clone Yii::$app->adminuser->identity;
$user->attributes = Yii::$app->request->bodyParams;
- 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 getItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getItems()
{
if ($this->_items !== null) {
return $this->_items;
}
- 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 beforeAction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function beforeAction($action)
{
if (parent::beforeAction($action)) {
if ($this->isActionAuthOptional($action->id)) {
return true;
- 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 actionPasswordReset
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function actionPasswordReset($token, $id)
{
if (!$this->module->resetPassword) {
throw new ForbiddenHttpException();
}
- 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"