diff --git a/plugins/manager/lib/yform/manager/dataset.php b/plugins/manager/lib/yform/manager/dataset.php index 7ae3907c..aa016645 100644 --- a/plugins/manager/lib/yform/manager/dataset.php +++ b/plugins/manager/lib/yform/manager/dataset.php @@ -59,6 +59,7 @@ public static function create(?string $table = null): self return $dataset; } + /** @return null|static */ public static function get(int $id, ?string $table = null): ?self { if ($id <= 0) { @@ -81,6 +82,7 @@ public static function get(int $id, ?string $table = null): ?self /** * @throws rex_exception if dataset does not exist + * @return static */ public static function require(int $id, ?string $table = null): self { @@ -96,7 +98,7 @@ public static function require(int $id, ?string $table = null): self } /** - * @return static|rex_yform_manager_dataset + * @return static */ public static function getRaw(int $id, ?string $table = null): self { @@ -147,7 +149,7 @@ public static function query(?string $table = null): rex_yform_manager_query } /** - * @return null|static|rex_yform_manager_dataset + * @return null|static */ public static function queryOne(string $query, array $params = [], ?string $table = null): ?self { @@ -177,7 +179,7 @@ public static function queryOne(string $query, array $params = [], ?string $tabl } /** - * @return rex_yform_manager_collection|rex_yform_manager_collection + * @return rex_yform_manager_collection */ public static function queryCollection(string $query, array $params = [], ?string $table = null): rex_yform_manager_collection { @@ -212,11 +214,11 @@ public static function setModelClass(string $table, string $modelClass): void } /** - * @return null|class-string + * @return null|class-string */ public static function getModelClass(string $table): ?string { - return self::$tableToModel[$table] ?? null; + return self::$tableToModel[$table] ?? null; // @phpstan-ignore-line } public function getTableName(): string @@ -257,6 +259,7 @@ public function hasValue(string $key): bool } /** + * @param mixed $value * @return $this */ public function setValue(string $key, $value): self @@ -271,6 +274,9 @@ public function setValue(string $key, $value): self return $this; } + /** + * @return mixed + */ public function getValue(string $key) { if ('id' === $key) { @@ -649,11 +655,17 @@ public function __isset(string $key): bool return $this->hasValue($key); } + /** + * @return mixed + */ public function __get(string $key) { return $this->getValue($key); } + /** + * @param mixed $value + */ public function __set(string $key, $value): void { $this->setValue($key, $value);