Skip to content

Commit

Permalink
add phpdoc getSignedInClient
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed May 22, 2024
1 parent ca30ae9 commit 60b0f1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ private function getLibrariesTags(array $required_libraries): string
return $script_str;
}

/**
* @return Client|null Client account of currently logged-in user. Null if no one is logged in.
*/
private function getSignedInClient(): ?Client
{
// $_SESSION['user'] was set to the client email on login
// if it is empty, no one is logged in
if (empty($_SESSION['user'])) {
return null;
}
Expand Down

0 comments on commit 60b0f1f

Please sign in to comment.