From f2659181ebea2f9ef46bf330ccc61b4c3a6e774e Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Thu, 31 Aug 2023 09:24:26 +1000 Subject: [PATCH] Rename to match framework --- src/Middleware/EnsureFeaturesAreActive.php | 2 +- tests/Feature/FeatureMiddlewareTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Middleware/EnsureFeaturesAreActive.php b/src/Middleware/EnsureFeaturesAreActive.php index 617be4f..62f70ab 100644 --- a/src/Middleware/EnsureFeaturesAreActive.php +++ b/src/Middleware/EnsureFeaturesAreActive.php @@ -29,7 +29,7 @@ public function handle(Request $request, Closure $next, string ...$features): mi /** * Specify the features for the middleware. */ - public static function all(string ...$features): string + public static function using(string ...$features): string { return static::class.':'.implode(',', $features); } diff --git a/tests/Feature/FeatureMiddlewareTest.php b/tests/Feature/FeatureMiddlewareTest.php index 3b76647..29dbb7c 100644 --- a/tests/Feature/FeatureMiddlewareTest.php +++ b/tests/Feature/FeatureMiddlewareTest.php @@ -102,7 +102,7 @@ public function test_middleware_string_can_be_returned(): void { $this->assertEquals( 'Laravel\Pennant\Middleware\EnsureFeaturesAreActive:test,another', - EnsureFeaturesAreActive::all('test', 'another'), + EnsureFeaturesAreActive::using('test', 'another'), ); }