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

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected function loadData(array $data, $fromDataSource)
$this->originalData = array();
}
$this->children = null;
$this->markAsNew(($fromDataSource === true) ? false : true);
$this->markAsNew($fromDataSource !== true);
$this->markAsToBeDeleted(false);
}

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

Expand Down Expand Up @@ -328,7 +328,7 @@ protected function ensureRdnAttributeValues($overwrite = false)
*/
protected function markAsNew($new)
{
$this->new = ($new === false) ? false : true;
$this->new = (bool) $new;
}

/**
Expand All @@ -353,7 +353,7 @@ public function isNew()
*/
protected function markAsToBeDeleted($delete)
{
$this->delete = ($delete === true) ? true : false;
$this->delete = (bool) $delete;
}


Expand Down

0 comments on commit 3109496

Please sign in to comment.