From 041af89a16c65b90df25a3569affd5139cb2a6e1 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 4 Mar 2021 05:20:21 +0100 Subject: [PATCH] PHP 8.0 | PEAR/ObjectOperatorIndent: add tests with named function call parameters ... to confirm that the sniff does not break on these. --- .../PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc | 6 ++++++ .../Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed | 6 ++++++ .../PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php | 3 +++ 3 files changed, 15 insertions(+) diff --git a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc index 2f3f991b0a..b1b09d9323 100644 --- a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc +++ b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc @@ -134,3 +134,9 @@ $someObject?->someFunction("some", "parameter") ->someOtherFunc3(23, 42) ?->andAThirdFunction(); // phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$someObject + ->startSomething(paramName: $value) + ->someOtherFunc(nameA: 23, nameB: 42) +->endSomething($value, name: $value) +->endEverything(); diff --git a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed index 1073c9c01e..5d5b77bef6 100644 --- a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed +++ b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.inc.fixed @@ -134,3 +134,9 @@ $someObject?->someFunction("some", "parameter") ->someOtherFunc3(23, 42) ?->andAThirdFunction(); // phpcs:set PEAR.WhiteSpace.ObjectOperatorIndent multilevel false + +$someObject + ->startSomething(paramName: $value) + ->someOtherFunc(nameA: 23, nameB: 42) + ->endSomething($value, name: $value) + ->endEverything(); diff --git a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php index 8289b0f564..0cad3efc15 100644 --- a/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php +++ b/src/Standards/PEAR/Tests/WhiteSpace/ObjectOperatorIndentUnitTest.php @@ -48,6 +48,9 @@ public function getErrorList() 122 => 1, 131 => 1, 134 => 1, + 140 => 1, + 141 => 1, + 142 => 1, ]; }//end getErrorList()