Skip to content

Commit

Permalink
Update CS
Browse files Browse the repository at this point in the history
  • Loading branch information
antalaron committed Oct 24, 2024
1 parent 445850e commit 82cc7f1
Show file tree
Hide file tree
Showing 8 changed files with 172 additions and 145 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['5.6', '7.0', '7.4', '8.1', '8.2']
php-version: ['7.4', '8.1', '8.2']
dependency: [lowest, highest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: ${{ matrix.php-version }}
extensions: intl, mbstring
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v4
with:
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
}
],
"require": {
"symfony/validator": "^2.8|^3.0|^4.0|^5.0"
"php": ">= 7.4",
"symfony/validator": "^2.8|^3.0|^4.0|^5.0|^6.0|^7.0"
},
"require-dev": {
"phpunit/phpunit": "*"
Expand Down
7 changes: 2 additions & 5 deletions src/VatNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,16 @@
*/
class VatNumber extends Constraint
{
const MESSAGE = 'Not a VAT number.';
public const MESSAGE = 'Not a VAT number.';

public $message = self::MESSAGE;
public $extraVat;

/**
* {@inheritdoc}
*/
public function __construct($options = null)
{
parent::__construct($options);

if (null !== $this->extraVat && !is_callable($this->extraVat)) {
if (null !== $this->extraVat && !\is_callable($this->extraVat)) {
throw new ConstraintDefinitionException('The option "extraVat" must be callable');
}
}
Expand Down
Loading

0 comments on commit 82cc7f1

Please sign in to comment.