Enhance department pricing functionality and improve related tests
This commit is contained in:
@@ -55,6 +55,7 @@ trait route_t
|
||||
} catch (Exception $e) {
|
||||
$response->error($e->getMessage(), 400);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -486,7 +487,7 @@ trait route_t
|
||||
* @param string|permission_node $permission
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPermission(string|permission_node $permission, int $customer_number = null): bool
|
||||
public function hasPermission(string|permission_node $permission, ?int $customer_number = null): bool
|
||||
{
|
||||
return $this->evaluatePermission($permission, $customer_number, false);
|
||||
}
|
||||
@@ -611,7 +612,7 @@ trait route_t
|
||||
* @param string|null $parameter The name of the parameter
|
||||
* @return void
|
||||
*/
|
||||
public function requireParameterIntPositive(int $value, string $parameter = null): void
|
||||
public function requireParameterIntPositive(int $value, ?string $parameter = null): void
|
||||
{
|
||||
global $response;
|
||||
if ($value <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user