From 03ead7d4f50b604353752a627bd3cbe8f591d9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Tue, 26 Mar 2024 14:17:33 +0100 Subject: [PATCH] better phpstan fix --- src/Card.php | 2 +- src/CardTable.php | 2 +- src/Form.php | 2 +- src/Form/AbstractLayout.php | 2 +- src/View.php | 4 ++-- src/VueComponent/InlineEdit.php | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Card.php b/src/Card.php index b7a9df84cb..a66503ca81 100644 --- a/src/Card.php +++ b/src/Card.php @@ -28,7 +28,7 @@ * will have it's idField set as data-id HTML attribute for the card. Thus making * the ID available via javascript (new Jquery())->data('id') * - * @property false|null $model use $entity property instead TODO remove null once https://github.com/phpstan/phpstan/issues/10787 is fixed + * @property false $model use $entity property instead */ class Card extends View { diff --git a/src/CardTable.php b/src/CardTable.php index 55d95ead2f..c5e3a5d49f 100644 --- a/src/CardTable.php +++ b/src/CardTable.php @@ -12,7 +12,7 @@ * IMPORTANT: Although the purpose of the "Card" component will remain the same, we do plan to * improve implementation of a card to to use https://fomantic-ui.com/views/card.html . * - * @property false|null $model use $entity property instead TODO remove null once https://github.com/phpstan/phpstan/issues/10787 is fixed + * @property false $model use $entity property instead */ class CardTable extends Table { diff --git a/src/Form.php b/src/Form.php index fd4b095d02..392a705e5c 100644 --- a/src/Form.php +++ b/src/Form.php @@ -21,7 +21,7 @@ use Atk4\Ui\Js\JsExpressionable; /** - * @property false|null $model use $entity property instead TODO remove null once https://github.com/phpstan/phpstan/issues/10787 is fixed + * @property false $model use $entity property instead */ class Form extends View { diff --git a/src/Form/AbstractLayout.php b/src/Form/AbstractLayout.php index 6daa2ed989..2f15bac45c 100644 --- a/src/Form/AbstractLayout.php +++ b/src/Form/AbstractLayout.php @@ -16,7 +16,7 @@ /** * Custom Layout for a form. * - * @property false|null $model use $entity property instead TODO remove null once https://github.com/phpstan/phpstan/issues/10787 is fixed + * @property false $model use $entity property instead */ abstract class AbstractLayout extends View { diff --git a/src/View.php b/src/View.php index 33a6c2c5a3..852a3a961f 100644 --- a/src/View.php +++ b/src/View.php @@ -111,7 +111,7 @@ public function __construct($label = []) * Do not try to create your own "Model" implementation, instead you must be looking for * your own "Persistence" implementation. * - * @phpstan-assert !null $this->model + * @XXXphpstan-assert !null $this->model TODO enable once https://github.com/phpstan/phpstan/issues/10787 is fixed */ public function setModel(Model $model): void { @@ -137,7 +137,7 @@ public function setModel(Model $model): void * * @param array $fields Limit model to particular fields * - * @phpstan-assert !null $this->model + * @phpstan-assert !null $this->model TODO enable once https://github.com/phpstan/phpstan/issues/10787 is fixed */ public function setSource(array $data, $fields = null): Model { diff --git a/src/VueComponent/InlineEdit.php b/src/VueComponent/InlineEdit.php index b00d2d36a3..a8a0273472 100644 --- a/src/VueComponent/InlineEdit.php +++ b/src/VueComponent/InlineEdit.php @@ -14,7 +14,7 @@ /** * A Simple inline editable text Vue component. * - * @property false|null $model use $entity property instead TODO remove null once https://github.com/phpstan/phpstan/issues/10787 is fixed + * @property false $model use $entity property instead */ class InlineEdit extends View {