File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 12
12
*/
13
13
class ZipCode extends PostalCode
14
14
{
15
- public function setValue (string $ value ): void
15
+ protected function setValue (string $ value ): void
16
16
{
17
17
$ value = StringUtils::trimSpacesWisely ($ value );
18
18
$ changedValue = StringUtils::removeNonWordCharacters ($ value );
19
- $ characters = StringUtils:: countCharacters ($ changedValue );
19
+ $ characters = strlen ($ changedValue );
20
20
21
21
if ($ characters == 4 ) {
22
22
$ value = '0 ' . $ value ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct(string $value)
24
24
$ this ->setValue ($ value );
25
25
}
26
26
27
- public function setValue (string $ value ) : void
27
+ protected function setValue (string $ value ) : void
28
28
{
29
29
$ normalized = StringUtils::trimSpacesWisely ($ value );
30
30
if (empty ($ normalized )) {
Original file line number Diff line number Diff line change @@ -49,9 +49,4 @@ public static function convertCaseToLower(string $value) : string
49
49
{
50
50
return mb_convert_case ($ value , MB_CASE_LOWER , 'UTF-8 ' );
51
51
}
52
-
53
- public static function countCharacters (string $ value ) : int
54
- {
55
- return strlen ($ value );
56
- }
57
52
}
You can’t perform that action at this time.
0 commit comments