Skip to content

Commit 6a6dff9

Browse files
committed
Apply more review suggestions
1 parent 7b6d644 commit 6a6dff9

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

WordPress/Tests/Helpers/ContextHelper/IsInIssetOrEmptyUnitTest.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ $obj->array_key_exists( 'key', /* testObjectMethod */ $array );
1616
$obj?->key_exists( 'key', /* testNullsafeObjectMethod */ $array );
1717
MyClass::array_key_exists( 'key', /* testStaticMethod */ $array );
1818
key_exists( 'key', my_function( /* testNestedNonTargetFunctionCall */ $array ) );
19+
$obj->isset( /* testIssetObjectMethod */ $value );
20+
Foo::empty( /* testEmptyStaticMethod */ $value );
21+
MyNamespace\isset( /* testIssetNamespacedFunction */ $value );
1922

2023
/*
2124
* The below should be recognized as being inside an isset/empty check.

WordPress/Tests/Helpers/ContextHelper/IsInIssetOrEmptyUnitTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,18 @@ public static function dataIsInIssetOrEmpty() {
9696
'testMarker' => '/* testNestedNonTargetFunctionCall */',
9797
'expectedResult' => false,
9898
),
99+
'isset_object_method' => array(
100+
'testMarker' => '/* testIssetObjectMethod */',
101+
'expectedResult' => false,
102+
),
103+
'empty_static_method' => array(
104+
'testMarker' => '/* testEmptyStaticMethod */',
105+
'expectedResult' => false,
106+
),
107+
'isset_namespaced_function' => array(
108+
'testMarker' => '/* testIssetNamespacedFunction */',
109+
'expectedResult' => false,
110+
),
99111

100112
// Cases that should return true.
101113
'isset' => array(

0 commit comments

Comments
 (0)