Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Belgium algorithm - rule 2 #2

Merged
merged 9 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": true,
"commitLimit": false,
"hideCredit": true,
"sortCommits": "date-desc",
"breakingPattern": "BREAKING CHANGE: yes"
}
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.1', '7.2', '7.3', '7.4']
php-versions: ['7.4']

steps:
- name: Set git to use LF
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

- name: Send PSALM data
run: vendor/bin/psalm --shepherd --stats
run: vendor/bin/psalm --shepherd --stats src/
continue-on-error: true

- name: Send Scrutinizer data
Expand Down
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2020-2021 Thomas Portelange, Pol Dellaiera

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16 changes: 0 additions & 16 deletions LICENSE.md

This file was deleted.

20 changes: 13 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
"php": ">= 7.1.3"
},
"require-dev": {
"drupol/php-conventions": "^1.7.2 || ^1.8.6 || ^2.0.2",
"friends-of-phpspec/phpspec-code-coverage": "^4.3",
"infection/infection": "^0.13.6 || ^0.15.3",
"phpspec/phpspec": "^5.1.2 || ^6.3",
"phpstan/phpstan-strict-rules": "^0.12.2",
"symfony/polyfill-mbstring": "^1.18",
"vimeo/psalm": "^3.18 || ^4"
"drupol/php-conventions": "^5",
"friends-of-phpspec/phpspec-code-coverage": "^5",
"infection/infection": "^0.23",
"infection/phpspec-adapter": "^0.1.2",
"phpspec/phpspec": "^7",
"phpstan/phpstan-strict-rules": "^0.12.2"
},
"autoload": {
"psr-4": {
Expand All @@ -36,6 +35,13 @@
"tests\\loophp\\Tin\\": "tests/src/"
}
},
"scripts": {
"changelog-unreleased": "docker-compose run auto_changelog -c .auto-changelog -u",
"changelog-version": "docker-compose run auto_changelog -c .auto-changelog -v",
"grumphp": "./vendor/bin/grumphp run",
"infection": "vendor/bin/infection run -j 2",
"phpspec": "vendor/bin/phpspec run -vvv --stop-on-failure"
},
"support": {
"issues": "https://github.com/loophp/tin/issues",
"source": "https://github.com/loophp/tin"
Expand Down
13 changes: 13 additions & 0 deletions docker/auto-changelog/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:15.4.0-alpine

ENV SRC_PATH /src

RUN apk add --no-cache git
RUN npm install -g auto-changelog@2.2.1
RUN mkdir -p $SRC_PATH

VOLUME [ "$SRC_PATH" ]
WORKDIR $SRC_PATH

CMD ["--help"]
ENTRYPOINT ["auto-changelog"]
5 changes: 3 additions & 2 deletions grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
imports:
- { resource: vendor/drupol/php-conventions/config/php71/grumphp.yml }
- { resource: vendor/drupol/php-conventions/config/php73/grumphp.yml }

parameters:
tasks.license.holder: Thomas Portelange, Pol Dellaiera
tasks.license.date_from: 2020
extra_tasks:
psalm: ~
phpspec:
verbose: true
infection:
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/AustriaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
9 changes: 8 additions & 1 deletion spec/loophp/Tin/CountryHandler/BelgiumSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand All @@ -16,5 +21,7 @@ class BelgiumSpec extends AbstractAlgorithmSpec

public const INVALID_NUMBER_PATTERN = ['wwwwwwwwwww'];

public const VALID_NUMBER = ['00012511119', '00022911101'];
public const INVALID_NUMBER_SYNTAX = ['00022911101'];

public const VALID_NUMBER = ['00012511119', '01062624339'];
}
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/BulgariaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/CroatiaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/CyprusSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/CzechRepublicSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/DenmarkSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/EstoniaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/FinlandSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/FranceSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/GermanySpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/GreeceSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/HungarySpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/IrelandSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/ItalySpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/LatviaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/LithuaniaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/LuxembourgSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/MaltaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/NetherlandsSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/PolandSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/PortugalSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/RomaniaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
5 changes: 5 additions & 0 deletions spec/loophp/Tin/CountryHandler/SlovakiaSpec.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<?php

/**
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace spec\loophp\Tin\CountryHandler;
Expand Down
Loading