mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
phpstan fixes
This commit is contained in:
parent
8221d4b723
commit
ac0503c6e9
|
|
@ -68,13 +68,14 @@ final class EventManager implements \Countable
|
|||
{
|
||||
$this->dispatcher = $dispatcher ?? new class() implements DispatcherInterface {
|
||||
/**
|
||||
* Dispatches a function
|
||||
*
|
||||
* @param \Closure $func Function
|
||||
* @param mixed ...$data Date passed to function
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function dispatch(\Closure $func, ...$data) : array
|
||||
public function dispatch($func, ...$data) : array
|
||||
{
|
||||
if (!($func instanceof \Closure)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$func(...$data);
|
||||
|
||||
return [];
|
||||
|
|
|
|||
|
|
@ -170,6 +170,10 @@ class Localization
|
|||
|
||||
$files = \glob(__DIR__ . '/../Localization/Defaults/Definitions/' . $langCode . '_' . $countryCode);
|
||||
|
||||
if ($files === false) {
|
||||
$files = [];
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
$fileContent = \file_get_contents($file);
|
||||
|
||||
|
|
|
|||
|
|
@ -236,13 +236,12 @@ final class MeasureOfDispersion
|
|||
--$count;
|
||||
}
|
||||
|
||||
/** @var int $count */
|
||||
$count /= 2;
|
||||
|
||||
\sort($x);
|
||||
|
||||
/** @var int $count */
|
||||
$Q1 = Average::median(\array_slice($x, 0, $count));
|
||||
/** @var int $count */
|
||||
$Q3 = Average::median(\array_slice($x, -$count, $count));
|
||||
|
||||
return $Q3 - $Q1;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ abstract class HeaderAbstract
|
|||
/**
|
||||
* Localization.
|
||||
*
|
||||
* @var null|Localization
|
||||
* @var Localization
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected ?Localization $l11n = null;
|
||||
protected Localization $l11n;
|
||||
|
||||
/**
|
||||
* Account.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user