Git Product home page Git Product logo

php_ws_setup's Introduction

#Personal PHP setup git clone [email protected]:lbonomo/PHP_WS_Setup.git PHP

PHP Code Sniffer

Instalación manual

# Or download using wget
wget https://phars.phpcodesniffer.com/phpcs.phar -O phpcs 
wget https://phars.phpcodesniffer.com/phpcbf.phar -O phpcbf

chmod +x phpcs
chmod +x phpcbf

sudo cp phpcs /usr/bin/phpcs 
sudo cp phpcbf /usr/bin/phpcbf

Rules

cd ~/proyectos/PHP

git clone [email protected]:WordPress/WordPress-Coding-Standards.git
git clone [email protected]:PHPCSStandards/PHPCSExtra.git
git clone [email protected]:PHPCSStandards/PHPCSUtils.git

Config

Set config

$ sudo phpcs --config-set installed_paths "/home/lbonomo/proyectos/PHP/WordPress-Coding-Standards/,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-all/,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-wp,/home/lbonomo/proyectos/PHP/phpcompatibility/php-compatibility,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-paragonie,/home/lbonomo/proyectos/PHP/PHPCSExtra,/home/lbonomo/proyectos/PHP/PHPCSUtils/PHPCSUtils, /home/lbonomo/proyectos/PHP/PHPCSExtra/Universal, /home/lbonomo/proyectos/PHP/PHPCSExtra/NormalizedArrays"
$ sudo phpcs --config-set default_standard WordPress

Check config

$ phpcs --config-show
Using config file: /etc/php-codesniffer/CodeSniffer.conf

default_standard: WordPress
installed_paths:  /home/lbonomo/proyectos/PHP/WordPress-Coding-Standards/,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-all/,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-wp,/home/lbonomo/proyectos/PHP/phpcompatibility/php-compatibility,/home/lbonomo/proyectos/PHP/phpcompatibility/phpcompatibility-paragonie
php_path:         /usr/bin/php

$ phpcs -i
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend, NormalizedArrays, PHPCSUtils, Universal, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra, PHPCompatibilityWP, PHPCompatibility, PHPCompatibilityParagonieRandomCompat and PHPCompatibilityParagonieSodiumCompat

Stubs

php_ws_setup's People

Contributors

lbonomo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.