luyadev/luya-module-admin

View on GitHub

Showing 503 of 503 total issues

Function getPathsFromUrlRules has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

protected function getPathsFromUrlRules()
{
foreach ($this->getUrlRules() as $controllerName => $config) {
foreach ($config as $item) {
foreach ($item['rules'] as $patternRoute => $ruleConfig) {
Severity: Minor
Found in src/openapi/Generator.php - About 25 mins to fix

Function getResponseContent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

protected function getResponseContent()
{
$modelClass = $this->extractModelClassFromObject($this->getActionObject());
 
if ($modelClass) {
Severity: Minor
Found in src/openapi/specs/BaseSpecs.php - About 25 mins to fix

Function uploadToFiles has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

public function uploadToFiles($model, $attribute)
{
$files = $this->multiple ? UploadedFile::getInstances($model, $attribute) : UploadedFile::getInstance($model, $attribute);
 
$contextModel = new DynamicModel(['file' => $files]);
Severity: Minor
Found in src/validators/StorageUploadValidator.php - About 25 mins to fix
Severity
Category
Status
Source
Language