Skip to content

Commit 8a6a38d

Browse files
committed
Add trim filter
1 parent 661f71c commit 8a6a38d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Filter/Trim.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
namespace PHPModelGenerator\Filter;
6+
7+
/**
8+
* Class Trim
9+
*
10+
* @package PHPModelGenerator\Filter
11+
*/
12+
class Trim
13+
{
14+
public static function filter(?string $value): ?string
15+
{
16+
return $value !== null ? trim($value) : null;
17+
}
18+
}

0 commit comments

Comments
 (0)