generated from rogervila/composer-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from absszero/sample-option
Sample option
- Loading branch information
Showing
13 changed files
with
88 additions
and
53 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,34 @@ | ||
name: Run lint | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "**.php" | ||
- "phpcs.xml" | ||
- "composer.json" | ||
- ".github/workflows/lint.yaml" | ||
|
||
jobs: | ||
phpcs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: | | ||
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar | ||
php phpcs.phar --version | ||
- run: | | ||
git diff --name-only ${{ github.event.pull_request.base.sha }} |egrep '\.php$' > .list.txt | ||
php phpcs.phar --standard=./phpcs.xml --file-list=./.list.txt | ||
- name: Update composer | ||
run: composer selfupdate | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-interaction | ||
|
||
- name: Run static analysis | ||
run: composer static-analysis |
34 changes: 7 additions & 27 deletions
34
.github/workflows/build.yml → .github/workflows/run-tests.yml
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
Empty file.
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,15 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd"> | ||
<description>The coding standard for PHP_CodeSniffer itself.</description> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<arg name="basepath" value="./"/> | ||
<arg name="colors"/> | ||
<arg name="parallel" value="8"/> | ||
<arg value="nps"/> | ||
|
||
<rule ref="PSR12"> | ||
</rule> | ||
</ruleset> |
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,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Absszero\Phead; | ||
|
||
class ArrAccess | ||
|
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,4 +1,5 @@ | ||
<?php | ||
|
||
namespace Absszero\Phead; | ||
|
||
function file_get_contents(string $file): string | ||
|
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
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