We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a7de9f commit d676eadCopy full SHA for d676ead
1 file changed
src/Traits/MiddlewareNameWithArgumentsTrait.php
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of Chevere.
5
+ *
6
+ * (c) Rodolfo Berrios <rodolfo@chevere.org>
7
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
12
+declare(strict_types=1);
13
14
+namespace Chevere\Http\Traits;
15
16
+use Chevere\Http\Interfaces\MiddlewareNameInterface;
17
+use Chevere\Http\MiddlewareName;
18
19
+trait MiddlewareNameWithArgumentsTrait
20
+{
21
+ public static function middlewareName(mixed ...$arguments): MiddlewareNameInterface
22
+ {
23
+ return new MiddlewareName(static::class, ...$arguments); // @phpstan-ignore-line
24
+ }
25
+}
0 commit comments