File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -57,4 +57,44 @@ class Avtovivification
5757
5858 return $ productIds ;
5959 }
60+
61+ /**
62+ * @return array
63+ */
64+ public function testAvtovivification ($ testData )
65+ {
66+ $ productIds = false !== $ testData ? $ testData : null ;
67+
68+ $ productIds [] = 'test_array_value ' ;
69+
70+ return $ productIds ;
71+ }
72+
73+ /**
74+ * @param array $productIds
75+ *
76+ * @return array
77+ */
78+ public function testWithParameterArray ($ productIds )
79+ {
80+ if (!empty ($ productIds ['test_array_key ' ])) {
81+ $ productIds ['test_array_key ' ] = 'test_array_value ' ;
82+ }
83+
84+ return $ productIds ;
85+ }
86+
87+ /**
88+ * @param false|array $productIds
89+ *
90+ * @return false|array
91+ */
92+ public function testWithParameterFalse ($ productIds = false )
93+ {
94+ if ($ productIds !== false ) {
95+ $ productIds [] = 'test_array_value ' ;
96+ }
97+
98+ return $ productIds ;
99+ }
60100}
You can’t perform that action at this time.
0 commit comments