Skip to content

Commit

Permalink
Merge pull request #37 from PHPDevsr/dev
Browse files Browse the repository at this point in the history
Ready code v2.1.1
  • Loading branch information
ddevsr authored Feb 14, 2024
2 parents fcbe95e + 3a74aa4 commit e31de89
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-signed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4

- name: Check signed commits in PR
uses: 1Password/check-signed-commits-action@v1.0.0
uses: 1Password/check-signed-commits-action@v1.2.0
with:
comment: |
You must GPG-sign your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open-source project. See Developer's Certificate of Origin. See [signing][1].
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
6 changes: 3 additions & 3 deletions .github/workflows/test-coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']
php-versions: ['7.4', '8.3']

steps:
- name: Checkout
Expand All @@ -48,7 +48,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -65,4 +65,4 @@ jobs:
fi
- name: Run checking coding standard
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
8 changes: 4 additions & 4 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']

steps:
- name: Checkout
Expand All @@ -53,7 +53,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -65,7 +65,7 @@ jobs:
run: mkdir -p build/phpstan

- name: Cache PHPStan results
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: build/phpstan
key: ${{ runner.os }}-phpstan-${{ github.sha }}
Expand All @@ -80,4 +80,4 @@ jobs:
fi
- name: Run static analysis
run: vendor/bin/phpstan analyze
run: vendor/bin/phpstan analyze
4 changes: 2 additions & 2 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']

steps:
- name: Checkout
Expand All @@ -51,7 +51,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.0', '8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']

steps:
- name: Checkout
Expand All @@ -46,7 +46,7 @@ jobs:
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -63,4 +63,4 @@ jobs:
fi
- name: Analyze for refactoring
run: vendor/bin/rector process --dry-run
run: vendor/bin/rector process --dry-run
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpstan/phpstan": "^1.10",
"phpunit/phpcov": "^8.2",
"phpunit/phpunit": "^9.6",
"rector/rector": "0.18.5"
"rector/rector": "1.0.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
4 changes: 3 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\CodeQuality\Rector\If_\CombineIfRector;
use Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
Expand All @@ -44,7 +45,6 @@
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector;
use Rector\DeadCode\Rector\Assign\RemoveDoubleAssignRector;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;
Expand Down Expand Up @@ -77,6 +77,7 @@
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
Expand Down Expand Up @@ -159,6 +160,7 @@
$rectorConfig->rule(SimplifyRegexPatternRector::class);
$rectorConfig->rule(SimplifyStrposLowerRector::class);
$rectorConfig->rule(CombineIfRector::class);
$rectorConfig->rule(CompleteMissingIfElseBracketRector::class);
$rectorConfig->rule(ShortenElseIfRector::class);
$rectorConfig->rule(SimplifyIfElseToTernaryRector::class);
$rectorConfig->rule(SimplifyIfReturnBoolRector::class);
Expand Down
6 changes: 1 addition & 5 deletions src/Recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,7 @@ public function getWidget(array $parameters = [])
$indexResult = 1;

foreach ($result as $key => $value) {
if ($countedResult === $indexResult) {
$html .= sprintf('%s="%s"', $key, $value);
} else {
$html .= sprintf('%s="%s" ', $key, $value);
}
$html .= $countedResult === $indexResult ? sprintf('%s="%s"', $key, $value) : sprintf('%s="%s" ', $key, $value);

$indexResult++;
}
Expand Down

0 comments on commit e31de89

Please sign in to comment.