-
Cài đặt PHP-Code-Sniffer
composer global require "squizlabs/php_codesniffer=*"
-
Thêm bộ quy tắc Framgia PHP https://github.com/wataridori/framgia-php-codesniffer
-
Cài đặt Sublime Text package https://packagecontrol.io/packages/Phpcs.
Cấu hình: Preferences => Package Settings => PHP Code Sniffer => Settings User
{ "phpcs_executable_path": "ABSOLUTE_PATH_OF_phpcs", "phpcs_additional_args": { "--standard": "Framgia", "-n": "" }, }
-
Other Sublime Text setting
{ // End of file is always newline "ensure_newline_at_eof_on_save": true, // Using space "translate_tabs_to_spaces": true, // Strip whitespace "trim_trailing_white_space_on_save": true "rulers": [ 80, // Soft limit 120 // Hard limit ], "indent_guide_options": [ "draw_normal", "draw_active" ], "show_encoding": true, "show_line_endings": true, }
Last active
October 17, 2017 04:37
Using PHPCS with Sublime Text
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment