Skip to content

Commit

Permalink
Convert assert() arguments from strings to expressions; each is boole…
Browse files Browse the repository at this point in the history
…an. (This is also what SimpleSAMLphp 1.6 does.)
  • Loading branch information
rmuit authored and RoSk0 committed Sep 27, 2019
1 parent 7c2eb26 commit e46ed0f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/Auth/Source/External.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ class External extends Source
*/
public function __construct($info, $config)
{
assert('is_array($info)');
assert('is_array($config)');
assert(is_array($info));
assert(is_array($config));

/* Call the parent constructor first, as required by the interface. */
parent::__construct($info, $config);
Expand Down
8 changes: 4 additions & 4 deletions lib/Auth/Source/UserPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class UserPass extends UserPassBase
*/
public function __construct($info, $config)
{
assert('is_array($info)');
assert('is_array($config)');
assert(is_array($info));
assert(is_array($config));

/* Call the parent constructor first, as required by the interface. */
parent::__construct($info, $config);
Expand Down Expand Up @@ -103,8 +103,8 @@ public function __construct($info, $config)
*/
protected function login($username, $password)
{
assert('is_string($username)');
assert('is_string($password)');
assert(is_string($username));
assert(is_string($password));

$drupalHelper = new DrupalHelper();
$drupalHelper->bootDrupal($this->config->getDrupalroot());
Expand Down
6 changes: 3 additions & 3 deletions lib/ConfigHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class ConfigHelper
*/
public function __construct($config, $location)
{
assert('is_array($config)');
assert('is_string($location)');
assert(is_array($config));
assert(is_string($location));

$this->location = $location;

Expand All @@ -95,7 +95,7 @@ public function __construct($config, $location)
$this->cookie_path = Configuration::getInstance()->getBasePath();
$this->cookie_salt = Config::getSecretSalt();
}


/**
* Returns debug mode.
Expand Down

0 comments on commit e46ed0f

Please sign in to comment.