Fixed further inspection issues

This commit is contained in:
Jan Böhmer 2024-03-03 20:33:24 +01:00
parent 33e36f3d2b
commit 87533b6031
37 changed files with 46 additions and 71 deletions

View file

@ -75,6 +75,7 @@ class ConsoleEnsureWebserverUserListener
}
}
/** @noinspection PhpUndefinedFunctionInspection */
private function isRunningAsRoot(): bool
{
//If we are on windows, we can't run as root
@ -96,6 +97,7 @@ class ConsoleEnsureWebserverUserListener
* Determines the username of the user who started the current script if possible.
* Returns null if the username could not be determined.
* @return string|null
* @noinspection PhpUndefinedFunctionInspection
*/
private function getRunningUser(): ?string
{
@ -126,6 +128,7 @@ class ConsoleEnsureWebserverUserListener
if (PHP_OS_FAMILY === 'Windows') {
//If we have the COM extension available, we can use it to determine the owner
if (extension_loaded('com_dotnet')) {
/** @noinspection PhpUndefinedClassInspection */
$su = new \COM("ADsSecurityUtility"); // Call interface
//@phpstan-ignore-next-line
$securityInfo = $su->GetSecurityDescriptor($path_to_check, 1, 1); // Call method