• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

brick / postcode / 19098923587

05 Nov 2025 10:27AM UTC coverage: 81.782% (-17.6%) from 99.396%
19098923587

Pull #19

github

web-flow
Merge 79bf98178 into 8ef37e5aa
Pull Request #19: Add hint to formatter, so a hint can be provided if postcode is invalid

5 of 184 new or added lines in 183 files covered. (2.72%)

2 existing lines in 1 file now uncovered.

826 of 1010 relevant lines covered (81.78%)

15.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/InvalidPostcodeException.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\Postcode;
6

7
use Exception;
8

9
/**
10
 * Exception thrown when trying to format an invalid postcode.
11
 */
12
final class InvalidPostcodeException extends Exception
13
{
14
    protected string $postcode;
15

16
    protected string $country;
17

18
    /**
19
     * Construct exception thrown when trying to format an invalid postcode.
20
     */
21
    public function __construct(string $postcode, string $country)
22
    {
23
        parent::__construct('Invalid postcode: ' . $postcode);
4✔
24
        $this->postcode = $postcode;
4✔
25
        $this->country = $country;
4✔
26
    }
27

28
    /**
29
     * Get the invalid postcode associated with this exception.
30
     */
31
    public function getPostcode(): string
32
    {
UNCOV
33
        return $this->postcode;
×
34
    }
35

36
    /**
37
     * Get the country ISO2 code associated with this exception.
38
     */
39
    public function getCountry(): string
40
    {
UNCOV
41
        return $this->country;
×
42
    }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc