Skip to content

Commit f0d6eb3

Browse files
authored
Initial commit
0 parents  commit f0d6eb3

5 files changed

Lines changed: 128 additions & 0 deletions

File tree

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# phpstorm project files
2+
.idea
3+
4+
# netbeans project files
5+
nbproject
6+
7+
# zend studio for eclipse project files
8+
.buildpath
9+
.project
10+
.settings
11+
12+
# sublime text project / workspace files
13+
*.sublime-project
14+
*.sublime-workspace
15+
16+
# windows thumbnail cache
17+
Thumbs.db
18+
19+
# composer vendor dir
20+
/vendor
21+
22+
# composer itself is not needed
23+
composer.phar
24+
25+
# Mac DS_Store Files
26+
.DS_Store
27+
28+
# phpunit itself is not needed
29+
phpunit.phar
30+
.phpunit.result.cache
31+
32+
# local phpunit config
33+
/phpunit.xml
34+
/phpunit.xml.dist
35+
36+
# NPM packages
37+
/node_modules
38+
.env
39+
40+
# Codeception
41+
c3.php
42+
43+
# Composer
44+
composer.lock

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The postal-code-data library is free software. It is released under the terms of the following BSD License.
2+
3+
Copyright © 2022 BeastBytes - All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
6+
following conditions are met:
7+
8+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following
9+
disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided with the distribution.
12+
* Neither the name of BeastBytes nor the names of its contributors may be used to endorse or promote products derived
13+
from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Postal Code Data (postal-code-data)
2+
Interface for retrieving postal code data.
3+
4+
## Installation
5+
6+
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
7+
8+
Either run
9+
10+
```
11+
php composer.phar require --prefer-dist beastbytes/iban
12+
```
13+
14+
or add
15+
16+
```json
17+
"beastbytes/postal-code-data": "^1.0.0"
18+
```
19+
20+
to the require section of your composer.json.

composer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "beastbytes/postal-code-data",
3+
"type": "library",
4+
"description": "Interface for retrieving postal code data",
5+
"keywords": [
6+
"postal code"
7+
],
8+
"support": {
9+
"issues": "https://github.com/beastbytes/postal-code-data/issues",
10+
"source": "https://github.com/beastbytes/postal-code-data"
11+
},
12+
"license": "BSD-3-Clause",
13+
"authors": [{
14+
"name": "Chris Yates",
15+
"email": "chris.l.yates@gmail.com"
16+
}],
17+
"minimum-stability": "dev",
18+
"prefer-stable": true,
19+
"require": {
20+
"php": "^8.0"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"BeastBytes\\PostalCode\\": "src"
25+
}
26+
}
27+
}

src/PostalCodeDataInterface.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* @copyright Copyright © 2022 BeastBytes - All rights reserved
4+
* @license BSD 3-Clause
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace BeastBytes\PostalCode;
10+
11+
interface PostalCodeDataInterface
12+
{
13+
public function getCountries(): array;
14+
public function getPattern(string $country): string;
15+
public function hasCountry(string $country): bool;
16+
}

0 commit comments

Comments
 (0)