This commit is contained in:
Yuri Kuznetsov
2021-11-04 17:14:41 +02:00
parent e9d7b92a6e
commit 0b3f3e67dd
7 changed files with 11 additions and 11 deletions

View File

@@ -59,7 +59,7 @@ use RuntimeException;
class Export
{
/**
* @var Params
* @var ?Params
*/
private $params;

View File

@@ -270,6 +270,8 @@ class Params
$defaultValues = (object) [];
}
/** @var object|scalar $defaultValues */
if (!is_object($defaultValues)) {
throw new TypeError();
}
@@ -329,10 +331,6 @@ class Params
$params = (object) [];
}
if (is_array($params) && is_object($params)) {
throw new TypeError();
}
$raw = (object) $params;
$obj = self::create()

View File

@@ -108,7 +108,7 @@ class Service
throw new Error("Contents is empty.");
}
/** @var ImportEntity $source */
/** @var ?ImportEntity $source */
$source = $this->entityManager->getEntity(ImportEntity::ENTITY_TYPE, $importParamsId);
if (!$source) {
@@ -129,7 +129,7 @@ class Service
public function importById(string $id, bool $startFromLastIndex = false, bool $forceResume = false): Result
{
/** @var ImportEntity $import */
/** @var ?ImportEntity $import */
$import = $this->entityManager->getEntity(ImportEntity::ENTITY_TYPE, $id);
if (!$import) {

View File

@@ -56,7 +56,7 @@ class Kanban
protected $orderDisabled = false;
/**
* @var SearchParams
* @var ?SearchParams
*/
protected $searchParams = null;

View File

@@ -386,7 +386,7 @@ class LeadCapture
public function confirmOptIn(string $id): stdClass
{
/** @var UniqueId $uniqueId */
/** @var ?UniqueId $uniqueId */
$uniqueId = $this->entityManager
->getRDBRepository('UniqueId')
->where([
@@ -448,7 +448,7 @@ class LeadCapture
public function sendOptInConfirmation(string $id)
{
/** @var UniqueId $uniqueId */
/** @var ?UniqueId $uniqueId */
$uniqueId = $this->entityManager
->getRDBRepository('UniqueId')
->where([

View File

@@ -129,7 +129,7 @@ class NoteMentionHookProcessor
foreach ($matchList as $item) {
$userName = substr($item, 1);
/** @var User $user */
/** @var ?User $user */
$user = $this->entityManager
->getRDBRepository(User::ENTITY_TYPE)
->where([

View File

@@ -96,6 +96,7 @@ class Tcpdf extends TcpdfOriginal
$html = str_replace('{pageAbsoluteNumber}', '{{:pnp:}}', $html);
}
/** @phpstan-ignore-next-line */
if ($this->isUnicodeFont()) {
$html = str_replace('{totalPageNumber}', '{{:ptp:}}', $html);
} else {
@@ -124,6 +125,7 @@ class Tcpdf extends TcpdfOriginal
$html = str_replace('{pageAbsoluteNumber}', '{{:pnp:}}', $html);
}
/** @phpstan-ignore-next-line */
if ($this->isUnicodeFont()) {
$html = str_replace('{totalPageNumber}', '{{:ptp:}}', $html);
} else {