Skip to content

Commit

Permalink
In case of null return $name back
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Feb 15, 2022
1 parent 5539342 commit f33c93e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ public static function excludePostNominals($values)
*/
public static function nameCase($name = '', array $options = []): string
{
if ($name == '') return $name;
if ($name == '' || $name == NULL) {
return $name;
}

self::setOptions($options);

Expand Down

0 comments on commit f33c93e

Please sign in to comment.