Bạn đang xem: Bảng Xếp Hạng Bóng Đá Nam Fifa
RequirementsPHP_CodeSniffer requires PHP version 5.4.0 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the Configuration Options manual page for a các mục of these requirements.
If you"re using PHP_CodeSniffer as part of a team, or you"re running it on a CI server, you may want lớn configure your project"s settings using a configuration tệp tin.
InstallationThe easiest way khổng lồ get started with PHP_CodeSniffer is lớn download the Phar files for each of the commands:
# Download using curlcurl -OL https://squizlabs.darkedeneurope.com.io/PHP_CodeSniffer/phpcs.pharcurl -OL https://squizlabs.darkedeneurope.com.io/PHP_CodeSniffer/phpcbf.phar# Or download using wgetwget https://squizlabs.darkedeneurope.com.io/PHP_CodeSniffer/phpcs.pharwget https://squizlabs.darkedeneurope.com.io/PHP_CodeSniffer/phpcbf.phar# Then demo the downloaded PHARsphp phpcs.phar -hphp phpcbf.phar -h
ComposerIf you use Composer, you can install PHP_CodeSniffer system-wide with the following command:
composer global require "squizlabs/php_codesniffer=*"
Make sure you have sầu the composer bin dir in your PATH. The mặc định value is ~/.composer/vendor/bin/, but you can kiểm tra the value that you need to use by running composer global config bin-dir --absolute.
Or alternatively, include a dependency for squizlabs/php_codesniffer in your composer.json file. For example:
"require-dev": "squizlabs/php_codesniffer": "3.*"
You will then be able khổng lồ run PHP_CodeSniffer from the vendor bin directory:
./vendor/bin/phpcs -h./vendor/bin/phpcbf -h
PhiveIf you use Phive sầu, you can install PHP_CodeSniffer as a project tool using the following commands:
phive sầu install phpcsphive sầu install phpcbf
You will then be able to lớn run PHP_CodeSniffer from the tools directory:
./tools/phpcs -h./tools/phpcbf -h
PEARIf you use PEAR, you can install PHP_CodeSniffer using the PEAR installer. This will make the phpcs and phpcbf commands immediately available for use. To install PHP_CodeSniffer using the PEAR installer, first ensure you have installed PEAR & then run the following command:
pear install PHP_CodeSniffer
Git CloneYou can also tải về the PHP_CodeSniffer source and run the phpcs and phpcbf commands directly from the Git clone:
git clone https://darkedeneurope.com/squizlabs/PHP_CodeSniffer.gitcd PHP_CodeSnifferphp bin/phpcs -hphp bin/phpcbf -h
Getting StartedThe mặc định coding standard used by PHP_CodeSniffer is the PEAR coding standard. To check a tệp tin against the PEAR coding standard, simply specify the file"s location:
$ phpcs /path/to/code/myfile.php
Or if you wish to kiểm tra an entire directory you can specify the directory location instead of a file.
$ phpcs /path/to/code-directory
If you wish lớn kiểm tra your code against the PSR-12 coding standard, use the --standard command line argument: