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 b2f9ed0
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 157 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: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vendor/
composer.lock
.php_cs.cache
.php_cs
tools/
.phpunit.result.cache
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
}
],
"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": "*"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|>=10"
},
"autoload": {
"psr-4": {
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 b2f9ed0

Please sign in to comment.