2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
ldestailleur
2025-09-11 12:25:22 +02:00
parent af74f2c057
commit 702d91c65d
16 changed files with 24 additions and 24 deletions

View File

@@ -250,7 +250,7 @@ class Interventions extends DolibarrApi
public function post($request_data = null)
{
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
throw new RestException(403, "Insuffisant rights");
throw new RestException(403, "Insufficiant rights");
}
// Check mandatory fields
$result = $this->_validate($request_data);
@@ -376,7 +376,7 @@ class Interventions extends DolibarrApi
public function postLine($id, $request_data = null)
{
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
throw new RestException(403, "Insuffisant rights");
throw new RestException(403, "Insufficiant rights");
}
// Check mandatory fields
$result = $this->_validateLine($request_data);
@@ -468,7 +468,7 @@ class Interventions extends DolibarrApi
public function reopen($id)
{
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
throw new RestException(403, "Insuffisant rights");
throw new RestException(403, "Insufficiant rights");
}
$result = $this->fichinter->fetch($id);
if (!$result) {
@@ -511,7 +511,7 @@ class Interventions extends DolibarrApi
public function validate($id, $notrigger = 0)
{
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
throw new RestException(403, "Insuffisant rights");
throw new RestException(403, "Insufficiant rights");
}
$result = $this->fichinter->fetch($id);
if (!$result) {
@@ -551,7 +551,7 @@ class Interventions extends DolibarrApi
public function closeFichinter($id)
{
if (!DolibarrApiAccess::$user->hasRight('ficheinter', 'creer')) {
throw new RestException(403, "Insuffisant rights");
throw new RestException(403, "Insufficiant rights");
}
$result = $this->fichinter->fetch($id);
if (!$result) {