';
}
/**
* Checks if the provided path is authorized by ensuring it is within the current working directory.
*
* This method resolves the absolute path of the given directory and compares it with the
* current working directory (getcwd()). If the path is not within the current working directory,
* it is considered unauthorized.
*
* @param string $path The directory path to be validated.
*
* @return bool Returns true if the path is authorized, false otherwise.
*/
static function isPathAuthorized(string $path): bool {
if (!str_contains(realpath($path), getcwd())) {
return false;
}
return true;
}
}