Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: refactor "substr" calls to improve code readability
Signed-off-by: Hamid Dehnavi <[email protected]>
  • Loading branch information
shdehnavi authored and skjnldsv committed Aug 6, 2024
commit f19f8fd8c0465f0cb679236d83243c87cf384ae8
2 changes: 1 addition & 1 deletion lib/public/AppFramework/AuthPublicShareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ final public function getAuthenticationRedirect(string $redirect): RedirectRespo
private function getRoute(string $function): string {
$app = strtolower($this->appName);
$class = (new \ReflectionClass($this))->getShortName();
if (substr($class, -10) === 'Controller') {
if (str_ends_with($class, 'Controller')) {
$class = substr($class, 0, -10);
}
return $app .'.'. $class .'.'. $function;
Expand Down