-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
049ab5a
commit 6fe7f27
Showing
6 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Rector | ||
|
||
on: | ||
pull_request: null | ||
|
||
|
||
jobs: | ||
rector: | ||
# Don't run on forks. | ||
if: github.repository == 'tomasvotruba/unused-public' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- | ||
uses: actions/checkout@v3 | ||
with: | ||
# Must be used to trigger workflow after push | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
|
||
## First run Rector - here can't be --dry-run !!! it would stop the job with it and not commit anything in the future | ||
- run: vendor/bin/rector --ansi | ||
|
||
- run: vendor/bin/ecs check --fix --ansi | ||
|
||
# see https://github.com/EndBug/add-and-commit | ||
- | ||
# commit only to core contributors who have repository access | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: EndBug/[email protected] | ||
with: | ||
# The arguments for the `git add` command (see the paragraph below for more info) | ||
add: . | ||
message: "[ci-review] Rector Rectify" | ||
author_name: "GitHub Action" | ||
author_email: "[email protected]" | ||
env: | ||
# to get push access | ||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Livewire; | ||
|
||
class Component | ||
{ | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/Rules/UnusedPublicPropertyRule/Fixture/SkipLivewireComponent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace TomasVotruba\UnusedPublic\Tests\Rules\UnusedPublicPropertyRule\Fixture; | ||
|
||
final class SkipLivewireComponent extends \Livewire\Component | ||
{ | ||
public $available; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters