From f708e25caa0b9c3201bf5d628f8b5e95e0ced59f Mon Sep 17 00:00:00 2001 From: David Rans Date: Tue, 20 Aug 2024 11:58:03 -0700 Subject: [PATCH] Make magic methods explicit --- QueryGenerator.php | 24 +++++++++++++++++++++++- psalm-baseline.xml | 2 -- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/QueryGenerator.php b/QueryGenerator.php index 4776866..e983328 100644 --- a/QueryGenerator.php +++ b/QueryGenerator.php @@ -249,8 +249,30 @@ public function __construct( /** * Append the given clause components and parameters to their existing * counterparts for the specified clause. + * + * @method select(): self + * @method insert(): self + * @method replace(): self + * @method update(): self + * @method delete(): self + * @method from(): self + * @method join(): self + * @method set(): self + * @method columns(): self + * @method values(): self + * @method where(): self + * @method group(): self + * @method having(): self + * @method order(): self + * @method limit(): self + * @method offset(): self + * @method as(): self + * @method duplicate(): self + * @method modify(): self + * @method forupdate(): self + * @seal-methods */ - public function __call($method, $args) { + public function __call(string $method, array $args) { $method = strtolower($method); if (!isset(self::$methods[$method])) { diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 0d967d5..58a6043 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -2,8 +2,6 @@ - -