diff --git a/Config/SettingsInterface.php b/Config/SettingsInterface.php index d5c66caad..5dcbc046f 100755 --- a/Config/SettingsInterface.php +++ b/Config/SettingsInterface.php @@ -56,8 +56,8 @@ interface SettingsInterface extends OptionsInterface /** * Set option by key. * - * @param array $options Column values for filtering - * @param bool $store Save this Setting immediately to database + * @param array $options Column values for filtering + * @param bool $store Save this Setting immediately to database * * @return void * @@ -68,7 +68,7 @@ interface SettingsInterface extends OptionsInterface /** * Save options. * - * @param array $options Options to save + * @param array $options Options to save * * @return void * diff --git a/DataStorage/Database/Mapper/ReadMapper.php b/DataStorage/Database/Mapper/ReadMapper.php index caef030fc..1853796ab 100755 --- a/DataStorage/Database/Mapper/ReadMapper.php +++ b/DataStorage/Database/Mapper/ReadMapper.php @@ -226,7 +226,7 @@ final class ReadMapper extends DataMapperAbstract return $this->executeGet(...$options); case MapperType::GET_YIELD: /** @var null|Builder ...$options */ - return $this->executeGetYield(...$options); + return $this->executeYield(...$options); case MapperType::GET_RAW: /** @var null|Builder ...$options */ return $this->executeGetRaw(...$options); @@ -312,9 +312,11 @@ final class ReadMapper extends DataMapperAbstract * Careful, this doesn't merge with the internal query. * If you want to merge it use ->query() instead * + * @return \Generator + * * @since 1.0.0 */ - public function executeGetYield(?Builder $query = null) + public function executeYield(?Builder $query = null) : \Generator { foreach ($this->executeGetRawYield($query) as $row) { $obj = $this->mapper::createBaseModel($row); @@ -421,7 +423,7 @@ final class ReadMapper extends DataMapperAbstract * Careful, this doesn't merge with the internal query. * If you want to merge it use ->query() instead * - * @return array + * @return R[] * * @since 1.0.0 */ diff --git a/Math/Optimization/Simplex.php b/Math/Optimization/Simplex.php index 88d06a93c..91d497f6d 100644 --- a/Math/Optimization/Simplex.php +++ b/Math/Optimization/Simplex.php @@ -381,7 +381,12 @@ final class Simplex return []; } - $this->n = \count(\reset($A)); + $first = \reset($A); + if ($first === false) { + return []; + } + + $this->n = \count($first); if ($this->initialize() === -1) { return [\array_fill(0, $this->m + $this->n, -2), \INF]; diff --git a/Module/ModuleAbstract.php b/Module/ModuleAbstract.php index a32f9092b..f53e7f75a 100755 --- a/Module/ModuleAbstract.php +++ b/Module/ModuleAbstract.php @@ -131,6 +131,7 @@ abstract class ModuleAbstract if (self::$auditor === null && static::ID !== 1006200000) { /** @phpstan-ignore-next-line */ self::$auditor = $this->app->moduleManager?->get('Auditor', 'Api'); + /** @phpstan-ignore-next-line */ self::$auditor = self::$auditor === null || self::$auditor::ID === 0 ? null : self::$auditor; } } diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index 155225193..d272f01b7 100755 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -247,7 +247,7 @@ class Markdown /** * Block special characters * - * @var array + * @var array * @since 1.0.0 */ protected array $blockTypes = [ @@ -3634,7 +3634,7 @@ class Markdown ], ]; - \uasort($this->definitionData['Footnote'], ['self', 'sortFootnotes']); + \uasort($this->definitionData['Footnote'], [self::class, 'sortFootnotes']); foreach ($this->definitionData['Footnote'] as $definitionId => $definitionData) { if (!isset($definitionData['number'])) {