Skip to content

Commit 94c7001

Browse files
author
Kevin Lucich
committed
Fix PHP code style
1 parent 3252f95 commit 94c7001

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

src/Utils.php

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,24 @@ public function showObject(&$obj)
4646
* @param int $indent
4747
* @return string
4848
*/
49-
public function debugObject($obj, $indent = 0)
49+
public function debugObject($obj, int $indent=0)
5050
{
51-
if (is_array($obj)) {
52-
$return = '';
53-
foreach ($obj as $k => $v) {
54-
$return .= str_repeat(' ', $indent);
55-
if (is_array($v)) {
56-
$return .= $k . "->Array\n";
57-
$return .= $this->debugObject($v, $indent + 1);
58-
} else {
59-
$return .= $k . "->$v\n";
60-
}
61-
}
62-
return $return;
63-
}
51+
$return = '';
52+
53+
if( !is_array($obj) ){
54+
return $return;
55+
}
56+
57+
foreach ($obj as $k => $v) {
58+
$return .= str_repeat(' ', $indent);
59+
if (is_array($v)) {
60+
$return .= $k . "->Array\n";
61+
$return .= $this->debugObject($v, $indent + 1);
62+
} else {
63+
$return .= $k . "->$v\n";
64+
}
65+
}
66+
return $return;
6467
}
6568

6669
public function nsRrDefined($query)

0 commit comments

Comments
 (0)