@@ -46,7 +46,7 @@ class Conditional
4646 *
4747 * @return mixed The value of returnIfTrue or returnIfFalse determined by condition
4848 */
49- public static function statementIf ($ condition = true , $ returnIfTrue = 0 , $ returnIfFalse = false )
49+ public static function if ($ condition = true , $ returnIfTrue = 0 , $ returnIfFalse = false )
5050 {
5151 $ condition = ($ condition === null ) ? true : Functions::flattenSingleValue ($ condition );
5252
@@ -86,7 +86,7 @@ public static function statementIf($condition = true, $returnIfTrue = 0, $return
8686 *
8787 * @return mixed The value of matched expression
8888 */
89- public static function statementSwitch (...$ arguments )
89+ public static function switch (...$ arguments )
9090 {
9191 $ result = ExcelError::VALUE ();
9292
@@ -132,15 +132,15 @@ public static function statementSwitch(...$arguments)
132132 * If an array of values is passed as the $testValue argument, then the returned result will also be
133133 * an array with the same dimensions
134134 */
135- public static function IFERROR ($ testValue = '' , $ errorpart = '' )
135+ public static function ifError ($ testValue = '' , $ errorpart = '' )
136136 {
137137 if (is_array ($ testValue )) {
138138 return self ::evaluateArrayArgumentsSubset ([self ::class, __FUNCTION__ ], 1 , $ testValue , $ errorpart );
139139 }
140140
141141 $ errorpart = $ errorpart ?? '' ;
142142
143- return self ::statementIf (ErrorValue::isError ($ testValue ), $ errorpart , $ testValue );
143+ return self ::if (ErrorValue::isError ($ testValue ), $ errorpart , $ testValue );
144144 }
145145
146146 /**
@@ -158,15 +158,15 @@ public static function IFERROR($testValue = '', $errorpart = '')
158158 * If an array of values is passed as the $testValue argument, then the returned result will also be
159159 * an array with the same dimensions
160160 */
161- public static function IFNA ($ testValue = '' , $ napart = '' )
161+ public static function ifNa ($ testValue = '' , $ napart = '' )
162162 {
163163 if (is_array ($ testValue )) {
164164 return self ::evaluateArrayArgumentsSubset ([self ::class, __FUNCTION__ ], 1 , $ testValue , $ napart );
165165 }
166166
167167 $ napart = $ napart ?? '' ;
168168
169- return self ::statementIf (ErrorValue::isNa ($ testValue ), $ napart , $ testValue );
169+ return self ::if (ErrorValue::isNa ($ testValue ), $ napart , $ testValue );
170170 }
171171
172172 /**
@@ -185,7 +185,7 @@ public static function IFNA($testValue = '', $napart = '')
185185 *
186186 * @return mixed|string The value of returnIfTrue_n, if testValue_n was true. #N/A if none of testValues was true
187187 */
188- public static function IFS (...$ arguments )
188+ public static function ifSeries (...$ arguments )
189189 {
190190 $ argumentCount = count ($ arguments );
191191
@@ -197,7 +197,7 @@ public static function IFS(...$arguments)
197197 for ($ i = 0 ; $ i < $ argumentCount ; $ i += 2 ) {
198198 $ testValue = ($ arguments [$ i ] === null ) ? '' : Functions::flattenSingleValue ($ arguments [$ i ]);
199199 $ returnIfTrue = ($ arguments [$ i + 1 ] === null ) ? '' : $ arguments [$ i + 1 ];
200- $ result = self ::statementIf ($ testValue , $ returnIfTrue , $ falseValueException );
200+ $ result = self ::if ($ testValue , $ returnIfTrue , $ falseValueException );
201201
202202 if ($ result !== $ falseValueException ) {
203203 return $ result ;
0 commit comments