Part on Refactoring Section3 finished

This commit is contained in:
Patryk Hegenberg 2022-12-18 21:05:09 +01:00
parent 594b8a64fa
commit 672ef6a949
5 changed files with 41 additions and 24 deletions

View file

@ -8,4 +8,10 @@
}
function urlIs($value) {
return $_SERVER['REQUEST_URI'] === $value;
}
function authorize($condition) {
if (! $condition) {
abort(Response::FORBIDDEN);
}
}