Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3307'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/Dn.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function fromString($dn, $caseFold = null)
} else {
$dnArray = static::explodeDn((string) $dn);
}
return new self($dnArray, $caseFold);
return new static($dnArray, $caseFold);
}

/**
Expand All @@ -90,7 +90,7 @@ public static function fromString($dn, $caseFold = null)
*/
public static function fromArray(array $dn, $caseFold = null)
{
return new self($dn, $caseFold);
return new static($dn, $caseFold);
}

/**
Expand Down Expand Up @@ -145,7 +145,7 @@ public function getParentDn($levelUp = 1)
throw new Exception\LdapException(null, 'Cannot retrieve parent DN with given $levelUp');
}
$newDn = array_slice($this->dn, $levelUp);
return new self($newDn, $this->caseFold);
return new static($newDn, $this->caseFold);
}

/**
Expand Down
20 changes: 10 additions & 10 deletions src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Filter extends Filter\StringFilter
*/
public static function equals($attr, $value)
{
return new self($attr, $value, self::TYPE_EQUALS, null, null);
return new static($attr, $value, self::TYPE_EQUALS, null, null);
}

/**
Expand All @@ -49,7 +49,7 @@ public static function equals($attr, $value)
*/
public static function begins($attr, $value)
{
return new self($attr, $value, self::TYPE_EQUALS, null, '*');
return new static($attr, $value, self::TYPE_EQUALS, null, '*');
}

/**
Expand All @@ -62,7 +62,7 @@ public static function begins($attr, $value)
*/
public static function ends($attr, $value)
{
return new self($attr, $value, self::TYPE_EQUALS, '*', null);
return new static($attr, $value, self::TYPE_EQUALS, '*', null);
}

/**
Expand All @@ -75,7 +75,7 @@ public static function ends($attr, $value)
*/
public static function contains($attr, $value)
{
return new self($attr, $value, self::TYPE_EQUALS, '*', '*');
return new static($attr, $value, self::TYPE_EQUALS, '*', '*');
}

/**
Expand All @@ -88,7 +88,7 @@ public static function contains($attr, $value)
*/
public static function greater($attr, $value)
{
return new self($attr, $value, self::TYPE_GREATER, null, null);
return new static($attr, $value, self::TYPE_GREATER, null, null);
}

/**
Expand All @@ -101,7 +101,7 @@ public static function greater($attr, $value)
*/
public static function greaterOrEqual($attr, $value)
{
return new self($attr, $value, self::TYPE_GREATEROREQUAL, null, null);
return new static($attr, $value, self::TYPE_GREATEROREQUAL, null, null);
}

/**
Expand All @@ -114,7 +114,7 @@ public static function greaterOrEqual($attr, $value)
*/
public static function less($attr, $value)
{
return new self($attr, $value, self::TYPE_LESS, null, null);
return new static($attr, $value, self::TYPE_LESS, null, null);
}

/**
Expand All @@ -127,7 +127,7 @@ public static function less($attr, $value)
*/
public static function lessOrEqual($attr, $value)
{
return new self($attr, $value, self::TYPE_LESSOREQUAL, null, null);
return new static($attr, $value, self::TYPE_LESSOREQUAL, null, null);
}

/**
Expand All @@ -140,7 +140,7 @@ public static function lessOrEqual($attr, $value)
*/
public static function approx($attr, $value)
{
return new self($attr, $value, self::TYPE_APPROX, null, null);
return new static($attr, $value, self::TYPE_APPROX, null, null);
}

/**
Expand All @@ -152,7 +152,7 @@ public static function approx($attr, $value)
*/
public static function any($attr)
{
return new self($attr, '', self::TYPE_EQUALS, '*', null);
return new static($attr, '', self::TYPE_EQUALS, '*', null);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Ldif/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function __construct(array $options = array())
*/
public static function decode($string)
{
$encoder = new self(array());
$encoder = new static(array());
return $encoder->_decode($string);
}

Expand Down Expand Up @@ -136,7 +136,7 @@ protected function pushAttribute(array $attribute, array &$entry)
*/
public static function encode($value, array $options = array())
{
$encoder = new self($options);
$encoder = new static($options);

return $encoder->_encode($value);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public static function create($dn, array $objectClass = array())
} else {
throw new Exception\LdapException(null, '$dn is of a wrong data type.');
}
$new = new self($dn, array(), false, null);
$new = new static($dn, array(), false, null);
$new->ensureRdnAttributeValues();
$new->setAttribute('objectClass', $objectClass);

Expand Down Expand Up @@ -273,7 +273,7 @@ public static function fromLdap($dn, Ldap $ldap)
if ($data === null) {
return null;
}
$entry = new self($dn, $data, true, $ldap);
$entry = new static($dn, $data, true, $ldap);

return $entry;
}
Expand All @@ -299,7 +299,7 @@ public static function fromArray(array $data, $fromDataSource = false)
throw new Exception\LdapException(null, '\'dn\' key is of a wrong data type.');
}
$fromDataSource = ($fromDataSource === true) ? true : false;
$new = new self($dn, $data, $fromDataSource, null);
$new = new static($dn, $data, $fromDataSource, null);
$new->ensureRdnAttributeValues();

return $new;
Expand Down
2 changes: 1 addition & 1 deletion src/Node/RootDse.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function create(Ldap\Ldap $ldap)
return new RootDse\OpenLdap($dn, $data);
}

return new self($dn, $data);
return new static($dn, $data);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static function create(Ldap\Ldap $ldap)
return new Schema\OpenLdap($dn, $data, $ldap);
case RootDse::SERVER_TYPE_EDIRECTORY:
default:
return new self($dn, $data, $ldap);
return new static($dn, $data, $ldap);
}
}

Expand Down

0 comments on commit 076734b

Please sign in to comment.