mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-16 15:18:44 +02:00
Refactor constructor in AttributeExist to require sOqlPropertyPath parameter
* https://github.com/Combodo/iTop/pull/857#discussion_r2993953031
This commit is contained in:
@@ -32,18 +32,14 @@ class AttributeExist extends Constraint
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string|null $sOqlPropertyPath
|
||||
* @param string $sOqlPropertyPath
|
||||
* @param string|null $sFilter
|
||||
* @param array $aOptions
|
||||
* @param array|null $aGroups
|
||||
* @param mixed|null $oPayload
|
||||
*/
|
||||
public function __construct(?string $sOqlPropertyPath = null, ?string $sFilter = null, array $aOptions = [], ?array $aGroups = null, mixed $oPayload = null)
|
||||
public function __construct(string $sOqlPropertyPath, ?string $sFilter = null, array $aOptions = [], ?array $aGroups = null, mixed $oPayload = null)
|
||||
{
|
||||
if ($sOqlPropertyPath === null) {
|
||||
throw new InvalidArgumentException('The argument "sOqlPropertyPath" must be set.');
|
||||
}
|
||||
|
||||
// Merge argument into options array
|
||||
$aOptions = array_merge([
|
||||
'sOqlPropertyPath' => $sOqlPropertyPath,
|
||||
|
||||
Reference in New Issue
Block a user