Remove usage of search() === to contains()
This commit is contained in:
@@ -36,7 +36,7 @@ final class ObjectClass extends Attribute
|
||||
*/
|
||||
public function isStructural(string $value): bool
|
||||
{
|
||||
return $this->structural->search($value) !== FALSE;
|
||||
return $this->structural->contains($value);
|
||||
}
|
||||
|
||||
public function render(bool $edit=FALSE,bool $old=FALSE,bool $new=FALSE): View
|
||||
|
@@ -324,7 +324,7 @@ final class AttributeType extends Base {
|
||||
*/
|
||||
public function addRequiredByObjectClass(string $name): void
|
||||
{
|
||||
if ($this->required_by_object_classes->search($name) === FALSE)
|
||||
if (! $this->required_by_object_classes->contains($name))
|
||||
$this->required_by_object_classes->push($name);
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ final class AttributeType extends Base {
|
||||
*/
|
||||
public function addUsedInObjectClass(string $name): void
|
||||
{
|
||||
if ($this->used_in_object_classes->search($name) === FALSE)
|
||||
if (! $this->used_in_object_classes->contains($name))
|
||||
$this->used_in_object_classes->push($name);
|
||||
}
|
||||
|
||||
|
@@ -115,7 +115,7 @@ final class MatchingRule extends Base {
|
||||
{
|
||||
$name = trim($name);
|
||||
|
||||
if ($this->used_by_attrs->search($name) === FALSE)
|
||||
if (! $this->used_by_attrs->contains($name))
|
||||
$this->used_by_attrs->push($name);
|
||||
}
|
||||
|
||||
|
@@ -241,7 +241,7 @@ final class ObjectClass extends Base
|
||||
*/
|
||||
public function addChildObjectClass(string $name): void
|
||||
{
|
||||
if (! $this->child_objectclasses->has($name))
|
||||
if (! $this->child_objectclasses->contains($name))
|
||||
$this->child_objectclasses->push($name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user