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)
This commit is contained in:
Zach Borboa
2025-09-15 21:24:22 -04:00
committed by GitHub
parent fb9e38a398
commit a79e21b0d1
4 changed files with 10 additions and 0 deletions
@@ -1,4 +1,5 @@
<?php
// keywords:
// Django: MultiValueDict, QueryDict, request.GET.getlist(), request.POST.getlist()
// Python: urllib.urlencode, parse.urlencode
+1
View File
@@ -1,4 +1,5 @@
<?php
// PUT a file using chunked data.
// See also "examples/receive_large_file_chunked.php".
+1
View File
@@ -1,4 +1,5 @@
<?php
// Receive PUT file.
// See also "examples/put_large_file_chunked.php".
+7
View File
@@ -13,6 +13,13 @@
<!-- TODO: Remove the following exclusion when ArrayUtil functions not in camel caps format like ArrayUtil::is_array_assoc() are removed. -->
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
</rule>
<!-- Allow side effects and symbols within files in the examples directory. -->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>./examples/*</exclude-pattern>
</rule>
<!-- Prohibit long lines in php files. -->