File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -121,19 +121,12 @@ public function verify(Request|string $uri): void
121121 $ uri = self ::normalize ($ uri );
122122 $ status = $ this ->doVerify ($ uri );
123123
124- if (self ::STATUS_VALID === $ status ) {
125- return ;
126- }
127-
128- if (self ::STATUS_MISSING === $ status ) {
129- throw new UnsignedUriException ();
130- }
131-
132- if (self ::STATUS_INVALID === $ status ) {
133- throw new UnverifiedSignedUriException ();
134- }
135-
136- throw new ExpiredSignedUriException ();
124+ match ($ status ) {
125+ self ::STATUS_VALID => null ,
126+ self ::STATUS_INVALID => throw new UnverifiedSignedUriException (),
127+ self ::STATUS_EXPIRED => throw new ExpiredSignedUriException (),
128+ default => throw new UnsignedUriException (),
129+ };
137130 }
138131
139132 private function computeHash (string $ uri ): string
You can’t perform that action at this time.
0 commit comments