-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from JimChenWYU/2.x
Upgrade 2.x
- Loading branch information
Showing
28 changed files
with
1,093 additions
and
265 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Lint | ||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
lint: | ||
name: PHP-${{ matrix.php_version }}-${{ matrix.perfer }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php_version: | ||
- 7.4 | ||
perfer: | ||
- stable | ||
container: | ||
image: nauxliu/php-ci-image:${{ matrix.php_version }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install Dependencies | ||
run: composer install --prefer-dist --no-interaction --no-suggest | ||
- name: Check Style | ||
run: composer check-style | ||
- name: PHPStan analyse | ||
run: composer phpstan |
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,24 @@ | ||
name: Test | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
phpunit: | ||
name: PHP-${{ matrix.php_version }}-${{ matrix.perfer }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php_version: | ||
- 7.2 | ||
- 7.3 | ||
- 7.4 | ||
perfer: | ||
- stable | ||
container: | ||
image: nauxliu/php-ci-image:${{ matrix.php_version }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Install Dependencies | ||
run: composer install --prefer-dist --no-interaction --no-suggest | ||
- name: Run PHPUnit | ||
run: ./vendor/bin/phpunit |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.idea | ||
/vendor/ | ||
composer.lock | ||
.phpunit.result.cache | ||
.php_cs.cache | ||
.DS_Store |
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,48 @@ | ||
<?php | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR2' => true, | ||
'binary_operator_spaces' => true, | ||
'blank_line_after_opening_tag' => true, | ||
'compact_nullable_typehint' => true, | ||
'declare_equal_normalize' => true, | ||
'lowercase_cast' => true, | ||
'lowercase_static_reference' => true, | ||
'new_with_braces' => true, | ||
'no_blank_lines_after_class_opening' => true, | ||
'no_leading_import_slash' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'ordered_class_elements' => [ | ||
'order' => [ | ||
'use_trait', | ||
], | ||
], | ||
'ordered_imports' => [ | ||
'imports_order' => [ | ||
'class', | ||
'function', | ||
'const', | ||
], | ||
'sort_algorithm' => 'none', | ||
], | ||
'return_type_declaration' => true, | ||
'short_scalar_cast' => true, | ||
'single_blank_line_before_namespace' => true, | ||
'single_trait_insert_per_statement' => true, | ||
'ternary_operator_spaces' => true, | ||
'unary_operator_spaces' => true, | ||
'visibility_required' => [ | ||
'elements' => [ | ||
'const', | ||
'method', | ||
'property', | ||
], | ||
], | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->in([__DIR__.'/src/', __DIR__.'/tests/', __DIR__.'/config/', __DIR__.'/migrations/']) | ||
) | ||
; |
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
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 | ||
|
||
return [ | ||
|
||
'votes_table' => 'votes', | ||
|
||
'user_foreign_key' => 'user_id', | ||
|
||
'vote_model' => \Jcc\LaravelVote\Vote::class, | ||
]; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.