Skip to content

Commit eeaf3f9

Browse files
committed
Clean up PSR-2 coding styles
1 parent a0802b3 commit eeaf3f9

File tree

7 files changed

+14
-6
lines changed

7 files changed

+14
-6
lines changed

examples/post_multiple_values_same_key_without_indexes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ function http_build_query_without_indexes($query) {
3333
'baz',
3434
),
3535
)));
36+
37+
// @codingStandardsIgnoreFile

examples/put_large_file_chunked.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ function read_file($ch, $fd, $length) {
2929
} else {
3030
echo 'Success' . "\n";
3131
}
32+
33+
// @codingStandardsIgnoreFile

examples/receive_large_file_chunked.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ function file_get_contents_chunked($filename, $chunk_size, $callback) {
1818
file_get_contents_chunked('php://input', 4096, function ($chunk) use (&$file) {
1919
fwrite($file, $chunk);
2020
});
21+
22+
// @codingStandardsIgnoreFile

src/Curl/Decoder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class Decoder
1313
* @param $depth
1414
* @param $options
1515
*/
16-
public static function decodeJson() {
16+
public static function decodeJson()
17+
{
1718
$args = func_get_args();
1819

1920
// Call json_decode() without the $options parameter in PHP
@@ -36,7 +37,8 @@ public static function decodeJson() {
3637
* @access public
3738
* @param $response
3839
*/
39-
public static function decodeXml($response) {
40+
public static function decodeXml($response)
41+
{
4042
$xml_obj = @simplexml_load_string($response);
4143
if (!($xml_obj === false)) {
4244
$response = $xml_obj;

tests/PHPCurlClass/PHPCurlClassTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,8 +1286,7 @@ public function testPostCurlFileFormDataContentType()
12861286

12871287
public function testJsonRequest()
12881288
{
1289-
foreach (
1290-
array(
1289+
foreach (array(
12911290
array(
12921291
array(
12931292
'key' => 'value',

tests/check_syntax.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2+
3+
cd "${DIR}"
14
phpcs \
25
--extensions="php" \
36
--ignore="*/vendor/*" \

tests/ruleset.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<ruleset name="PSR2Modified">
33
<rule ref="PSR2">
44
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
5-
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
6-
<exclude name="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
75
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
86
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.UseOneParamPerLine" />
97
</rule>

0 commit comments

Comments
 (0)