-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
362352f
commit 68ed2d2
Showing
9 changed files
with
159 additions
and
131 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: Lint code | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
extensions: json, zip | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install PHP dependencies | ||
run: composer update --no-interaction --no-progress | ||
|
||
- name: Run Linter | ||
run: composer run lint | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'chore: fix styling' |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -16,4 +16,7 @@ Thumbs.db | |
*.swp | ||
|
||
# phpstorm | ||
.idea/* | ||
.idea/* | ||
|
||
# Alchemy | ||
.alchemy |
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
app: | ||
- src | ||
|
||
tests: | ||
engine: pest | ||
parallel: true | ||
paths: | ||
- tests | ||
files: | ||
- '*.test.php' | ||
coverage: | ||
processUncoveredFiles: true | ||
|
||
lint: | ||
preset: PSR12 | ||
rules: | ||
single_quote: true | ||
phpdoc_scalar: true | ||
no_unused_imports: true | ||
unary_operator_spaces: true | ||
binary_operator_spaces: true | ||
phpdoc_var_without_name: true | ||
trailing_comma_in_multiline: true | ||
phpdoc_single_line_var_spacing: true | ||
single_trait_insert_per_statement: true | ||
not_operator_with_successor_space: false | ||
array_syntax: | ||
syntax: short | ||
ordered_imports: | ||
sort_algorithm: alpha | ||
method_argument_space: | ||
on_multiline: ensure_fully_multiline | ||
keep_multiple_spaces_after_comma: true | ||
blank_line_before_statement: | ||
statements: | ||
- break | ||
- continue | ||
- declare | ||
- return | ||
- throw | ||
- try | ||
|
||
actions: | ||
run: | ||
- lint | ||
- tests | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
php: | ||
extensions: json, zip | ||
versions: | ||
- '8.3' | ||
- '8.2' | ||
- '8.1' | ||
- '8.0' | ||
- '7.4' | ||
events: | ||
- push | ||
- pull_request |
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,52 +1,56 @@ | ||
{ | ||
"name": "leafs/leaf", | ||
"description": "Elegant PHP for modern developers", | ||
"keywords": [ | ||
"microframework", | ||
"rest", | ||
"router", | ||
"leaf", | ||
"php", | ||
"framework" | ||
], | ||
"homepage": "https://leafphp.dev", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Michael Darko", | ||
"email": "[email protected]", | ||
"homepage": "https://mychi.netlify.app", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Leaf\\": "src" | ||
}, | ||
"files": [ | ||
"src/functions.php" | ||
] | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": "^7.4|^8.0", | ||
"leafs/http": "*", | ||
"leafs/anchor": "*", | ||
"leafs/exception": "*" | ||
}, | ||
"require-dev": { | ||
"pestphp/pest": "^1.21", | ||
"friendsofphp/php-cs-fixer": "^3.0" | ||
}, | ||
"scripts": { | ||
"name": "leafs/leaf", | ||
"description": "Elegant PHP for modern developers", | ||
"keywords": [ | ||
"microframework", | ||
"rest", | ||
"router", | ||
"leaf", | ||
"php", | ||
"framework" | ||
], | ||
"homepage": "https://leafphp.dev", | ||
"type": "library", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Michael Darko", | ||
"email": "[email protected]", | ||
"homepage": "https://mychi.netlify.app", | ||
"role": "Developer" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Leaf\\": "src" | ||
}, | ||
"files": [ | ||
"src/functions.php" | ||
] | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": "^7.4|^8.0", | ||
"leafs/http": "*", | ||
"leafs/anchor": "*", | ||
"leafs/exception": "*", | ||
"leafs/alchemy": "dev-next" | ||
}, | ||
"scripts": { | ||
"format": "vendor/bin/php-cs-fixer fix --config=.php_cs.dist.php --allow-risky=yes", | ||
"test": "vendor/bin/pest" | ||
"test": "./vendor/bin/alchemy setup --test", | ||
"alchemy": "./vendor/bin/alchemy setup", | ||
"lint": "./vendor/bin/alchemy setup --lint", | ||
"actions": "./vendor/bin/alchemy setup --actions" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true | ||
} | ||
} | ||
"require-dev": { | ||
"pestphp/pest": "^3.3", | ||
"friendsofphp/php-cs-fixer": "^3.64" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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