From c6909e946055d008bd13ce6fb33ff331579254f5 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Thu, 5 Sep 2024 13:01:39 +0200 Subject: [PATCH] static --- README.md | 4 ++-- src/IntRange.php | 4 ++-- tests/UpToADozen.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 32ac463..90dd7d6 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,12 @@ use MLL\GraphQLScalars\IntRange; final class UpToADozen extends IntRange { - protected function min(): int + protected static function min(): int { return 1; } - protected function max(): int + protected static function max(): int { return 12; } diff --git a/src/IntRange.php b/src/IntRange.php index 56bd50c..02560b6 100644 --- a/src/IntRange.php +++ b/src/IntRange.php @@ -12,10 +12,10 @@ abstract class IntRange extends ScalarType { /** The minimum allowed value. */ - abstract protected function min(): int; + abstract protected static function min(): int; /** The maximum allowed value. */ - abstract protected function max(): int; + abstract protected static function max(): int; public function serialize($value) { diff --git a/tests/UpToADozen.php b/tests/UpToADozen.php index 9eb3232..2f20cd2 100644 --- a/tests/UpToADozen.php +++ b/tests/UpToADozen.php @@ -6,12 +6,12 @@ final class UpToADozen extends IntRange { - protected function min(): int + protected static function min(): int { return 1; } - protected function max(): int + protected static function max(): int { return 12; }