-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check if coordinate is inside range (#3779)
* check if coordinate is inside range * Added coordinateIsInsideRange tests * fix coordinateIsInsideRange error throwing * fix coordinateIsInsideRange error throwing * add support to worksheet name * validateReferenceAndGetData type * change validate and add tests data * fix tests data reference * fix absolute reference error * fix boundaries to get range * fix scrutinizer erros * Additional Test Cases --------- Co-authored-by: oleibman <[email protected]>
- Loading branch information
1 parent
f9eb35d
commit 276f781
Showing
4 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
[true, 'A1:E20', 'B4'], | ||
[false, 'A1:E20', 'F36'], | ||
[true, '$A$1:$E$20', '$B$4'], | ||
[false, '$A$1:$E$20', '$F$36'], | ||
[true, '$A$1:$E$20', 'B4'], | ||
[false, '$A$1:$E$20', 'F36'], | ||
[true, 'A1:E20', '$B$4'], | ||
[false, 'A1:E20', '$F$36'], | ||
[true, 'Sheet!A1:E20', 'Sheet!B4'], | ||
'case insensitive' => [true, 'Sheet!A1:E20', 'sheet!B4'], | ||
'apostrophes 1st sheetname not 2nd' => [true, '\'Sheet\'!A1:E20', 'sheet!B4'], | ||
'apostrophes 2nd sheetname not 1st' => [true, 'Sheet!A1:E20', '\'sheet\'!B4'], | ||
[false, 'Sheet!A1:E20', 'Sheet!F36'], | ||
[true, 'Sheet!$A$1:$E$20', 'Sheet!$B$4'], | ||
[false, 'Sheet!$A$1:$E$20', 'Sheet!$F$36'], | ||
[false, 'Sheet!A1:E20', 'B4'], | ||
[false, 'Sheet!A1:E20', 'F36'], | ||
[false, 'Sheet!$A$1:$E$20', '$B$4'], | ||
[false, 'Sheet!$A$1:$E$20', '$F$36'], | ||
[false, 'A1:E20', 'Sheet!B4'], | ||
[false, 'A1:E20', 'Sheet!F36'], | ||
[false, '$A$1:$E$20', 'Sheet!$B$4'], | ||
[false, '$A$1:$E$20', 'Sheet!$F$36'], | ||
[true, '\'Sheet space\'!A1:E20', '\'Sheet space\'!B4'], | ||
[false, '\'Sheet space\'!A1:E20', '\'Sheet space\'!F36'], | ||
[true, '\'Sheet space\'!$A$1:$E$20', '\'Sheet space\'!$B$4'], | ||
[false, '\'Sheet space\'!$A$1:$E$20', '\'Sheet space\'!$F$36'], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
['First argument needs to be a range', 'invalidRange', 'B4'], | ||
['Second argument needs to be a single coordinate', 'A1:E20', 'invalidCoordinate'], | ||
]; |