Skip to content

Commit 31ba226

Browse files
committed
Add additional type check
1 parent 50723e7 commit 31ba226

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

6 Kyu/persistent-bugger.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ function persistence(int $num): int
2222
$total = 1;
2323

2424
$numArray = str_split($num);
25+
// Additional type check
26+
if (true===$numArray) {
27+
return 0;
28+
}
2529
$numArrayCount = count($numArray);
2630
$count = 0;
2731

0 commit comments

Comments
 (0)