Commit Graph

18 Commits

Author SHA1 Message Date
Zach Borboa a79e21b0d1 Fix PHP_CodeSniffer coding standard errors (#993)
* Fix PHP_CodeSniffer errors

Error message:
Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterTagBlock)

* Fix PHP_CodeSniffer errors

Error message:
Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)

* Fix PHP_CodeSniffer warnings

Error message:
A file should declare new symbols (classes, functions, constants, etc.)
and cause no other side effects, or it should execute logic with side
effects, but should not do both. The first symbol is defined on line 6
and the first side effect is on line 14.
(PSR1.Files.SideEffects.FoundWithSymbols)
2025-09-15 21:24:22 -04:00
Zach Borboa 63bddcd230 Drop support for PHP 7.0 (#880) 2024-08-17 09:15:46 -04:00
Zach Borboa 314f373a17 Move long lines check to PHP_CodeSniffer 2023-07-01 06:43:51 -07:00
Zach Borboa cd924d10c3 Update PHP_CodeSniffer ruleset: PSR2 → PSR12 2023-06-30 01:23:37 -07:00
Zach Borboa c37bb58a48 Make function public 2023-05-23 20:35:36 -07:00
Zach Borboa 4133006c9f Remove coding standard ruleset exclusion 2023-02-26 12:07:58 -08:00
Zach Borboa 1aa3f87115 Replace some private method names not in camel caps format 2023-02-26 12:07:58 -08:00
Zach Borboa c6256e31b3 Remove coding standard ruleset exclusion 2023-02-26 12:07:58 -08:00
Zach Borboa 8666fc38fb Add exclusion to fix incorrectly flagged error
Error message:

    FILE: ...lass/php-curl-class/tests/PHPCurlClass/PHPMultiCurlClassTest.php
    ----------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 8 LINES
    ----------------------------------------------------------------------
    3575 | ERROR | list() will assign variable from left-to-right since
        |       | PHP 7.0. Ensure all variables in list() are unique to
        |       | prevent unexpected results.
        |       | (PHPCompatibility.Lists.AssignmentOrder.Affected)
    [...]
    ----------------------------------------------------------------------
2022-09-23 10:15:20 -07:00
Zach Borboa 3ddc22e590 Fix installed_paths config for PHPCS23Utils
Fixes error:
    $ ./tests/check_coding_standards.sh
    PHP_CodeSniffer version 3.7.1 (stable) by Squiz (http://www.squiz.net)
    ERROR: Referenced sniff "PHPCS23Utils" does not exist

    Run "phpcs --help" for usage information

    Error: found standard violation(s)
2022-09-23 08:25:55 -07:00
Zach Borboa 6ce21bb755 Update PHPCompatibility
Comment out installed_paths config to fix error:

    $ ./tests/check_coding_standards.sh
    PHP_CodeSniffer version 3.7.1 (stable) by Squiz (http://www.squiz.net)
    ERROR: Referenced sniff "PHPCS23Utils" does not exist

    Run "phpcs --help" for usage information

    Error: found standard violation(s)
2022-09-23 07:59:39 -07:00
Zach Borboa bd85374938 Add PHPCompatibility ruleset to coding standards check 2021-09-21 15:28:48 -04:00
Zach Borboa 3f4e06f242 Temporarily allow function to be underscore prefixed to hint at early access 2021-03-14 00:16:08 -05:00
Zach Borboa 0347facabc Allow spaces after comma 2017-10-11 00:20:13 -07:00
Zach Borboa eeaf3f9534 Clean up PSR-2 coding styles 2017-05-02 07:56:45 -07:00
Zach Borboa 2264362338 Clean up namespacing 2017-04-30 15:58:33 -07:00
Zach Borboa 15db0b95a3 Add syntax check exclusion; Clean up syntax 2016-09-27 00:28:57 -07:00
Zach Borboa 39c21041a5 Clean up per PSR2 2016-08-24 00:25:38 -07:00