Some minor fixes in Progress, FileUploader for phpstan level 9
This commit is contained in:
@@ -242,6 +242,7 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
private $int_pk_name; // primary key, only internal usage
|
||||
/** @var array<mixed> */
|
||||
public $reference_array = []; // reference arrays -> stored in $this->reference_array[$table_name] => [];
|
||||
// NOTE: should be changed to this @var mixed[]
|
||||
/** @var array<mixed> */
|
||||
public $element_list; // element list for elements next to each other as a special sub group
|
||||
/** @var array<mixed> */
|
||||
@@ -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
|
||||
|
||||
@@ -28,7 +28,7 @@ class ProgressBar
|
||||
public $status = 'new'; // current status (new,show,hide)
|
||||
/** @var float|int */
|
||||
public $step = 0; // current step
|
||||
/** @var array<string,?int> */
|
||||
/** @var array<string,null|int|float> */
|
||||
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<string,mixed> */
|
||||
/** @var array<string,string|bool|int> */
|
||||
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<mixed> */
|
||||
/** @#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<mixed> bar position as array
|
||||
* @return array<string,int|float> bar position as array
|
||||
*/
|
||||
private function __calculatePosition(float $step): array
|
||||
{
|
||||
|
||||
@@ -21,12 +21,12 @@ class qqFileUploader // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param array<mixed> $allowedExtensions
|
||||
* @param array<string> $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;
|
||||
|
||||
Reference in New Issue
Block a user