1
0
mirror of https://github.com/themsaid/ibis.git synced 2025-03-14 02:19:37 +01:00

CS Fixer dev installation and documentation

* Installed PHP CS Fixer as dev dependency so that global installation is not required for dev
* Added documentation for CS Fixer in readme and in composer
* Added a PHP CS Dry run configuration
This commit is contained in:
Aaron Saray 2021-03-20 15:27:27 -05:00
parent e671d5e1ba
commit e062432464
3 changed files with 1155 additions and 2 deletions

View File

@ -26,6 +26,7 @@
"spatie/commonmark-highlighter": "^2.1"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.18",
"symfony/var-dumper": "^5.0"
},
"autoload": {
@ -40,8 +41,15 @@
"scripts": {
"csfix": [
"php-cs-fixer fix src stubs --config=.php_cs"
],
"csfix-review": [
"php-cs-fixer fix src stubs --config=.php_cs --dry-run -v"
]
},
"scripts-descriptions": {
"csfix": "Runs PHP CS Fixer to fix project files.",
"csfix-review": "Runs PHP CS Fixer to show the details of which files are out of code standard."
},
"minimum-stability": "dev",
"prefer-stable": true
}

1137
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -99,6 +99,18 @@ ibis sample dark
This command will use the generated files from the `ibis build` command to generate samples from your PDF eBook. You can configure which pages to include in the sample by updating the `/ibis.php` file.
## Development
This project uses PHP CS Fixer with a code standard defined in `.php_cs`.
To review code out of style, you can run the fix command as a dry run. Run the composer script like this:
`composer run csfix-review`
To fix the source code, run the following composer script:
`composer run csfix`
## Credits
- [Mohamed Said](https://github.com/themsaid)