Skip to content

Commit e46ed0f

Browse files
rmuitRoSk0
authored andcommitted
Convert assert() arguments from strings to expressions; each is boolean. (This is also what SimpleSAMLphp 1.6 does.)
1 parent 7c2eb26 commit e46ed0f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/Auth/Source/External.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ class External extends Source
9292
*/
9393
public function __construct($info, $config)
9494
{
95-
assert('is_array($info)');
96-
assert('is_array($config)');
95+
assert(is_array($info));
96+
assert(is_array($config));
9797

9898
/* Call the parent constructor first, as required by the interface. */
9999
parent::__construct($info, $config);

lib/Auth/Source/UserPass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ class UserPass extends UserPassBase
7272
*/
7373
public function __construct($info, $config)
7474
{
75-
assert('is_array($info)');
76-
assert('is_array($config)');
75+
assert(is_array($info));
76+
assert(is_array($config));
7777

7878
/* Call the parent constructor first, as required by the interface. */
7979
parent::__construct($info, $config);
@@ -103,8 +103,8 @@ public function __construct($info, $config)
103103
*/
104104
protected function login($username, $password)
105105
{
106-
assert('is_string($username)');
107-
assert('is_string($password)');
106+
assert(is_string($username));
107+
assert(is_string($password));
108108

109109
$drupalHelper = new DrupalHelper();
110110
$drupalHelper->bootDrupal($this->config->getDrupalroot());

lib/ConfigHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class ConfigHelper
7777
*/
7878
public function __construct($config, $location)
7979
{
80-
assert('is_array($config)');
81-
assert('is_string($location)');
80+
assert(is_array($config));
81+
assert(is_string($location));
8282

8383
$this->location = $location;
8484

@@ -95,7 +95,7 @@ public function __construct($config, $location)
9595
$this->cookie_path = Configuration::getInstance()->getBasePath();
9696
$this->cookie_salt = Config::getSecretSalt();
9797
}
98-
98+
9999

100100
/**
101101
* Returns debug mode.

0 commit comments

Comments
 (0)