-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathAQFormatter.php
More file actions
31 lines (25 loc) · 667 Bytes
/
AQFormatter.php
File metadata and controls
31 lines (25 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
declare(strict_types=1);
namespace Brick\Postcode\Formatter;
use Brick\Postcode\CountryPostcodeFormatter;
/**
* Validates and formats postcodes in British Antarctic Territory.
*
* This country uses a single postcode for all addresses.
*
* @see https://en.wikipedia.org/wiki/List_of_postal_codes
*/
final class AQFormatter implements CountryPostcodeFormatter
{
public function hint(): string
{
return 'This country uses a single postcode for all addresses.';
}
public function format(string $postcode): ?string
{
if ($postcode === 'BIQQ1ZZ') {
return 'BIQQ 1ZZ';
}
return null;
}
}