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/2700'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Collection/DefaultIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function setAttributeNameTreatment($attributeNameTreatment)
$this->attributeNameTreatment = $attributeNameTreatment;
}
} else {
$attributeNameTreatment = (int)$attributeNameTreatment;
$attributeNameTreatment = (int) $attributeNameTreatment;
switch ($attributeNameTreatment) {
case self::ATTRIBUTE_TO_LOWER:
case self::ATTRIBUTE_TO_UPPER:
Expand Down
8 changes: 4 additions & 4 deletions src/Dn.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function getRdnString($caseFold = null)
*/
public function getParentDn($levelUp = 1)
{
$levelUp = (int)$levelUp;
$levelUp = (int) $levelUp;
if ($levelUp < 1 || $levelUp >= count($this->dn)) {
throw new Exception\LdapException(null, 'Cannot retrieve parent DN with given $levelUp');
}
Expand All @@ -161,7 +161,7 @@ public function get($index, $length = 1, $caseFold = null)
{
$caseFold = self::sanitizeCaseFold($caseFold, $this->caseFold);
$this->assertIndex($index);
$length = (int)$length;
$length = (int) $length;
if ($length <= 0) {
$length = 1;
}
Expand Down Expand Up @@ -198,7 +198,7 @@ public function set($index, array $value)
public function remove($index, $length = 1)
{
$this->assertIndex($index);
$length = (int)$length;
$length = (int) $length;
if ($length <= 0) {
$length = 1;
}
Expand Down Expand Up @@ -381,7 +381,7 @@ public function __toString()
*/
public function offsetExists($offset)
{
$offset = (int)$offset;
$offset = (int) $offset;
if ($offset < 0 || $offset >= count($this->dn)) {
return false;
}
Expand Down
16 changes: 8 additions & 8 deletions src/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function setOptions($options)
case 'port':
case 'accountCanonicalForm':
case 'networkTimeout':
$permittedOptions[$key] = (int)$val;
$permittedOptions[$key] = (int) $val;
break;
case 'useSsl':
case 'bindRequiresDn':
Expand Down Expand Up @@ -672,22 +672,22 @@ public function connect($host = null, $port = null, $useSsl = null, $useStartTls
if ($port === null) {
$port = $this->getPort();
} else {
$port = (int)$port;
$port = (int) $port;
}
if ($useSsl === null) {
$useSsl = $this->getUseSsl();
} else {
$useSsl = (bool)$useSsl;
$useSsl = (bool) $useSsl;
}
if ($useStartTls === null) {
$useStartTls = $this->getUseStartTls();
} else {
$useStartTls = (bool)$useStartTls;
$useStartTls = (bool) $useStartTls;
}
if ($networkTimeout === null) {
$networkTimeout = $this->getNetworkTimeout();
} else {
$networkTimeout = (int)$networkTimeout;
$networkTimeout = (int) $networkTimeout;
}

if (!$host) {
Expand Down Expand Up @@ -890,7 +890,7 @@ public function search($filter, $basedn = null, $scope = self::SEARCH_SCOPE_SUB,
break;
case 'sizelimit':
case 'timelimit':
$$key = (int)$value;
$$key = (int) $value;
break;
}
}
Expand Down Expand Up @@ -1054,7 +1054,7 @@ public function searchEntries($filter, $basedn = null, $scope = self::SEARCH_SCO
}
$result = $this->search($filter, $basedn, $scope, $attributes, $sort, null, $sizelimit, $timelimit);
$items = $result->toArray();
if ((bool)$reverseSort === true) {
if ((bool) $reverseSort === true) {
$items = array_reverse($items, false);
}

Expand Down Expand Up @@ -1383,7 +1383,7 @@ public function move($from, $to, $recursively = false, $alwaysEmulate = false)
*/
public function rename($from, $to, $recursively = false, $alwaysEmulate = false)
{
$emulate = (bool)$alwaysEmulate;
$emulate = (bool) $alwaysEmulate;
if (!function_exists('ldap_rename')) {
$emulate = true;
} elseif ($recursively) {
Expand Down
2 changes: 1 addition & 1 deletion src/Node/Schema/AttributeType/OpenLdap.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getMaxLength()
return $parent->getMaxLength();
}
} else {
return (int)$maxLength;
return (int) $maxLength;
}
}

Expand Down

0 comments on commit 7e47bfe

Please sign in to comment.