phpstan for all

This commit is contained in:
2023-04-13 14:36:03 +02:00
parent 660bef00a2
commit 57cc0b261a
6 changed files with 8 additions and 7 deletions

View File

@@ -33,9 +33,10 @@ class Authorization
/** Return if the user right is NONE, READ, WRITE, EXECUTE
if the object doesn't exists, or is not readable, throw an exception
@param string $object The object path to examine
@return NONE, READ, WRITE, EXECUTE */
@return string NONE, READ, WRITE, EXECUTE */
public function validate($object)
{
return "NONE";
}
/** Add a new object, with owner and group, and mode bits

View File

@@ -1468,7 +1468,7 @@ class Authzgroups
"Wanted group not found"
), 404);
}
return $this->rightReadByGroupByID($module, $objects[0]["idgroup"]);
return $this->rightReadByGroupByID($module, $groups[0]["idgroup"]);
}
/** Return an array with all the available rights for a module and a group

View File

@@ -1676,7 +1676,7 @@ class Authzgroupsoo
"Wanted group not found"
), 404);
}
return $this->rightReadByGroupByID($module, $objects[0]["idgroup"]);
return $this->rightReadByGroupByID($module, $groups[0]["idgroup"]);
}
/** Return an array with all the available rights for a module and a group

View File

@@ -149,7 +149,7 @@ class Daemon
*/
public function status($name)
{
$file = new file();
$file = new File();
if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf(
"Run Directory '%s' is not writeable",
@@ -179,7 +179,7 @@ class Daemon
*/
public function reload($name)
{
$file = new file();
$file = new File();
if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf(
"Run Directory '%s' is not writeable",

View File

@@ -160,7 +160,7 @@ class Getopts
}
if (
! is_int($multiple) &&
\verify::staticIs_integer("$multiple") === false
Verify::staticIs_integer("$multiple") === false
) {
throw new \Exception("Multiple option must be an integer", 500);
}

View File

@@ -242,7 +242,7 @@ class Logger
// Display the backtrace if it is needed
if ($this->backtraceDisplay) {
$e = new Exception();
$e = new \Exception();
$msg .= "\n" . ($e->getTraceAsString());
}