more code fixes

This commit is contained in:
Dennis Eichhorn 2024-03-15 21:57:48 +00:00
parent 642b74ad22
commit 48c5164e12
5 changed files with 17 additions and 9 deletions

View File

@ -56,8 +56,8 @@ interface SettingsInterface extends OptionsInterface
/**
* Set option by key.
*
* @param array<int, array{id?:?int, name?:?string, content:string, module?:?string, group?:?int, account?:?int}> $options Column values for filtering
* @param bool $store Save this Setting immediately to database
* @param array<int, mixed> $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<int, array{id?:?int, name?:?string, content:string, module?:?string, group?:?int, account?:?int}> $options Options to save
* @param array<int, mixed> $options Options to save
*
* @return void
*

View File

@ -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<R>
*
* @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
*/

View File

@ -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];

View File

@ -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;
}
}

View File

@ -247,7 +247,7 @@ class Markdown
/**
* Block special characters
*
* @var array<string, string[]>
* @var array<int|string, string[]>
* @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'])) {