Skip to content

Commit ad99e50

Browse files
committed
replacing function body with single-line ternary expression
1 parent efb421e commit ad99e50

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

VerbalExpressions.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ class VerEx {
5757
*/
5858
public function sanitize($value)
5959
{
60-
if(!$value) {
61-
return $value;
62-
}
63-
return preg_quote($value, "/");
60+
return $value ? preg_quote($value, "/") : $value;
6461
}
6562

6663
/**

0 commit comments

Comments
 (0)