forked from Wavyzz/dolibarr
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
This commit is contained in:
@@ -567,7 +567,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
$ok=false;
|
||||
break;
|
||||
}
|
||||
$this->assertTrue($ok, 'Found code empty($user->hasRight in file '.$file['relativename'].'. empty() must not be used with hasRight.');
|
||||
$this->assertTrue($ok, 'Found code empty($user->hasRight in file '.$file['relativename'].'. empty() must not be used on a var not on a function.');
|
||||
|
||||
// Test we don't have empty(DolibarrApiAccess::$user->hasRight
|
||||
$ok=true;
|
||||
@@ -577,7 +577,17 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
$ok=false;
|
||||
break;
|
||||
}
|
||||
$this->assertTrue($ok, 'Found code empty(DolibarrApiAccess::$user->hasRight in file '.$file['relativename'].'. empty() must not be used with hasRight.');
|
||||
$this->assertTrue($ok, 'Found code empty(DolibarrApiAccess::$user->hasRight in file '.$file['relativename'].'. empty() must not be used on a var not on a function.');
|
||||
|
||||
// Test we don't have empty($user->hasRight
|
||||
$ok=true;
|
||||
$matches=array();
|
||||
preg_match_all('/empty\(getDolGlobal/', $filecontent, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $key => $val) {
|
||||
$ok=false;
|
||||
break;
|
||||
}
|
||||
$this->assertTrue($ok, 'Found code empty(getDolGlobal... in file '.$file['relativename'].'. empty() must be used on a var not on a function.');
|
||||
|
||||
// Test we don't have @var array(
|
||||
$ok=true;
|
||||
|
||||
Reference in New Issue
Block a user