Skip to content

willhallonline/docker-yii-phpcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

docker-yii-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 willhallonline/yii-phpcs phpcs test.php

FILE: /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 willhallonline/yii-phpcs phpcbf test.php

Changing 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published