summaryrefslogtreecommitdiff
path: root/src/Attribute/Patch.php
diff options
context:
space:
mode:
authorBrett Parson <brett@brett-parson.com>2026-08-21 13:55:37 -0500
committerBrett Parson <brett@brett-parson.com>2026-08-21 14:00:11 -0500
commitd039a5d62a9ac6ababae70d9d96422ca59f2b2d4 (patch)
treef0db4750a571e8040a5da02cc7190079c0d62914 /src/Attribute/Patch.php
parent0de77a6334cee1f6e15f7e0fd35602514560be33 (diff)
downloadminiroute-d039a5d62a9ac6ababae70d9d96422ca59f2b2d4.tar.gz
miniroute-d039a5d62a9ac6ababae70d9d96422ca59f2b2d4.zip
Scaffold miniroute routing/middleware kernel
Diffstat (limited to 'src/Attribute/Patch.php')
-rw-r--r--src/Attribute/Patch.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Attribute/Patch.php b/src/Attribute/Patch.php
new file mode 100644
index 0000000..8402398
--- /dev/null
+++ b/src/Attribute/Patch.php
@@ -0,0 +1,25 @@
+<?php
+
+declare(strict_types=1);
+
+namespace BrettParson\MiniRoute\Attribute;
+
+use Attribute;
+
+#[Attribute(Attribute::TARGET_METHOD)]
+final class Patch implements RouteAttribute
+{
+ public function __construct(public readonly string $path)
+ {
+ }
+
+ public function method(): string
+ {
+ return 'PATCH';
+ }
+
+ public function path(): string
+ {
+ return $this->path;
+ }
+}