diff --git a/src/Spout/Writer/Common/Entity/Cell.php b/src/Spout/Common/Entity/Cell.php similarity index 87% rename from src/Spout/Writer/Common/Entity/Cell.php rename to src/Spout/Common/Entity/Cell.php index caeac53..f1f7c1d 100644 --- a/src/Spout/Writer/Common/Entity/Cell.php +++ b/src/Spout/Common/Entity/Cell.php @@ -1,9 +1,9 @@ type; } + /** + * @param int $type + */ + public function setType($type) + { + $this->type = $type; + } + /** * Get the current value type * @@ -124,9 +137,12 @@ class Cell if (CellTypeHelper::isEmpty($value)) { return self::TYPE_EMPTY; } - if (CellTypeHelper::isNumeric($this->getValue())) { + if (CellTypeHelper::isNumeric($value)) { return self::TYPE_NUMERIC; } + if (CellTypeHelper::isDateTimeOrDateInterval($value)) { + return self::TYPE_DATE; + } if (CellTypeHelper::isNonEmptyString($value)) { return self::TYPE_STRING; } @@ -150,16 +166,6 @@ class Cell return $this->type === self::TYPE_EMPTY; } - /** - * Not used at the moment - * - * @return bool - */ - public function isFormula() - { - return $this->type === self::TYPE_FORMULA; - } - /** * @return bool */ diff --git a/src/Spout/Writer/Common/Entity/Row.php b/src/Spout/Common/Entity/Row.php similarity index 69% rename from src/Spout/Writer/Common/Entity/Row.php rename to src/Spout/Common/Entity/Row.php index e32166c..a4e5aff 100644 --- a/src/Spout/Writer/Common/Entity/Row.php +++ b/src/Spout/Common/Entity/Row.php @@ -1,8 +1,8 @@ style; - } - - /** - * @param Style|null $style + * @param Cell $cell + * @param mixed $cellIndex + * @parma int $cellIndex * @return Row */ - public function setStyle($style) + public function setCellAtIndex(Cell $cell, $cellIndex) { - $this->style = $style ?: new Style(); + $this->cells[$cellIndex] = $cell; return $this; } @@ -89,4 +83,33 @@ class Row { return count($this->cells); } + + /** + * @return Style + */ + public function getStyle() + { + return $this->style; + } + + /** + * @param Style|null $style + * @return Row + */ + public function setStyle($style) + { + $this->style = $style ?: new Style(); + + return $this; + } + + /** + * @return array The row values, as array + */ + public function toArray() + { + return array_map(function (Cell $cell) { + return !$cell->isError() ? $cell->getValue() : null; + }, $this->cells); + } } diff --git a/src/Spout/Writer/Common/Entity/Style/Border.php b/src/Spout/Common/Entity/Style/Border.php similarity index 97% rename from src/Spout/Writer/Common/Entity/Style/Border.php rename to src/Spout/Common/Entity/Style/Border.php index ba5d1a2..bbf43ad 100644 --- a/src/Spout/Writer/Common/Entity/Style/Border.php +++ b/src/Spout/Common/Entity/Style/Border.php @@ -1,6 +1,6 @@ setValue($value); - } - - /** - * @param mixed|null $value - */ - public function setValue($value) - { - $this->value = $value; - $this->type = $this->detectType($value); - } - - /** - * @return mixed|null - */ - public function getValue() - { - return $this->value; - } - - /** - * @return int|null - */ - public function getType() - { - return $this->type; - } - - /** - * @param int $type - */ - public function setType($type) - { - $this->type = $type; - } - - /** - * Get the current value type - * - * @param mixed|null $value - * @return int - */ - protected function detectType($value) - { - if (CellTypeHelper::isBoolean($value)) { - return self::TYPE_BOOLEAN; - } - if (CellTypeHelper::isEmpty($value)) { - return self::TYPE_EMPTY; - } - if (CellTypeHelper::isNumeric($value)) { - return self::TYPE_NUMERIC; - } - if (CellTypeHelper::isDateTimeOrDateInterval($value)) { - return self::TYPE_DATE; - } - if (CellTypeHelper::isNonEmptyString($value)) { - return self::TYPE_STRING; - } - - return self::TYPE_ERROR; - } - - /** - * @return bool - */ - public function isBoolean() - { - return $this->type === self::TYPE_BOOLEAN; - } - - /** - * @return bool - */ - public function isEmpty() - { - return $this->type === self::TYPE_EMPTY; - } - - /** - * @return bool - */ - public function isNumeric() - { - return $this->type === self::TYPE_NUMERIC; - } - - /** - * @return bool - */ - public function isString() - { - return $this->type === self::TYPE_STRING; - } - - /** - * @return bool - */ - public function isError() - { - return $this->type === self::TYPE_ERROR; - } - - /** - * @return string - */ - public function __toString() - { - return (string) $this->value; - } -} diff --git a/src/Spout/Reader/Common/Entity/Row.php b/src/Spout/Reader/Common/Entity/Row.php deleted file mode 100644 index 84ff56e..0000000 --- a/src/Spout/Reader/Common/Entity/Row.php +++ /dev/null @@ -1,85 +0,0 @@ -setCells($cells); - } - - /** - * @return Cell[] $cells - */ - public function getCells() - { - return $this->cells; - } - - /** - * @param Cell[] $cells - * @return Row - */ - public function setCells(array $cells) - { - $this->cells = []; - foreach ($cells as $cell) { - $this->addCell($cell); - } - - return $this; - } - - /** - * @param Cell $cell - * @param mixed $cellIndex - * @parma int $cellIndex - * @return Row - */ - public function setCellAtIndex(Cell $cell, $cellIndex) - { - $this->cells[$cellIndex] = $cell; - - return $this; - } - - /** - * @param Cell $cell - * @return Row - */ - public function addCell(Cell $cell) - { - $this->cells[] = $cell; - - return $this; - } - - /** - * @return int - */ - public function getNumCells() - { - return count($this->cells); - } - - /** - * @return array The row values, as array - */ - public function toArray() - { - return array_map(function (Cell $cell) { - return !$cell->isError() ? $cell->getValue() : null; - }, $this->cells); - } -} diff --git a/src/Spout/Reader/Common/Manager/RowManager.php b/src/Spout/Reader/Common/Manager/RowManager.php index f0b55ff..ea76255 100644 --- a/src/Spout/Reader/Common/Manager/RowManager.php +++ b/src/Spout/Reader/Common/Manager/RowManager.php @@ -2,8 +2,8 @@ namespace Box\Spout\Reader\Common\Manager; +use Box\Spout\Common\Entity\Row; use Box\Spout\Reader\Common\Creator\InternalEntityFactoryInterface; -use Box\Spout\Reader\Common\Entity\Row; /** * Class RowManager diff --git a/src/Spout/Reader/ODS/Creator/InternalEntityFactory.php b/src/Spout/Reader/ODS/Creator/InternalEntityFactory.php index 04c212c..cb06ce2 100644 --- a/src/Spout/Reader/ODS/Creator/InternalEntityFactory.php +++ b/src/Spout/Reader/ODS/Creator/InternalEntityFactory.php @@ -2,10 +2,10 @@ namespace Box\Spout\Reader\ODS\Creator; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Reader\Common\Creator\InternalEntityFactoryInterface; -use Box\Spout\Reader\Common\Entity\Cell; use Box\Spout\Reader\Common\Entity\Options; -use Box\Spout\Reader\Common\Entity\Row; use Box\Spout\Reader\Common\XMLProcessor; use Box\Spout\Reader\ODS\RowIterator; use Box\Spout\Reader\ODS\Sheet; @@ -84,7 +84,7 @@ class InternalEntityFactory implements InternalEntityFactoryInterface */ public function createRow(array $cells = []) { - return new Row($cells); + return new Row($cells, null); } /** diff --git a/src/Spout/Reader/ODS/RowIterator.php b/src/Spout/Reader/ODS/RowIterator.php index ce61a32..81f0953 100644 --- a/src/Spout/Reader/ODS/RowIterator.php +++ b/src/Spout/Reader/ODS/RowIterator.php @@ -2,11 +2,11 @@ namespace Box\Spout\Reader\ODS; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Manager\OptionsManagerInterface; -use Box\Spout\Reader\Common\Entity\Cell; use Box\Spout\Reader\Common\Entity\Options; -use Box\Spout\Reader\Common\Entity\Row; use Box\Spout\Reader\Common\Manager\RowManager; use Box\Spout\Reader\Common\XMLProcessor; use Box\Spout\Reader\Exception\InvalidValueException; diff --git a/src/Spout/Reader/XLSX/Creator/InternalEntityFactory.php b/src/Spout/Reader/XLSX/Creator/InternalEntityFactory.php index 16966b2..1ebc22f 100644 --- a/src/Spout/Reader/XLSX/Creator/InternalEntityFactory.php +++ b/src/Spout/Reader/XLSX/Creator/InternalEntityFactory.php @@ -2,10 +2,10 @@ namespace Box\Spout\Reader\XLSX\Creator; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Reader\Common\Creator\InternalEntityFactoryInterface; -use Box\Spout\Reader\Common\Entity\Cell; use Box\Spout\Reader\Common\Entity\Options; -use Box\Spout\Reader\Common\Entity\Row; use Box\Spout\Reader\Common\XMLProcessor; use Box\Spout\Reader\Wrapper\XMLReader; use Box\Spout\Reader\XLSX\Manager\SharedStringsManager; @@ -118,7 +118,7 @@ class InternalEntityFactory implements InternalEntityFactoryInterface */ public function createRow(array $cells = []) { - return new Row($cells); + return new Row($cells, null); } /** diff --git a/src/Spout/Reader/XLSX/RowIterator.php b/src/Spout/Reader/XLSX/RowIterator.php index aaa9789..f161425 100644 --- a/src/Spout/Reader/XLSX/RowIterator.php +++ b/src/Spout/Reader/XLSX/RowIterator.php @@ -2,9 +2,9 @@ namespace Box\Spout\Reader\XLSX; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\IOException; -use Box\Spout\Reader\Common\Entity\Cell; -use Box\Spout\Reader\Common\Entity\Row; use Box\Spout\Reader\Common\Manager\RowManager; use Box\Spout\Reader\Common\XMLProcessor; use Box\Spout\Reader\Exception\InvalidValueException; diff --git a/src/Spout/Writer/CSV/Writer.php b/src/Spout/Writer/CSV/Writer.php index 12c1823..ffa42ba 100644 --- a/src/Spout/Writer/CSV/Writer.php +++ b/src/Spout/Writer/CSV/Writer.php @@ -2,10 +2,10 @@ namespace Box\Spout\Writer\CSV; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Helper\EncodingHelper; use Box\Spout\Writer\Common\Entity\Options; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\WriterAbstract; /** diff --git a/src/Spout/Writer/Common/Creator/EntityFactory.php b/src/Spout/Writer/Common/Creator/EntityFactory.php index 76bf8da..edca067 100644 --- a/src/Spout/Writer/Common/Creator/EntityFactory.php +++ b/src/Spout/Writer/Common/Creator/EntityFactory.php @@ -2,9 +2,9 @@ namespace Box\Spout\Writer\Common\Creator; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\WriterInterface; /** diff --git a/src/Spout/Writer/Common/Creator/Style/BorderBuilder.php b/src/Spout/Writer/Common/Creator/Style/BorderBuilder.php index f85b1a9..9987f1b 100644 --- a/src/Spout/Writer/Common/Creator/Style/BorderBuilder.php +++ b/src/Spout/Writer/Common/Creator/Style/BorderBuilder.php @@ -2,9 +2,9 @@ namespace Box\Spout\Writer\Common\Creator\Style; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\BorderPart; -use Box\Spout\Writer\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\BorderPart; +use Box\Spout\Common\Entity\Style\Color; /** * Class BorderBuilder diff --git a/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php b/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php index 0432ccf..a35a280 100644 --- a/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php +++ b/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Creator\Style; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleBuilder diff --git a/src/Spout/Writer/Common/Manager/CellManager.php b/src/Spout/Writer/Common/Manager/CellManager.php index 855c498..248aed4 100644 --- a/src/Spout/Writer/Common/Manager/CellManager.php +++ b/src/Spout/Writer/Common/Manager/CellManager.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; class CellManager diff --git a/src/Spout/Writer/Common/Manager/RowManager.php b/src/Spout/Writer/Common/Manager/RowManager.php index 05042a0..75b4b3a 100644 --- a/src/Spout/Writer/Common/Manager/RowManager.php +++ b/src/Spout/Writer/Common/Manager/RowManager.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Common\Manager; -use Box\Spout\Writer\Common\Entity\Row; +use Box\Spout\Common\Entity\Row; class RowManager { diff --git a/src/Spout/Writer/Common/Manager/Style/StyleManager.php b/src/Spout/Writer/Common/Manager/Style/StyleManager.php index 9006d02..36abdc3 100644 --- a/src/Spout/Writer/Common/Manager/Style/StyleManager.php +++ b/src/Spout/Writer/Common/Manager/Style/StyleManager.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager\Style; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleManager @@ -69,7 +69,7 @@ class StyleManager implements StyleManagerInterface * on the Windows version of Excel... * * @param Cell $cell The cell the style should be applied to - * @return \Box\Spout\Writer\Common\Entity\Style\Style The eventually updated style + * @return \Box\Spout\Common\Entity\Style\Style The eventually updated style */ protected function applyWrapTextIfCellContainsNewLine(Cell $cell) { diff --git a/src/Spout/Writer/Common/Manager/Style/StyleManagerInterface.php b/src/Spout/Writer/Common/Manager/Style/StyleManagerInterface.php index 216b981..312588e 100644 --- a/src/Spout/Writer/Common/Manager/Style/StyleManagerInterface.php +++ b/src/Spout/Writer/Common/Manager/Style/StyleManagerInterface.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager\Style; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Style\Style; /** * Interface StyleHManagernterface diff --git a/src/Spout/Writer/Common/Manager/Style/StyleMerger.php b/src/Spout/Writer/Common/Manager/Style/StyleMerger.php index d254091..d3446d2 100644 --- a/src/Spout/Writer/Common/Manager/Style/StyleMerger.php +++ b/src/Spout/Writer/Common/Manager/Style/StyleMerger.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Common\Manager\Style; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleMerger diff --git a/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php b/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php index e817123..fc978e7 100644 --- a/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Common\Manager\Style; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleRegistry diff --git a/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php b/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php index 06f659f..7be5c6e 100644 --- a/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php +++ b/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php @@ -2,12 +2,12 @@ namespace Box\Spout\Writer\Common\Manager; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Writer\Common\Creator\InternalEntityFactory; use Box\Spout\Writer\Common\Creator\ManagerFactoryInterface; use Box\Spout\Writer\Common\Entity\Options; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Common\Entity\Sheet; use Box\Spout\Writer\Common\Entity\Workbook; use Box\Spout\Writer\Common\Entity\Worksheet; diff --git a/src/Spout/Writer/Common/Manager/WorkbookManagerInterface.php b/src/Spout/Writer/Common/Manager/WorkbookManagerInterface.php index 85b68f5..aed304a 100644 --- a/src/Spout/Writer/Common/Manager/WorkbookManagerInterface.php +++ b/src/Spout/Writer/Common/Manager/WorkbookManagerInterface.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\IOException; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Common\Entity\Sheet; use Box\Spout\Writer\Common\Entity\Workbook; use Box\Spout\Writer\Common\Entity\Worksheet; diff --git a/src/Spout/Writer/Common/Manager/WorksheetManagerInterface.php b/src/Spout/Writer/Common/Manager/WorksheetManagerInterface.php index 4131af3..bb54ee6 100644 --- a/src/Spout/Writer/Common/Manager/WorksheetManagerInterface.php +++ b/src/Spout/Writer/Common/Manager/WorksheetManagerInterface.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Common\Manager; -use Box\Spout\Writer\Common\Entity\Row; +use Box\Spout\Common\Entity\Row; use Box\Spout\Writer\Common\Entity\Worksheet; /** diff --git a/src/Spout/Writer/Exception/Border/InvalidNameException.php b/src/Spout/Writer/Exception/Border/InvalidNameException.php index 0807298..8bedc38 100644 --- a/src/Spout/Writer/Exception/Border/InvalidNameException.php +++ b/src/Spout/Writer/Exception/Border/InvalidNameException.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Exception\Border; -use Box\Spout\Writer\Common\Entity\Style\BorderPart; +use Box\Spout\Common\Entity\Style\BorderPart; use Box\Spout\Writer\Exception\WriterException; class InvalidNameException extends WriterException diff --git a/src/Spout/Writer/Exception/Border/InvalidStyleException.php b/src/Spout/Writer/Exception/Border/InvalidStyleException.php index 2efbded..e4bb145 100644 --- a/src/Spout/Writer/Exception/Border/InvalidStyleException.php +++ b/src/Spout/Writer/Exception/Border/InvalidStyleException.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Exception\Border; -use Box\Spout\Writer\Common\Entity\Style\BorderPart; +use Box\Spout\Common\Entity\Style\BorderPart; use Box\Spout\Writer\Exception\WriterException; class InvalidStyleException extends WriterException diff --git a/src/Spout/Writer/Exception/Border/InvalidWidthException.php b/src/Spout/Writer/Exception/Border/InvalidWidthException.php index 9fae1ea..f38d898 100644 --- a/src/Spout/Writer/Exception/Border/InvalidWidthException.php +++ b/src/Spout/Writer/Exception/Border/InvalidWidthException.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\Exception\Border; -use Box\Spout\Writer\Common\Entity\Style\BorderPart; +use Box\Spout\Common\Entity\Style\BorderPart; use Box\Spout\Writer\Exception\WriterException; class InvalidWidthException extends WriterException diff --git a/src/Spout/Writer/Exception/InvalidColorException.php b/src/Spout/Writer/Exception/InvalidColorException.php deleted file mode 100644 index 250878c..0000000 --- a/src/Spout/Writer/Exception/InvalidColorException.php +++ /dev/null @@ -1,10 +0,0 @@ -" section, inside "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ protected function getStyleSectionContent($style) @@ -209,7 +209,7 @@ EOD; /** * Returns the contents of the "" section, inside "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ private function getTextPropertiesSectionContent($style) @@ -226,7 +226,7 @@ EOD; /** * Returns the contents of the "" section, inside "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ private function getFontSectionContent($style) @@ -271,7 +271,7 @@ EOD; /** * Returns the contents of the "" section, inside "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ private function getTableCellPropertiesSectionContent($style) @@ -306,7 +306,7 @@ EOD; /** * Returns the contents of the borders definition for the "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ private function getBorderXMLContent($style) @@ -323,7 +323,7 @@ EOD; /** * Returns the contents of the background color definition for the "" section * - * @param \Box\Spout\Writer\Common\Entity\Style\Style $style + * @param \Box\Spout\Common\Entity\Style\Style $style * @return string */ private function getBackgroundColorXMLContent($style) diff --git a/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php b/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php index 8d4f504..bc9dccc 100644 --- a/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\ODS\Manager\Style; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleRegistry diff --git a/src/Spout/Writer/ODS/Manager/WorksheetManager.php b/src/Spout/Writer/ODS/Manager/WorksheetManager.php index 9b260b0..6d76fa0 100644 --- a/src/Spout/Writer/ODS/Manager/WorksheetManager.php +++ b/src/Spout/Writer/ODS/Manager/WorksheetManager.php @@ -2,13 +2,13 @@ namespace Box\Spout\Writer\ODS\Manager; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Helper\Escaper\ODS as ODSEscaper; use Box\Spout\Common\Helper\StringHelper; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Entity\Worksheet; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; use Box\Spout\Writer\Common\Manager\WorksheetManagerInterface; diff --git a/src/Spout/Writer/WriterAbstract.php b/src/Spout/Writer/WriterAbstract.php index 9555d73..4bcc407 100644 --- a/src/Spout/Writer/WriterAbstract.php +++ b/src/Spout/Writer/WriterAbstract.php @@ -3,14 +3,14 @@ namespace Box\Spout\Writer; use Box\Spout\Common\Creator\HelperFactory; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Exception\SpoutException; use Box\Spout\Common\Helper\GlobalFunctionsHelper; use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Writer\Common\Entity\Options; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; use Box\Spout\Writer\Exception\WriterAlreadyOpenedException; use Box\Spout\Writer\Exception\WriterNotOpenedException; diff --git a/src/Spout/Writer/WriterInterface.php b/src/Spout/Writer/WriterInterface.php index 4e14e8e..89d8749 100644 --- a/src/Spout/Writer/WriterInterface.php +++ b/src/Spout/Writer/WriterInterface.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; /** * Interface WriterInterface diff --git a/src/Spout/Writer/WriterMultiSheetsAbstract.php b/src/Spout/Writer/WriterMultiSheetsAbstract.php index 52a5d8c..8170b67 100644 --- a/src/Spout/Writer/WriterMultiSheetsAbstract.php +++ b/src/Spout/Writer/WriterMultiSheetsAbstract.php @@ -3,11 +3,11 @@ namespace Box\Spout\Writer; use Box\Spout\Common\Creator\HelperFactory; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Helper\GlobalFunctionsHelper; use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Writer\Common\Creator\ManagerFactoryInterface; use Box\Spout\Writer\Common\Entity\Options; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Common\Entity\Sheet; use Box\Spout\Writer\Common\Entity\Worksheet; use Box\Spout\Writer\Common\Manager\WorkbookManagerInterface; diff --git a/src/Spout/Writer/XLSX/Helper/BorderHelper.php b/src/Spout/Writer/XLSX/Helper/BorderHelper.php index 56c1d82..1c773fd 100644 --- a/src/Spout/Writer/XLSX/Helper/BorderHelper.php +++ b/src/Spout/Writer/XLSX/Helper/BorderHelper.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\XLSX\Helper; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\BorderPart; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\BorderPart; class BorderHelper { diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php index f5af61f..b98307a 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleManager.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\XLSX\Manager\Style; -use Box\Spout\Writer\Common\Entity\Style\Color; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\XLSX\Helper\BorderHelper; /** @@ -153,7 +153,7 @@ EOD; $content .= ''; foreach ($registeredBorders as $styleId) { - /** @var \Box\Spout\Writer\Common\Entity\Style\Style $style */ + /** @var \Box\Spout\Common\Entity\Style\Style $style */ $style = $this->styleRegistry->getStyleFromStyleId($styleId); $border = $style->getBorder(); $content .= ''; @@ -163,7 +163,7 @@ EOD; foreach ($sortOrder as $partName) { if ($border->hasPart($partName)) { - /** @var $part \Box\Spout\Writer\Common\Entity\Style\BorderPart */ + /** @var $part \Box\Spout\Common\Entity\Style\BorderPart */ $part = $border->getPart($partName); $content .= BorderHelper::serializeBorderPart($part); } diff --git a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php index 8039454..abd89f1 100644 --- a/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php +++ b/src/Spout/Writer/XLSX/Manager/Style/StyleRegistry.php @@ -2,7 +2,7 @@ namespace Box\Spout\Writer\XLSX\Manager\Style; -use Box\Spout\Writer\Common\Entity\Style\Style; +use Box\Spout\Common\Entity\Style\Style; /** * Class StyleRegistry diff --git a/src/Spout/Writer/XLSX/Manager/WorksheetManager.php b/src/Spout/Writer/XLSX/Manager/WorksheetManager.php index 702986e..b0e458f 100644 --- a/src/Spout/Writer/XLSX/Manager/WorksheetManager.php +++ b/src/Spout/Writer/XLSX/Manager/WorksheetManager.php @@ -2,16 +2,16 @@ namespace Box\Spout\Writer\XLSX\Manager; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Helper\Escaper\XLSX as XLSXEscaper; use Box\Spout\Common\Helper\StringHelper; use Box\Spout\Common\Manager\OptionsManagerInterface; use Box\Spout\Writer\Common\Creator\InternalEntityFactory; -use Box\Spout\Writer\Common\Entity\Cell; use Box\Spout\Writer\Common\Entity\Options; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Entity\Worksheet; use Box\Spout\Writer\Common\Helper\CellHelper; use Box\Spout\Writer\Common\Manager\RowManager; diff --git a/tests/Spout/Reader/Common/Entity/CellTest.php b/tests/Spout/Common/Entity/CellTest.php similarity index 96% rename from tests/Spout/Reader/Common/Entity/CellTest.php rename to tests/Spout/Common/Entity/CellTest.php index e846f26..7b97850 100644 --- a/tests/Spout/Reader/Common/Entity/CellTest.php +++ b/tests/Spout/Common/Entity/CellTest.php @@ -1,6 +1,6 @@ createMock(Cell::class); - } - - /** - * @return void - */ - public function testValidInstance() - { - $this->assertInstanceOf(Row::class, new Row([], null)); - } - - /** - * @return void - */ - public function testSetCells() - { - $row = new Row([], null); - $row->setCells([$this->getCellMock(), $this->getCellMock()]); - - $this->assertEquals(2, $row->getNumCells()); - } - - /** - * @return void - */ - public function testSetCellsResets() - { - $row = new Row([], null); - $row->setCells([$this->getCellMock(), $this->getCellMock()]); - - $this->assertEquals(2, $row->getNumCells()); - - $row->setCells([$this->getCellMock()]); - - $this->assertEquals(1, $row->getNumCells()); - } - - /** - * @return void - */ - public function testGetCells() - { - $row = new Row([], null); - - $this->assertEquals(0, $row->getNumCells()); - - $row->setCells([$this->getCellMock(), $this->getCellMock()]); - - $this->assertEquals(2, $row->getNumCells()); - } - - /** - * @return void - */ - public function testAddCell() - { - $row = new Row([], null); - $row->setCells([$this->getCellMock(), $this->getCellMock()]); - - $this->assertEquals(2, $row->getNumCells()); - - $row->addCell($this->getCellMock()); - - $this->assertEquals(3, $row->getNumCells()); - } - - /** - * @return void - */ - public function testFluentInterface() - { - $row = new Row([], null); - $row - ->addCell($this->getCellMock()) - ->setCells([]); - - $this->assertTrue(is_object($row)); - } -} diff --git a/tests/Spout/Reader/Common/Manager/RowManagerTest.php b/tests/Spout/Reader/Common/Manager/RowManagerTest.php index b17eb04..8afd39f 100644 --- a/tests/Spout/Reader/Common/Manager/RowManagerTest.php +++ b/tests/Spout/Reader/Common/Manager/RowManagerTest.php @@ -2,8 +2,8 @@ namespace Box\Spout\Reader\Common\Manager; -use Box\Spout\Reader\Common\Entity\Cell; -use Box\Spout\Reader\Common\Entity\Row; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Reader\XLSX\Creator\HelperFactory; use Box\Spout\Reader\XLSX\Creator\InternalEntityFactory; use Box\Spout\Reader\XLSX\Creator\ManagerFactory; @@ -37,7 +37,7 @@ class RowManagerTest extends \PHPUnit_Framework_TestCase { $rowManager = $this->createRowManager(); - $rowToFill = new Row([]); + $rowToFill = new Row([], null); foreach ($rowCells as $cellIndex => $cell) { $rowToFill->setCellAtIndex($cell, $cellIndex); } @@ -70,7 +70,7 @@ class RowManagerTest extends \PHPUnit_Framework_TestCase public function testIsEmptyRow(array $cells, $expectedIsEmpty) { $rowManager = $this->createRowManager(); - $row = new Row($cells); + $row = new Row($cells, null); $this->assertEquals($expectedIsEmpty, $rowManager->isEmpty($row)); } diff --git a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php index 288e599..86322ee 100644 --- a/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php +++ b/tests/Spout/Reader/XLSX/Helper/CellValueFormatterTest.php @@ -104,7 +104,7 @@ class CellValueFormatterTest extends \PHPUnit_Framework_TestCase if ($expectedDateAsString === null) { $this->fail('An exception should have been thrown'); } else { - $this->assertInstanceOf('DateTime', $result); + $this->assertInstanceOf(\DateTime::class, $result); $this->assertSame($expectedDateAsString, $result->format('Y-m-d H:i:s')); } } catch (InvalidValueException $exception) { diff --git a/tests/Spout/Writer/CSV/WriterTest.php b/tests/Spout/Writer/CSV/WriterTest.php index 63a7d7c..d10d0b3 100644 --- a/tests/Spout/Writer/CSV/WriterTest.php +++ b/tests/Spout/Writer/CSV/WriterTest.php @@ -2,13 +2,13 @@ namespace Box\Spout\Writer\CSV; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Helper\EncodingHelper; use Box\Spout\Common\Type; use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; diff --git a/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php b/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php index 36e94d4..cbe6003 100644 --- a/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php +++ b/tests/Spout/Writer/Common/Creator/StyleBuilderTest.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Creator\Style; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\Color; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; /** @@ -37,7 +37,7 @@ class StyleBuilderTest extends \PHPUnit_Framework_TestCase $mergedStyle = $styleMerger->merge($currentStyle, $baseStyle); $this->assertEquals(null, $currentStyle->getBorder(), 'Current style has no border'); - $this->assertInstanceOf('Box\Spout\Writer\Common\Entity\Style\Border', $baseStyle->getBorder(), 'Base style has a border'); - $this->assertInstanceOf('Box\Spout\Writer\Common\Entity\Style\Border', $mergedStyle->getBorder(), 'Merged style has a border'); + $this->assertInstanceOf(Border::class, $baseStyle->getBorder(), 'Base style has a border'); + $this->assertInstanceOf(Border::class, $mergedStyle->getBorder(), 'Merged style has a border'); } } diff --git a/tests/Spout/Writer/Common/Entity/CellTest.php b/tests/Spout/Writer/Common/Entity/CellTest.php deleted file mode 100644 index e31a0b2..0000000 --- a/tests/Spout/Writer/Common/Entity/CellTest.php +++ /dev/null @@ -1,68 +0,0 @@ -assertInstanceOf(Cell::class, new Cell('cell')); - $this->assertInstanceOf(Cell::class, new Cell('cell-with-style', $this->createMock(Style::class))); - } - - /** - * @return void - */ - public function testCellTypeNumeric() - { - $this->assertTrue((new Cell(0))->isNumeric()); - $this->assertTrue((new Cell(1))->isNumeric()); - } - - /** - * @return void - */ - public function testCellTypeString() - { - $this->assertTrue((new Cell('String!'))->isString()); - } - - /** - * @return void - */ - public function testCellTypeEmptyString() - { - $this->assertTrue((new Cell(''))->isEmpty()); - } - - /** - * @return void - */ - public function testCellTypeEmptyNull() - { - $this->assertTrue((new Cell(null))->isEmpty()); - } - - /** - * @return void - */ - public function testCellTypeBool() - { - $this->assertTrue((new Cell(true))->isBoolean()); - $this->assertTrue((new Cell(false))->isBoolean()); - } - - /** - * @return void - */ - public function testCellTypeError() - { - $this->assertTrue((new Cell([]))->isError()); - } -} diff --git a/tests/Spout/Writer/Common/Manager/CellManagerTest.php b/tests/Spout/Writer/Common/Manager/CellManagerTest.php index f10eefd..a1db98a 100644 --- a/tests/Spout/Writer/Common/Manager/CellManagerTest.php +++ b/tests/Spout/Writer/Common/Manager/CellManagerTest.php @@ -2,8 +2,8 @@ namespace Spout\Writer\Common\Manager; +use Box\Spout\Common\Entity\Cell; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Cell; use Box\Spout\Writer\Common\Manager\CellManager; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; use PHPUnit\Framework\TestCase; diff --git a/tests/Spout/Writer/Common/Manager/RowManagerTest.php b/tests/Spout/Writer/Common/Manager/RowManagerTest.php index 966f7b9..91ae378 100644 --- a/tests/Spout/Writer/Common/Manager/RowManagerTest.php +++ b/tests/Spout/Writer/Common/Manager/RowManagerTest.php @@ -2,8 +2,8 @@ namespace Spout\Writer\Common\Manager; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Row; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; use Box\Spout\Writer\Common\Manager\RowManager; use PHPUnit\Framework\TestCase; diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php index f1faae1..81f3477 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleManagerTest.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager\Style; +use Box\Spout\Common\Entity\Cell; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Cell; /** * Class StyleManagerTest diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php index ed87af4..6ca3232 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleMergerTest.php @@ -2,9 +2,9 @@ namespace Box\Spout\Writer\Common\Manager\Style; +use Box\Spout\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Style\Color; -use Box\Spout\Writer\Common\Entity\Style\Style; /** * Class StyleMergerTest diff --git a/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php b/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php index 52a2d36..4a25f34 100644 --- a/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php +++ b/tests/Spout/Writer/Common/Manager/Style/StyleRegistryTest.php @@ -2,8 +2,8 @@ namespace Box\Spout\Writer\Common\Manager\Style; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Style\Style; /** * Class StyleRegistryTest diff --git a/tests/Spout/Writer/ODS/WriterTest.php b/tests/Spout/Writer/ODS/WriterTest.php index 3ec94fc..d2b3bdf 100644 --- a/tests/Spout/Writer/ODS/WriterTest.php +++ b/tests/Spout/Writer/ODS/WriterTest.php @@ -2,6 +2,7 @@ namespace Box\Spout\Writer\ODS; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Exception\SpoutException; @@ -9,7 +10,6 @@ use Box\Spout\Common\Type; use Box\Spout\Reader\Wrapper\XMLReader; use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Common\Helper\ZipHelper; use Box\Spout\Writer\Exception\WriterAlreadyOpenedException; use Box\Spout\Writer\Exception\WriterNotOpenedException; diff --git a/tests/Spout/Writer/ODS/WriterWithStyleTest.php b/tests/Spout/Writer/ODS/WriterWithStyleTest.php index 6cd54d7..a90bb6c 100644 --- a/tests/Spout/Writer/ODS/WriterWithStyleTest.php +++ b/tests/Spout/Writer/ODS/WriterWithStyleTest.php @@ -2,16 +2,16 @@ namespace Box\Spout\Writer\ODS; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Common\Type; use Box\Spout\Reader\Wrapper\XMLReader; use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\Color; -use Box\Spout\Writer\Common\Entity\Style\Style; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; diff --git a/tests/Spout/Writer/RowCreationHelper.php b/tests/Spout/Writer/RowCreationHelper.php index be1336f..6b124f2 100644 --- a/tests/Spout/Writer/RowCreationHelper.php +++ b/tests/Spout/Writer/RowCreationHelper.php @@ -2,9 +2,9 @@ namespace Box\Spout\Writer; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Creator\EntityFactory; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Style; /** * Trait RowCreationHelper diff --git a/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php b/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php index 3b77d0b..bea7683 100644 --- a/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php +++ b/tests/Spout/Writer/XLSX/Manager/Style/StyleRegistryTest.php @@ -2,9 +2,9 @@ namespace Box\Spout\Writer\XLSX\Manager\Style; +use Box\Spout\Common\Entity\Style\Color; use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Style\Color; /** * Class StyleRegistryTest diff --git a/tests/Spout/Writer/XLSX/WriterTest.php b/tests/Spout/Writer/XLSX/WriterTest.php index f5796de..bd4512c 100644 --- a/tests/Spout/Writer/XLSX/WriterTest.php +++ b/tests/Spout/Writer/XLSX/WriterTest.php @@ -2,13 +2,13 @@ namespace Box\Spout\Writer\XLSX; +use Box\Spout\Common\Entity\Row; use Box\Spout\Common\Exception\InvalidArgumentException; use Box\Spout\Common\Exception\IOException; use Box\Spout\Common\Exception\SpoutException; use Box\Spout\Common\Type; use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; -use Box\Spout\Writer\Common\Entity\Row; use Box\Spout\Writer\Exception\WriterAlreadyOpenedException; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; diff --git a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php index 8565988..50410db 100644 --- a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php +++ b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php @@ -2,17 +2,17 @@ namespace Box\Spout\Writer\XLSX; +use Box\Spout\Common\Entity\Cell; +use Box\Spout\Common\Entity\Row; +use Box\Spout\Common\Entity\Style\Border; +use Box\Spout\Common\Entity\Style\Color; +use Box\Spout\Common\Entity\Style\Style; use Box\Spout\Common\Type; use Box\Spout\Reader\Wrapper\XMLReader; use Box\Spout\TestUsingResource; use Box\Spout\Writer\Common\Creator\EntityFactory; use Box\Spout\Writer\Common\Creator\Style\BorderBuilder; use Box\Spout\Writer\Common\Creator\Style\StyleBuilder; -use Box\Spout\Writer\Common\Entity\Cell; -use Box\Spout\Writer\Common\Entity\Row; -use Box\Spout\Writer\Common\Entity\Style\Border; -use Box\Spout\Writer\Common\Entity\Style\Color; -use Box\Spout\Writer\Common\Entity\Style\Style; use Box\Spout\Writer\Common\Manager\Style\StyleMerger; use Box\Spout\Writer\Exception\WriterNotOpenedException; use Box\Spout\Writer\RowCreationHelper; @@ -26,7 +26,7 @@ class WriterWithStyleTest extends \PHPUnit_Framework_TestCase use TestUsingResource; use RowCreationHelper; - /** @var \Box\Spout\Writer\Common\Entity\Style\Style */ + /** @var \Box\Spout\Common\Entity\Style\Style */ private $defaultStyle; /** @@ -531,7 +531,7 @@ class WriterWithStyleTest extends \PHPUnit_Framework_TestCase /** * @param Row[] $allRows * @param string $fileName - * @param \Box\Spout\Writer\Common\Entity\Style\Style|null $defaultStyle + * @param \Box\Spout\Common\Entity\Style\Style|null $defaultStyle * @return Writer */ private function writeToXLSXFileWithDefaultStyle($allRows, $fileName, $defaultStyle)