Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A php code check tool which use pre-commit hook to find error syntax base on PHP Sniffer.

Notifications You must be signed in to change notification settings

WickyLeo/sniperphp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Code Standrd Check

What's this?

PHP Code pre-commit hook to git or gitlab,checkout your code style PSR Compliance. Base on PHP Sniffer, and use php -l to checkout basic syntax. You can change rule set if you want to change PSR Compliance,modify ruleset.xml and Specified your rule.

How to use?

Add the following paragraph in composer.json,

{
    "require-dev": {
        "sniperphp/code_check":"dev-master"
    },
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/WickyLeo/sniperphp"
        }
    ],
    "scripts": {
        "post-install-cmd": [
            "sh ./vendor/sniperphp/code_check/setup_hooks.sh"
        ],
        "post-update-cmd": [
            "sh ./vendor/sniperphp/code_check/setup_hooks.sh"
        ]
    }
}

and in your project root path, execute

composer install or composer update

About

A php code check tool which use pre-commit hook to find error syntax base on PHP Sniffer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages