Skip to content

Instantly share code, notes, and snippets.

@radmiraal
Created February 21, 2013 08:24
Show Gist options
  • Save radmiraal/5003172 to your computer and use it in GitHub Desktop.
Save radmiraal/5003172 to your computer and use it in GitHub Desktop.
{
"name": "phpcs/example",
"repositories": [
{
"type": "git",
"url": "git://github.com/radmiraal/TYPO3Flow.git"
},
{
"type": "git",
"url": "git://github.com/radmiraal/TYPO3SniffPool.git"
}
],
"config": {
"vendor-dir":"Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"typo3-qa/typo3flow": "dev-master"
},
"minimum-stability": "dev"
}
<?php
if(true) { }
?>
$ composer install --dev
Loading composer repositories with package information
Installing dependencies
Nothing to install or update
Loading composer repositories with package information
Installing dev dependencies
- Installing squizlabs/php_codesniffer (dev-master e5bc3c5)
Cloning e5bc3c52027e23faa58b6f1b2c98829c6b5ee93f
- Installing typo3-qa/typo3pool (dev-master 5d5e706)
Cloning 5d5e706e77766911e8addd7d2645827266c7a6cb
- Installing typo3-qa/typo3flow (dev-master 330d885)
Cloning 330d88501ac20cdc27137e864c6890f94e8c70ac
$ bin/phpcs --standard=Packages/Libraries/typo3-qa/typo3flow test.php
FILE: /Users/rens/Documents/_Sites/flow/ehrm/Data/tmp/test.php
--------------------------------------------------------------------------------
FOUND 3 ERROR(S) AND 1 WARNING(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
2 | WARNING | Avoid IF statements that are always true or false
2 | ERROR | Empty IF statement detected
2 | ERROR | Expected "if (...) {\n"; found "if(...) { "
2 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
--------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment