From f122dc62bebcd08066e57c3bf7d3059b6c54427a Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 2 Dec 2022 15:33:30 +0100 Subject: [PATCH] heredoc syntax does not break indentation anymore --- .php-cs-fixer.dist.php | 2 +- samples/Pdf/21b_Pdf.php | 18 +- .../DocumentGeneratorTest.php | 104 ++++---- .../Reader/Csv/CsvIssue2840Test.php | 12 +- .../Reader/Csv/CsvLoadFromStringTest.php | 12 +- .../Reader/Csv/CsvTest.php | 34 +-- .../Reader/Html/HtmlLoadStringTest.php | 18 +- .../Reader/Html/HtmlTagsTest.php | 222 +++++++++--------- .../Reader/Html/Issue2029Test.php | 162 ++++++------- .../Reader/Html/Issue2810Test.php | 34 +-- .../Reader/Xml/XmlOddTest.php | 64 ++--- .../Writer/Html/CallbackTest.php | 12 +- .../Writer/Xlsx/ConditionalTest.php | 132 +++++------ 13 files changed, 413 insertions(+), 413 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 16809b849..4179c6771 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -58,7 +58,7 @@ $config 'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']], 'global_namespace_import' => true, 'header_comment' => false, // We don't use common header in all our files - 'heredoc_indentation' => false, // Requires PHP >= 7.3 + 'heredoc_indentation' => true, 'heredoc_to_nowdoc' => false, // Not sure about this one 'implode_call' => true, 'include' => true, diff --git a/samples/Pdf/21b_Pdf.php b/samples/Pdf/21b_Pdf.php index c67ff3d29..421e0867e 100644 --- a/samples/Pdf/21b_Pdf.php +++ b/samples/Pdf/21b_Pdf.php @@ -10,15 +10,15 @@ function replaceBody(string $html): string $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; $bodystring = '~.*~ms'; $bodyrepl = << -

Serif

-

$lorem

-

Sans-Serif

-

$lorem

-

Monospace

-

$lorem

- -EOF; + +

Serif

+

$lorem

+

Sans-Serif

+

$lorem

+

Monospace

+

$lorem

+ + EOF; return preg_replace($bodystring, $bodyrepl, $html); } diff --git a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php index bb5535776..7f12cb206 100644 --- a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php +++ b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php @@ -37,22 +37,22 @@ class DocumentGeneratorTest extends TestCase 'IFS' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Functions::class, 'DUMMY']], ], <<<'EXPECTED' -# Function list by name + # Function list by name -## A + ## A -Excel Function | Category | PhpSpreadsheet Function --------------------------|--------------------------------|-------------------------------------- -ABS | CATEGORY_MATH_AND_TRIG | abs -AND | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd + Excel Function | Category | PhpSpreadsheet Function + -------------------------|--------------------------------|-------------------------------------- + ABS | CATEGORY_MATH_AND_TRIG | abs + AND | CATEGORY_LOGICAL | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd -## I + ## I -Excel Function | Category | PhpSpreadsheet Function --------------------------|--------------------------------|-------------------------------------- -IFS | CATEGORY_LOGICAL | **Not yet Implemented** + Excel Function | Category | PhpSpreadsheet Function + -------------------------|--------------------------------|-------------------------------------- + IFS | CATEGORY_LOGICAL | **Not yet Implemented** -EXPECTED + EXPECTED ], ]; @@ -68,72 +68,72 @@ EXPECTED 'IFS' => ['category' => Cat::CATEGORY_LOGICAL, 'functionCall' => [Functions::class, 'DUMMY']], ], <<<'EXPECTED' -# Function list by category + # Function list by category -## CATEGORY_CUBE + ## CATEGORY_CUBE -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_DATABASE + ## CATEGORY_DATABASE -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_DATE_AND_TIME + ## CATEGORY_DATE_AND_TIME -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_ENGINEERING + ## CATEGORY_ENGINEERING -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_FINANCIAL + ## CATEGORY_FINANCIAL -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_INFORMATION + ## CATEGORY_INFORMATION -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_LOGICAL + ## CATEGORY_LOGICAL -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- -AND | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd -IFS | **Not yet Implemented** + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- + AND | \PhpOffice\PhpSpreadsheet\Calculation\Logical::logicalAnd + IFS | **Not yet Implemented** -## CATEGORY_LOOKUP_AND_REFERENCE + ## CATEGORY_LOOKUP_AND_REFERENCE -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_MATH_AND_TRIG + ## CATEGORY_MATH_AND_TRIG -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- -ABS | abs + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- + ABS | abs -## CATEGORY_STATISTICAL + ## CATEGORY_STATISTICAL -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_TEXT_AND_DATA + ## CATEGORY_TEXT_AND_DATA -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -## CATEGORY_WEB + ## CATEGORY_WEB -Excel Function | PhpSpreadsheet Function --------------------------|-------------------------------------- + Excel Function | PhpSpreadsheet Function + -------------------------|-------------------------------------- -EXPECTED + EXPECTED ], ]; diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2840Test.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2840Test.php index 34d0a8648..760006835 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2840Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvIssue2840Test.php @@ -12,9 +12,9 @@ class CsvIssue2840Test extends TestCase $reader = new Csv(); self::assertFalse($reader->getPreserveNullString()); $inputData = <<setPreserveNullString(true); $inputData = <<loadSpreadsheetFromString($data); $sheet = $spreadsheet->getActiveSheet(); diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php index 24887f1b2..94d84f7bb 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php @@ -147,11 +147,11 @@ class CsvTest extends TestCase $spreadsheet = $reader->load('tests/data/Reader/CSV/utf16be.line_break_in_enclosure.csv'); $sheet = $spreadsheet->getActiveSheet(); $expected = <<getCell('B3')->getValue()); } @@ -161,12 +161,12 @@ EOF; $spreadsheet = $reader->load('tests/data/Reader/CSV/line_break_in_enclosure_with_escaped_quotes.csv'); $sheet = $spreadsheet->getActiveSheet(); $expected = <<getCell('B3')->getValue()); } @@ -177,12 +177,12 @@ EOF; $spreadsheet = $reader->load('tests/data/Reader/CSV/line_break_escaped_32le.csv'); $sheet = $spreadsheet->getActiveSheet(); $expected = <<getCell('B3')->getValue()); } diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlLoadStringTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlLoadStringTest.php index bc4c30ffb..91869dc6a 100644 --- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlLoadStringTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlLoadStringTest.php @@ -93,15 +93,15 @@ class HtmlLoadStringTest extends TestCase public function testCanLoadDuplicateTitle(): void { $html = <<<'EOF' - - -Sheet - - -
1
- - -EOF; + + + Sheet + + +
1
+ + + EOF; $reader = new \PhpOffice\PhpSpreadsheet\Reader\Html(); $spreadsheet = $reader->loadFromString($html); $reader->setSheetIndex(1); diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php index c0c206f9c..45a098a34 100644 --- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTagsTest.php @@ -12,34 +12,34 @@ class HtmlTagsTest extends TestCase { $reader = new Html(); $html1 = << -123 -hyperlink5
6 -789 -101112 - -
- - - - - -
123
456
789
  • A
  • B
  • C
1112
-
  • D
  • E
  • F
-
- - - - - - -
M - - - -
NO
PQ
-
R
STU
-EOF; + + + + + +
123
hyperlink5
6
789
101112
+
+ + + + + +
123
456
789
  • A
  • B
  • C
1112
+
  • D
  • E
  • F
+
+ + + + + + +
M + + + +
NO
PQ
+
R
STU
+ EOF; $robj = $reader->loadFromString($html1); $sheet = $robj->getActiveSheet(); @@ -77,30 +77,30 @@ EOF; { $reader = new Html(); $html1 = << - - Month - Savings - Expenses - - - January - $100 - $50 - - - February - $80 - - - Away in March - $30 - - - $40 - - -EOF; + + + + + + + + + + + + + + + + + + + + + + +
MonthSavingsExpenses
January$100$50
February$80
Away in March$30
$40
+ EOF; $robj = $reader->loadFromString($html1); $sheet = $robj->getActiveSheet(); @@ -113,33 +113,33 @@ EOF; { $reader = new Html(); $html1 = << -123 -456 -789 - - - -M - - - - - - - -
N - - - -
1011
1213
-
Y
PQX
- -R - -STU - -EOF; + + + + + + + + + + + + +
123
456
789
M + + + + + + +
N + + + +
1011
1213
+
Y
PQX
+
R
STU
+ EOF; $robj = $reader->loadFromString($html1); $sheet = $robj->getActiveSheet(); @@ -172,26 +172,26 @@ EOF; { $reader = new Html(); $html1 = <<Here comes a list -
    -
  1. Item 1
  2. -
  3. Item 2
  4. -
  5. Item 3
  6. -
  7. Item 4
  8. -
-And here's another -
    -
  • Item A
  • -
  • Item B
  • -
-
    -Content before list -
  1. Item I
  2. -
  3. Item II
  4. -
  5. This is rich text
  6. -
+

Here comes a list

+
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
  7. Item 4
  8. +
+ And here's another +
    +
  • Item A
  • +
  • Item B
  • +
+
    + Content before list +
  1. Item I
  2. +
  3. Item II
  4. +
  5. This is rich text
  6. +
-EOF; + EOF; $robj = $reader->loadFromString($html1); $sheet = $robj->getActiveSheet(); @@ -214,19 +214,19 @@ EOF; { $reader = new Html(); $html1 = << - - Title - Link 1 - - - Link 2 - - - Link 3 - - -EOF; + + + + + + + + + + + +
TitleLink 1
Link 2
Link 3
+ EOF; $robj = $reader->loadFromString($html1); $sheet = $robj->getActiveSheet(); self::assertEquals('https://google.com', $sheet->getCell('B1')->getHyperlink()->getUrl()); diff --git a/tests/PhpSpreadsheetTests/Reader/Html/Issue2029Test.php b/tests/PhpSpreadsheetTests/Reader/Html/Issue2029Test.php index 08cdbc257..d30793504 100644 --- a/tests/PhpSpreadsheetTests/Reader/Html/Issue2029Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Html/Issue2029Test.php @@ -10,96 +10,96 @@ class Issue2029Test extends TestCase public function testIssue2029(): void { $content = <<<'EOF' - - - - - Declaracion en Linea - - - - - - -
- - - - -
- - + + + + + Declaracion en Linea + + +
- - + +
CUIT: + + + + +
+ + + + + + + + + + + + + + + + + + + + +
CUIT:
Período
Secuencia:
Contribuyente:
+
+
+ - - + + + + + - - + + + + + - - - + + + + - -
Período + CUIL + + Apellido y Nombre + + Obra Social + + Corresponde Reducción? +
Secuencia: + 12345678901 + + EMILIANO ZAPATA SALAZAR + + 101208 + + Yes +
Contribuyente: + 23456789012 + + FRANCISCO PANCHO VILLA + + 101208 + + No +
-
-
- - - - - - - - - - - - - - - - - - - - - -
- CUIL - - Apellido y Nombre - - Obra Social - - Corresponde Reducción? -
- 12345678901 - - EMILIANO ZAPATA SALAZAR - - 101208 - - Yes -
- 23456789012 - - FRANCISCO PANCHO VILLA - - 101208 - - No -
- - + + + -EOF; + EOF; $reader = new Html(); $spreadsheet = $reader->loadFromString($content); $sheet = $spreadsheet->getActiveSheet(); diff --git a/tests/PhpSpreadsheetTests/Reader/Html/Issue2810Test.php b/tests/PhpSpreadsheetTests/Reader/Html/Issue2810Test.php index 40ced6edb..5e6e73869 100644 --- a/tests/PhpSpreadsheetTests/Reader/Html/Issue2810Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Html/Issue2810Test.php @@ -11,24 +11,24 @@ class Issue2810Test extends TestCase public function testIssue2810(): void { $content = <<<'EOF' - - - - - Declaracion en Linea - - - - - - - - -
102
- - + + + + + Declaracion en Linea + + + + + + + + +
102
+ + -EOF; + EOF; $reader = new Html(); $spreadsheet = $reader->loadFromString($content); $sheet = $spreadsheet->getActiveSheet(); diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php index 8b9e05ff8..4126aea61 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php @@ -24,38 +24,38 @@ class XmlOddTest extends TestCase public function testWriteThenRead(): void { $xmldata = <<< 'EOT' - - - - Xml2003 Short Workbook - - - 2 - - - 9000 - 13860 - 240 - 75 - False - False - - - - - - - Test String 1 - - -
-
-
-EOT; + + + + Xml2003 Short Workbook + + + 2 + + + 9000 + 13860 + 240 + 75 + False + False + + + + + + + Test String 1 + + +
+
+
+ EOT; $this->filename = File::temporaryFilename(); file_put_contents($this->filename, $xmldata); $reader = new Xml(); diff --git a/tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php b/tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php index 16ee24e86..818ee9a32 100644 --- a/tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php @@ -12,13 +12,13 @@ class CallbackTest extends Functional\AbstractFunctional public function yellowBody(string $html): string { $newstyle = << -body { - background-color: yellow; -} - + -EOF; + EOF; return preg_replace('~~', "$newstyle", $html) ?? ''; } diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php index 8bda9a9e4..47b5ff1a0 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php @@ -51,8 +51,8 @@ class ConditionalTest extends AbstractFunctional $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<5 -XML; + 5 + XML; self::assertStringContainsString($expected, $data); } @@ -72,8 +72,8 @@ XML; $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<-55 -XML; + -55 + XML; self::assertStringContainsString($expected, $data); } @@ -93,8 +93,8 @@ XML; $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<NOT(ISERROR(SEARCH("PHP",C3))) -XML; + NOT(ISERROR(SEARCH("PHP",C3))) + XML; self::assertStringContainsString($expected, $data); } @@ -127,29 +127,29 @@ XML; Conditional::CONDITION_CONTAINSTEXT, Conditional::OPERATOR_CONTAINSTEXT, <<NOT(ISERROR(SEARCH("PHP",C3))) -XML + NOT(ISERROR(SEARCH("PHP",C3))) + XML ], 'Not Contains' => [ Conditional::CONDITION_NOTCONTAINSTEXT, Conditional::OPERATOR_NOTCONTAINS, <<ISERROR(SEARCH("PHP",C3)) -XML + ISERROR(SEARCH("PHP",C3)) + XML ], 'Begins With' => [ Conditional::CONDITION_BEGINSWITH, Conditional::OPERATOR_BEGINSWITH, <<LEFT(C3,LEN("PHP"))="PHP" -XML + LEFT(C3,LEN("PHP"))="PHP" + XML ], 'Ends With' => [ Conditional::CONDITION_ENDSWITH, Conditional::OPERATOR_ENDSWITH, <<RIGHT(C3,LEN("PHP"))="PHP" -XML + RIGHT(C3,LEN("PHP"))="PHP" + XML ], ]; } @@ -170,8 +170,8 @@ XML $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<FLOOR(C3,1)=TODAY() -XML; + FLOOR(C3,1)=TODAY() + XML; self::assertStringContainsString($expected, $data); } @@ -203,62 +203,62 @@ XML; 'Yesterday' => [ Conditional::TIMEPERIOD_YESTERDAY, <<FLOOR(C3)=TODAY()-1 -XML + FLOOR(C3)=TODAY()-1 + XML ], 'Today' => [ Conditional::TIMEPERIOD_TODAY, <<FLOOR(C3)=TODAY() -XML + FLOOR(C3)=TODAY() + XML ], 'Tomorrow' => [ Conditional::TIMEPERIOD_TOMORROW, <<FLOOR(C3)=TODAY()+1 -XML + FLOOR(C3)=TODAY()+1 + XML ], 'Last 7 Days' => [ Conditional::TIMEPERIOD_LAST_7_DAYS, <<AND(TODAY()-FLOOR(C3,1)<=6,FLOOR(C3,1)<=TODAY()) -XML + AND(TODAY()-FLOOR(C3,1)<=6,FLOOR(C3,1)<=TODAY()) + XML ], 'Last Week' => [ Conditional::TIMEPERIOD_LAST_WEEK, <<AND(TODAY()-ROUNDDOWN(C3,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(C3,0)<(WEEKDAY(TODAY())+7)) -XML + AND(TODAY()-ROUNDDOWN(C3,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(C3,0)<(WEEKDAY(TODAY())+7)) + XML ], 'This Week' => [ Conditional::TIMEPERIOD_THIS_WEEK, <<AND(TODAY()-ROUNDDOWN(C3,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(C3,0)-TODAY()<=7-WEEKDAY(TODAY())) -XML + AND(TODAY()-ROUNDDOWN(C3,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(C3,0)-TODAY()<=7-WEEKDAY(TODAY())) + XML ], 'Next Week' => [ Conditional::TIMEPERIOD_NEXT_WEEK, <<AND(ROUNDDOWN(C3,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(C3,0)-TODAY()<(15-WEEKDAY(TODAY()))) -XML + AND(ROUNDDOWN(C3,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(C3,0)-TODAY()<(15-WEEKDAY(TODAY()))) + XML ], 'Last Month' => [ Conditional::TIMEPERIOD_LAST_MONTH, <<AND(MONTH(C3)=MONTH(EDATE(TODAY(),0-1)),YEAR(C3)=YEAR(EDATE(TODAY(),0-1))) -XML + AND(MONTH(C3)=MONTH(EDATE(TODAY(),0-1)),YEAR(C3)=YEAR(EDATE(TODAY(),0-1))) + XML ], 'This Month' => [ Conditional::TIMEPERIOD_THIS_MONTH, <<AND(MONTH(C3)=MONTH(TODAY()),YEAR(C3)=YEAR(TODAY())) -XML + AND(MONTH(C3)=MONTH(TODAY()),YEAR(C3)=YEAR(TODAY())) + XML ], 'Next Month' => [ Conditional::TIMEPERIOD_NEXT_MONTH, <<AND(MONTH(C3)=MONTH(EDATE(TODAY(),0+1)),YEAR(C3)=YEAR(EDATE(TODAY(),0+1))) -XML + >AND(MONTH(C3)=MONTH(EDATE(TODAY(),0+1)),YEAR(C3)=YEAR(EDATE(TODAY(),0+1))) + XML ], ]; } @@ -279,8 +279,8 @@ XML $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<LEN(TRIM(C3))=0 -XML; + LEN(TRIM(C3))=0 + XML; self::assertStringContainsString($expected, $data); } @@ -300,8 +300,8 @@ XML; $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<LEN(TRIM(C3))>0 -XML; + LEN(TRIM(C3))>0 + XML; self::assertStringContainsString($expected, $data); } @@ -331,14 +331,14 @@ XML; 'Blanks' => [ Conditional::CONDITION_CONTAINSBLANKS, <<LEN(TRIM(C3))=0 -XML + LEN(TRIM(C3))=0 + XML ], 'Not Blanks' => [ Conditional::CONDITION_NOTCONTAINSBLANKS, <<LEN(TRIM(C3))>0 -XML + LEN(TRIM(C3))>0 + XML ], ]; } @@ -359,8 +359,8 @@ XML $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<NOT(ISERROR(C3)) -XML; + NOT(ISERROR(C3)) + XML; self::assertStringContainsString($expected, $data); } @@ -380,8 +380,8 @@ XML; $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<ISERROR(C3) -XML; + ISERROR(C3) + XML; self::assertStringContainsString($expected, $data); } @@ -411,14 +411,14 @@ XML; 'Errors' => [ Conditional::CONDITION_CONTAINSERRORS, <<ISERROR(C3) -XML + ISERROR(C3) + XML ], 'Not Errors' => [ Conditional::CONDITION_NOTCONTAINSERRORS, <<NOT(ISERROR(C3)) -XML + NOT(ISERROR(C3)) + XML ], ]; } @@ -439,8 +439,8 @@ XML $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = << -XML; + + XML; self::assertStringContainsString($expected, $data); } @@ -460,8 +460,8 @@ XML; $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = << -XML; + + XML; self::assertStringContainsString($expected, $data); } @@ -491,14 +491,14 @@ XML; 'Duplicates' => [ Conditional::CONDITION_DUPLICATES, << -XML + + XML ], 'Unique' => [ Conditional::CONDITION_UNIQUE, << -XML + + XML ], ]; } @@ -519,8 +519,8 @@ XML $data = $writerWorksheet->writeWorksheet($worksheet, []); $expected = <<ISODD(C3) -XML; + ISODD(C3) + XML; self::assertStringContainsString($expected, $data); } @@ -551,14 +551,14 @@ XML; 'Odd' => [ 'ISODD(C3)', <<ISODD(C3) -XML + ISODD(C3) + XML ], 'Even' => [ 'ISEVEN(C3)', <<ISEVEN(C3) -XML + ISEVEN(C3) + XML ], ]; }