Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexeevdv/docker-yii2-phpcs
https://github.com/alexeevdv/docker-yii2-phpcs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/alexeevdv/docker-yii2-phpcs
- Owner: alexeevdv
- Created: 2018-09-12T06:42:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-12T09:04:02.000Z (over 6 years ago)
- Last Synced: 2024-10-23T12:24:29.362Z (3 months ago)
- Language: Dockerfile
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-yii2-phpcs
Docker Container with PHPCS setup for Yii development
This Docker Container can be used to setup your environment for Yii development. It combines...
1. PHP
2. Composer
3. PHP CodeSniffer
4. Yii Coding Standards... into a simple to use docker container.
So, as an example, here is the whole process of running the custom Yii PHPCS/PHPCBF container:
## PHPCS
```
➜ docker run -it -v $(pwd):/app alexeevdv/yii2-phpcs phpcs test.phpFILE: /app/test.php
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one
| | blank line
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------Time: 240ms; Memory: 6Mb
```
## PHPCBF```
➜ docker run -it -v $(pwd):/app alexeevdv/yii2-phpcs phpcbf test.phpChanging into directory /app
Processing test.php [PHP => 2 tokens in 1 lines]... DONE in 16ms (2 fixable violations)
=> Fixing file: 0/2 violations remaining [made 4 passes]... DONE in 15ms
Patched 1 file
Time: 225ms; Memory: 6Mb
```