Compare commits

...

2 Commits

Author SHA1 Message Date
Dominique FOURNIER
57cc0b261a phpstan for all 2023-04-13 14:36:03 +02:00
Dominique FOURNIER
660bef00a2 Class referenced with incorrect case 2023-04-13 14:28:49 +02:00
7 changed files with 12 additions and 11 deletions

View File

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

View File

@@ -1468,7 +1468,7 @@ class Authzgroups
"Wanted group not found" "Wanted group not found"
), 404); ), 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 /** 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" "Wanted group not found"
), 404); ), 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 /** Return an array with all the available rights for a module and a group

View File

@@ -51,7 +51,7 @@ class Daemon
*/ */
public function start($name, $callable, $params = array()) public function start($name, $callable, $params = array())
{ {
$file = new file(); $file = new File();
if (! $file->is_writeable($this->runDir)) { if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf( throw new \Exception(sprintf(
"Run Directory '%s' is not writeable", "Run Directory '%s' is not writeable",
@@ -73,7 +73,7 @@ class Daemon
), 500); ), 500);
} }
} }
$fork = new fork(); $fork = new Fork();
$pid = $fork->startDetachedChild($name, $callable, $params); $pid = $fork->startDetachedChild($name, $callable, $params);
file_put_contents($this->runDir . "/$name.pid", $pid); file_put_contents($this->runDir . "/$name.pid", $pid);
return $pid; return $pid;
@@ -89,7 +89,7 @@ class Daemon
*/ */
public function stop($name, $maxWaitStop = 3, $maxWaitKill = 3) public function stop($name, $maxWaitStop = 3, $maxWaitKill = 3)
{ {
$file = new file(); $file = new File();
if (! $file->is_writeable($this->runDir)) { if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf( throw new \Exception(sprintf(
"Run Directory '%s' is not writeable", "Run Directory '%s' is not writeable",
@@ -149,7 +149,7 @@ class Daemon
*/ */
public function status($name) public function status($name)
{ {
$file = new file(); $file = new File();
if (! $file->is_writeable($this->runDir)) { if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf( throw new \Exception(sprintf(
"Run Directory '%s' is not writeable", "Run Directory '%s' is not writeable",
@@ -179,7 +179,7 @@ class Daemon
*/ */
public function reload($name) public function reload($name)
{ {
$file = new file(); $file = new File();
if (! $file->is_writeable($this->runDir)) { if (! $file->is_writeable($this->runDir)) {
throw new \Exception(sprintf( throw new \Exception(sprintf(
"Run Directory '%s' is not writeable", "Run Directory '%s' is not writeable",

View File

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

View File

@@ -197,7 +197,7 @@ class GraphStyleLinePoints
$this->pointShape = $this->allowedShapes[ $this->pointShape = $this->allowedShapes[
($number % count($this->allowedShapes))]; ($number % count($this->allowedShapes))];
} }
$palette = graphPalette::getPalette($this->palette); $palette = GraphPalette::getPalette($this->palette);
if ($this->pointBgcolor === null) { if ($this->pointBgcolor === null) {
$this->pointBgcolor = $palette[($number % count($palette))]["bgcolor"]; $this->pointBgcolor = $palette[($number % count($palette))]["bgcolor"];
} }

View File

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