Skip to content

Commit 6445c32

Browse files
committed
Replace string version of assert
1 parent 9536a5c commit 6445c32

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

lib/Auth/Process/Fticks.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ private function log($msg)
5454
/* local syslog call, avoiding SimpleSAMLphp's wrapping */
5555
case 'local':
5656
case 'syslog':
57-
assert('array_key_exists("processname", $this->logconfig)');
58-
assert('array_key_exists("facility", $this->logconfig)');
57+
assert(array_key_exists("processname", $this->logconfig));
58+
assert(array_key_exists("facility", $this->logconfig));
5959
openlog($this->logconfig['processname'], LOG_PID, $this->logconfig['facility']);
6060
syslog(array_key_exists('priority', $this->logconfig) ? $this->logconfig['priority'] : LOG_INFO, $msg);
6161
break;
6262

6363
/* remote syslog call via UDP */
6464
case 'remote':
65-
assert('array_key_exists("processname", $this->logconfig)');
66-
assert('array_key_exists("facility", $this->logconfig)');
65+
assert(array_key_exists("processname", $this->logconfig));
66+
assert(array_key_exists("facility", $this->logconfig));
6767
/* assemble a syslog message per RFC 5424 */
6868
$rfc5424_message = sprintf(
6969
'<%d>',
@@ -118,7 +118,7 @@ private function generatePNhash(&$state)
118118
{
119119
/* get a user id */
120120
if ($this->userId !== false) {
121-
assert('array_key_exists("Attributes", $state)');
121+
assert(array_key_exists("Attributes", $state));
122122
if (array_key_exists($this->userId, $state['Attributes'])) {
123123
if (is_array($state['Attributes'][$this->userId])) {
124124
$uid = $state['Attributes'][$this->userId][0];
@@ -169,7 +169,7 @@ private function escapeFticks($value)
169169
*/
170170
public function __construct($config, $reserved)
171171
{
172-
assert('is_array($config)');
172+
assert(is_array($config));
173173
parent::__construct($config, $reserved);
174174

175175
if (array_key_exists('federation', $config)) {
@@ -271,11 +271,11 @@ public function __construct($config, $reserved)
271271
*/
272272
public function process(&$state)
273273
{
274-
assert('is_array($state)');
275-
assert('array_key_exists("Destination", $state)');
276-
assert('array_key_exists("entityid", $state["Destination"])');
277-
assert('array_key_exists("Source", $state)');
278-
assert('array_key_exists("entityid", $state["Source"])');
274+
assert(is_array($state));
275+
assert(array_key_exists("Destination", $state));
276+
assert(array_key_exists("entityid", $state["Destination"]));
277+
assert(array_key_exists("Source", $state));
278+
assert(array_key_exists("entityid", $state["Source"]));
279279

280280
$fticks = [];
281281

@@ -319,7 +319,7 @@ public function process(&$state)
319319

320320
/* realm */
321321
if ($this->realm !== false) {
322-
assert('array_key_exists("Attributes", $state)');
322+
assert(array_key_exists("Attributes", $state));
323323
if (array_key_exists($this->realm, $state['Attributes'])) {
324324
if (is_array($state['Attributes'][$this->realm])) {
325325
$fticks['REALM'] = $state['Attributes'][$this->realm][0];

0 commit comments

Comments
 (0)