Skip to content

Commit 621dc79

Browse files
committed
Refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <[email protected]>
1 parent 5640246 commit 621dc79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/public/AppFramework/AuthPublicShareController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ final public function getAuthenticationRedirect(string $redirect): RedirectRespo
216216
private function getRoute(string $function): string {
217217
$app = strtolower($this->appName);
218218
$class = (new \ReflectionClass($this))->getShortName();
219-
if (substr($class, -10) === 'Controller') {
219+
if (str_ends_with($class, 'Controller')) {
220220
$class = substr($class, 0, -10);
221221
}
222222
return $app .'.'. $class .'.'. $function;

0 commit comments

Comments
 (0)