forked from Wavyzz/dolibarr
Clean code
This commit is contained in:
@@ -173,7 +173,7 @@ class DolibarrApi
|
||||
unset($object->name_bis);
|
||||
unset($object->newref);
|
||||
|
||||
if ($object->table_element != 'ticket') {
|
||||
if (!isset($object->table_element) || $object->table_element != 'ticket') {
|
||||
unset($object->comments);
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ class Users extends DolibarrApi
|
||||
*
|
||||
* @param string $login Login of user
|
||||
* @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)
|
||||
* @return array|mixed data without useless information
|
||||
* @return array|mixed Data without useless information
|
||||
*
|
||||
* @url GET login/{login}
|
||||
*
|
||||
@@ -212,7 +212,7 @@ class Users extends DolibarrApi
|
||||
*
|
||||
* @param string $email Email of user
|
||||
* @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose)
|
||||
* @return array|mixed data without useless information
|
||||
* @return array|mixed Data without useless information
|
||||
*
|
||||
* @url GET email/{email}
|
||||
*
|
||||
|
||||
@@ -190,7 +190,6 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase
|
||||
*/
|
||||
public function testRestCreateUser()
|
||||
{
|
||||
|
||||
// attemp to create without mandatory fields :
|
||||
$url = $this->api_url.'/users?api_key='.$this->api_key;
|
||||
$addheaders=array('Content-Type: application/json');
|
||||
|
||||
Reference in New Issue
Block a user