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

chore(deps): update cachix/install-nix-action action to v31 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Install the Nix package manager
uses: cachix/install-nix-action@v30
uses: cachix/install-nix-action@v31

- name: Checks
run: nix run nixpkgs#nodePackages.prettier -- --check .

Unchanged files with check annotations Beta

// If we reach this point, it means that it's already validated.
preg_match(sprintf('/%s/', self::PATTERN), $tin, $matches);
$hasModulo = array_key_exists('modulo', $matches) && '' !== $matches['modulo'];

Check failure on line 61 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Strict comparison using !== between '' and numeric-string will always evaluate to true.
// range of months from 1 to 12
$allowedMonths = array_merge(
// from year 2004 there can be people with +20 in their month number
// without modulo check it would work for people born between 1904 and 19{last_two_digits_of_current_year} too
if (true === $hasModulo && 4 <= $matches['year'] && date('y') >= $matches['year']) {

Check failure on line 77 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'year' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
$allowedMonths = array_merge(
$allowedMonths,
range(
);
}
if (!in_array((int) $matches['month'], $allowedMonths, true)) {

Check failure on line 91 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'month' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
return false;
}
// day is between 1 and 31
if (1 > $matches['day'] || 31 < $matches['day']) {

Check failure on line 96 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'day' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
return false;
}
// If we reach this point, it means that it's already validated.
preg_match(sprintf('/%s/', self::PATTERN), $tin, $matches);
$hasModulo = array_key_exists('modulo', $matches) && '' !== $matches['modulo'];

Check failure on line 113 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Strict comparison using !== between '' and numeric-string will always evaluate to true.
// after year 1953 everyone should have modulo
// this validation does not work for people born since year 2000
if (53 < $matches['year'] && false === $hasModulo) {

Check failure on line 117 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'year' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
return false;
}
// if there is no modulo then sequence can be between 001 and 999
if (false === $hasModulo && 1 > $matches['sequence']) {

Check failure on line 122 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'sequence' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
return false;
}
// number's modulo should be 0
if (true === $hasModulo) {
$number = (int) ($matches['year'] . $matches['month'] . $matches['day'] . $matches['sequence']);

Check failure on line 128 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'day' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.

Check failure on line 128 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'month' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.

Check failure on line 128 in src/CountryHandler/CzechRepublic.php

GitHub Actions / Static Analysis (ubuntu-latest, 8.1)

Offset 'sequence' does not exist on array{0?: string, year?: non-falsy-string&numeric-string, 1?: non-falsy-string&numeric-string, month?: non-falsy-string&numeric-string, 2?: non-falsy-string&numeric-string, day?: non-falsy-string&numeric-string, 3?: non-falsy-string&numeric-string, slash?: ''|'/', ...}.
$modulo = $number % self::MODULO;
// from year 1954 to 1985 and sometimes even after that, modulo can be 10 which results in 0 as modulo