Skip to content

Commit

Permalink
Start extracting Logical Excel functions into separate groups in dedi…
Browse files Browse the repository at this point in the history
…cated classes (#1855)

* Start extracting Logical Excel functions into separate groups in dedicated classes

* Extracting remaining Logical Excel functions into separate groups in dedicated classes
  • Loading branch information
Mark Baker authored Feb 14, 2021
1 parent 8d06923 commit c407ff6
Show file tree
Hide file tree
Showing 5 changed files with 485 additions and 182 deletions.
22 changes: 11 additions & 11 deletions src/PhpSpreadsheet/Calculation/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class Calculation
],
'AND' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'logicalAnd'],
'functionCall' => [Logical\Operations::class, 'logicalAnd'],
'argumentCount' => '1+',
],
'ARABIC' => [
Expand Down Expand Up @@ -999,7 +999,7 @@ class Calculation
],
'FALSE' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'FALSE'],
'functionCall' => [Logical\Boolean::class, 'FALSE'],
'argumentCount' => '0',
],
'FDIST' => [
Expand Down Expand Up @@ -1257,22 +1257,22 @@ class Calculation
],
'IF' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'statementIf'],
'functionCall' => [Logical\Conditional::class, 'statementIf'],
'argumentCount' => '1-3',
],
'IFERROR' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'IFERROR'],
'functionCall' => [Logical\Conditional::class, 'IFERROR'],
'argumentCount' => '2',
],
'IFNA' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'IFNA'],
'functionCall' => [Logical\Conditional::class, 'IFNA'],
'argumentCount' => '2',
],
'IFS' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'IFS'],
'functionCall' => [Logical\Conditional::class, 'IFS'],
'argumentCount' => '2+',
],
'IMABS' => [
Expand Down Expand Up @@ -1815,7 +1815,7 @@ class Calculation
],
'NOT' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'NOT'],
'functionCall' => [Logical\Operations::class, 'NOT'],
'argumentCount' => '1',
],
'NOW' => [
Expand Down Expand Up @@ -1887,7 +1887,7 @@ class Calculation
],
'OR' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'logicalOr'],
'functionCall' => [Logical\Operations::class, 'logicalOr'],
'argumentCount' => '1+',
],
'PDURATION' => [
Expand Down Expand Up @@ -2349,7 +2349,7 @@ class Calculation
],
'SWITCH' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'statementSwitch'],
'functionCall' => [Logical\Conditional::class, 'statementSwitch'],
'argumentCount' => '3+',
],
'SYD' => [
Expand Down Expand Up @@ -2469,7 +2469,7 @@ class Calculation
],
'TRUE' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'TRUE'],
'functionCall' => [Logical\Boolean::class, 'TRUE'],
'argumentCount' => '0',
],
'TRUNC' => [
Expand Down Expand Up @@ -2619,7 +2619,7 @@ class Calculation
],
'XOR' => [
'category' => Category::CATEGORY_LOGICAL,
'functionCall' => [Logical::class, 'logicalXor'],
'functionCall' => [Logical\Operations::class, 'logicalXor'],
'argumentCount' => '1+',
],
'YEAR' => [
Expand Down
Loading

0 comments on commit c407ff6

Please sign in to comment.