diff --git a/www/lib/CoreLibs/Output/Form/Generate.php b/www/lib/CoreLibs/Output/Form/Generate.php index 83b54885..fd129a6c 100644 --- a/www/lib/CoreLibs/Output/Form/Generate.php +++ b/www/lib/CoreLibs/Output/Form/Generate.php @@ -242,6 +242,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO private $int_pk_name; // primary key, only internal usage /** @var array */ public $reference_array = []; // reference arrays -> stored in $this->reference_array[$table_name] => []; + // NOTE: should be changed to this @var mixed[] /** @var array */ public $element_list; // element list for elements next to each other as a special sub group /** @var array */ @@ -651,8 +652,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO if ( isset($this->security_level['delete']) && $this->base_acl_level >= $this->security_level['delete'] && - (!isset($this->table_array['protected']['value']) || - (isset($this->table_array['protected']['value']) && !$this->table_array['protected']['value'])) && + empty($this->table_array['protected']['value']) && !$this->error ) { if (!is_array($element_list)) { @@ -663,7 +663,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO // . is_array($this->element_list[$element_list[$i]]['read_data']) . ' | ' // . $this->element_list[$element_list[$i]]['delete']); // if prefix, set it - $prfx = ($this->element_list[$element_list[$i]]['prefix']) ? + $prfx = !empty($this->element_list[$element_list[$i]]['prefix']) ? $this->element_list[$element_list[$i]]['prefix'] . '_' : ''; // get the primary key diff --git a/www/lib/CoreLibs/Output/Progressbar.php b/www/lib/CoreLibs/Output/Progressbar.php index 7b4c1170..55c2df56 100644 --- a/www/lib/CoreLibs/Output/Progressbar.php +++ b/www/lib/CoreLibs/Output/Progressbar.php @@ -28,7 +28,7 @@ class ProgressBar public $status = 'new'; // current status (new,show,hide) /** @var float|int */ public $step = 0; // current step - /** @var array */ + /** @var array */ public $position = [ // current bar position 'left' => null, 'top' => null, @@ -72,7 +72,7 @@ class ProgressBar /** @var string */ public $direction = 'right'; // direction of motion (right,left,up,down) - /** @var array */ + /** @var array */ public $frame = ['show' => false]; // ProgressBar Frame /* 'show' => false, # frame show (true/false) 'left' => 200, # frame position from left @@ -84,7 +84,8 @@ class ProgressBar 'brd_color' => '#dfdfdf #404040 #404040 #dfdfdf' # frame border color */ - /** @var array */ + /** @#var array{string}{string: string|int} */ + /** @var mixed[][] */ public $label = []; // ProgressBar Labels /* 'name' => [ # label name 'type' => 'text', # label type (text,button,step,percent,crossbar) @@ -164,7 +165,7 @@ class ProgressBar /** * calculate position in bar step * @param float $step percent step to do - * @return array bar position as array + * @return array bar position as array */ private function __calculatePosition(float $step): array { diff --git a/www/lib/FileUpload/qqFileUploader.php b/www/lib/FileUpload/qqFileUploader.php index e2606d26..539e6adf 100755 --- a/www/lib/FileUpload/qqFileUploader.php +++ b/www/lib/FileUpload/qqFileUploader.php @@ -21,12 +21,12 @@ class qqFileUploader // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps /** * Undocumented function * - * @param array $allowedExtensions + * @param array $allowedExtensions * @param integer $sizeLimit */ public function __construct(array $allowedExtensions = [], int $sizeLimit = 10485760) { - $allowedExtensions = array_map("strtolower", $allowedExtensions); + $allowedExtensions = array_map('strtolower', $allowedExtensions); $this->allowedExtensions = $allowedExtensions; $this->sizeLimit = $sizeLimit;