diff --git a/src/Spout/Common/Entity/Row.php b/src/Spout/Common/Entity/Row.php
index 4fba9b4..eece8ac 100644
--- a/src/Spout/Common/Entity/Row.php
+++ b/src/Spout/Common/Entity/Row.php
@@ -22,7 +22,7 @@ class Row
* Row height (default is 15)
* @var string
*/
- protected $height = "15";
+ protected $height = '15';
/**
* Row constructor.
@@ -135,18 +135,19 @@ class Row
/**
* Set row height
- * @param String $height
+ * @param string $height
* @return Row
*/
public function setHeight($height)
{
$this->height = $height;
+
return $this;
}
/**
* Returns row height
- * @return String
+ * @return string
*/
public function getHeight()
{
diff --git a/src/Spout/Common/Entity/Style/Style.php b/src/Spout/Common/Entity/Style/Style.php
index 40c9f20..7a49728 100644
--- a/src/Spout/Common/Entity/Style/Style.php
+++ b/src/Spout/Common/Entity/Style/Style.php
@@ -476,10 +476,11 @@ class Style
{
$this->shrinkToFit = $shrinkToFit;
$this->shouldShrinkToFit = $shrinkToFit;
+
return $this;
}
- /**
+ /**
* @return bool Whether format should be applied
*/
public function shouldShrinkToFit()
diff --git a/src/Spout/Common/Manager/OptionsManagerAbstract.php b/src/Spout/Common/Manager/OptionsManagerAbstract.php
index 672f6fd..2381c52 100644
--- a/src/Spout/Common/Manager/OptionsManagerAbstract.php
+++ b/src/Spout/Common/Manager/OptionsManagerAbstract.php
@@ -54,6 +54,8 @@ abstract class OptionsManagerAbstract implements OptionsManagerInterface
/**
* Add an option to the internal list of options
* Used only for mergeCells() for now
+ * @param mixed $optionName
+ * @param mixed $optionValue
* @return void
*/
public function addOption($optionName, $optionValue)
diff --git a/src/Spout/Reader/ODS/SheetIterator.php b/src/Spout/Reader/ODS/SheetIterator.php
index f35b852..c7b8cd9 100644
--- a/src/Spout/Reader/ODS/SheetIterator.php
+++ b/src/Spout/Reader/ODS/SheetIterator.php
@@ -28,13 +28,13 @@ class SheetIterator implements IteratorInterface
const XML_ATTRIBUTE_TABLE_STYLE_NAME = 'table:style-name';
const XML_ATTRIBUTE_TABLE_DISPLAY = 'table:display';
- /** @var string $filePath Path of the file to be read */
+ /** @var string Path of the file to be read */
protected $filePath;
/** @var \Box\Spout\Common\Manager\OptionsManagerInterface Reader's options manager */
protected $optionsManager;
- /** @var InternalEntityFactory $entityFactory Factory to create entities */
+ /** @var InternalEntityFactory Factory to create entities */
protected $entityFactory;
/** @var XMLReader The XMLReader object that will help read sheet's XML data */
diff --git a/src/Spout/Reader/XLSX/Manager/SharedStringsManager.php b/src/Spout/Reader/XLSX/Manager/SharedStringsManager.php
index caaeed7..8850a69 100644
--- a/src/Spout/Reader/XLSX/Manager/SharedStringsManager.php
+++ b/src/Spout/Reader/XLSX/Manager/SharedStringsManager.php
@@ -43,7 +43,7 @@ class SharedStringsManager
/** @var InternalEntityFactory Factory to create entities */
protected $entityFactory;
- /** @var HelperFactory $helperFactory Factory to create helpers */
+ /** @var HelperFactory Factory to create helpers */
protected $helperFactory;
/** @var CachingStrategyFactory Factory to create shared strings caching strategies */
diff --git a/src/Spout/Reader/XLSX/RowIterator.php b/src/Spout/Reader/XLSX/RowIterator.php
index 4af4530..a54b8b1 100644
--- a/src/Spout/Reader/XLSX/RowIterator.php
+++ b/src/Spout/Reader/XLSX/RowIterator.php
@@ -35,7 +35,7 @@ class RowIterator implements IteratorInterface
/** @var string Path of the XLSX file being read */
protected $filePath;
- /** @var string $sheetDataXMLFilePath Path of the sheet data XML file as in [Content_Types].xml */
+ /** @var string Path of the sheet data XML file as in [Content_Types].xml */
protected $sheetDataXMLFilePath;
/** @var \Box\Spout\Reader\Wrapper\XMLReader The XMLReader object that will help read sheet's XML data */
diff --git a/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php b/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php
index 8c48848..1341233 100644
--- a/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php
+++ b/src/Spout/Writer/Common/Creator/Style/StyleBuilder.php
@@ -185,12 +185,13 @@ class StyleBuilder
/**
* Set should shrink to fit
- * @param boolean $shrinkToFit
+ * @param bool $shrinkToFit
* @return void
*/
public function setShouldShrinkToFit($shrinkToFit = true)
{
$this->style->setShouldShrinkToFit($shrinkToFit);
+
return $this;
}
diff --git a/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php b/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php
index b513555..653778c 100644
--- a/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php
+++ b/src/Spout/Writer/Common/Manager/WorkbookManagerAbstract.php
@@ -44,7 +44,7 @@ abstract class WorkbookManagerAbstract implements WorkbookManagerInterface
/** @var InternalEntityFactory Factory to create entities */
protected $entityFactory;
- /** @var ManagerFactoryInterface $managerFactory Factory to create managers */
+ /** @var ManagerFactoryInterface Factory to create managers */
protected $managerFactory;
/** @var Worksheet The worksheet where data will be written to */
diff --git a/src/Spout/Writer/ODS/Creator/ManagerFactory.php b/src/Spout/Writer/ODS/Creator/ManagerFactory.php
index f38c500..a5b77ee 100644
--- a/src/Spout/Writer/ODS/Creator/ManagerFactory.php
+++ b/src/Spout/Writer/ODS/Creator/ManagerFactory.php
@@ -22,7 +22,7 @@ class ManagerFactory implements ManagerFactoryInterface
/** @var InternalEntityFactory */
protected $entityFactory;
- /** @var HelperFactory $helperFactory */
+ /** @var HelperFactory */
protected $helperFactory;
/**
diff --git a/src/Spout/Writer/WriterAbstract.php b/src/Spout/Writer/WriterAbstract.php
index d96a628..bbaa735 100644
--- a/src/Spout/Writer/WriterAbstract.php
+++ b/src/Spout/Writer/WriterAbstract.php
@@ -33,7 +33,7 @@ abstract class WriterAbstract implements WriterInterface
/** @var GlobalFunctionsHelper Helper to work with global functions */
protected $globalFunctionsHelper;
- /** @var HelperFactory $helperFactory */
+ /** @var HelperFactory */
protected $helperFactory;
/** @var OptionsManagerInterface Writer options manager */
diff --git a/src/Spout/Writer/WriterMultiSheetsAbstract.php b/src/Spout/Writer/WriterMultiSheetsAbstract.php
index ec84e44..57efae4 100644
--- a/src/Spout/Writer/WriterMultiSheetsAbstract.php
+++ b/src/Spout/Writer/WriterMultiSheetsAbstract.php
@@ -69,6 +69,7 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
public function setColumnWidths(array $columnWidths)
{
$this->optionsManager->setOption(Options::COLUMN_WIDTHS, $columnWidths);
+
return $this;
}
@@ -81,6 +82,7 @@ abstract class WriterMultiSheetsAbstract extends WriterAbstract
public function mergeCells(array $range1, array $range2)
{
$this->optionsManager->addOption(Options::MERGE_CELLS, [$range1, $range2]);
+
return $this;
}
diff --git a/src/Spout/Writer/XLSX/Creator/ManagerFactory.php b/src/Spout/Writer/XLSX/Creator/ManagerFactory.php
index f27a2f2..aa3bcd5 100644
--- a/src/Spout/Writer/XLSX/Creator/ManagerFactory.php
+++ b/src/Spout/Writer/XLSX/Creator/ManagerFactory.php
@@ -24,7 +24,7 @@ class ManagerFactory implements ManagerFactoryInterface
/** @var InternalEntityFactory */
protected $entityFactory;
- /** @var HelperFactory $helperFactory */
+ /** @var HelperFactory */
protected $helperFactory;
/**
diff --git a/src/Spout/Writer/XLSX/Manager/WorksheetManager.php b/src/Spout/Writer/XLSX/Manager/WorksheetManager.php
index 59ee04a..4a71603 100644
--- a/src/Spout/Writer/XLSX/Manager/WorksheetManager.php
+++ b/src/Spout/Writer/XLSX/Manager/WorksheetManager.php
@@ -161,9 +161,9 @@ EOD;
$colsString = '';
foreach ($this->optionsManager->getOption(Options::COLUMN_WIDTHS) as $index => $width) {
$index++;
- $colsString.= '';
+ $colsString.= '';
}
- $colsString.="";
+ $colsString.='';
\fwrite($worksheet->getFilePointer(), $colsString);
}
@@ -176,7 +176,7 @@ EOD;
$numCells = $row->getNumCells();
$rowHeight = $row->getHeight();
- $rowXML = '';
+ $rowXML = '';
foreach ($row->getCells() as $columnIndexZeroBased => $cell) {
$rowXML .= $this->applyStyleAndGetCellXML($cell, $rowStyle, $rowIndexOneBased, $columnIndexZeroBased);
@@ -300,7 +300,7 @@ EOD;
if ($this->optionsManager->getOption(Options::MERGE_CELLS)) {
$mergeCellString = '';
foreach ($this->optionsManager->getOption(Options::MERGE_CELLS) as $values) {
- $output = \array_map(function($value){
+ $output = \array_map(function ($value) {
return CellHelper::getColumnLettersFromColumnIndex($value[0]) . $value[1];
}, $values);
$mergeCellString.= '';
diff --git a/tests/Spout/Reader/CSV/SpoutTestStream.php b/tests/Spout/Reader/CSV/SpoutTestStream.php
index 3bfd06e..d66e811 100644
--- a/tests/Spout/Reader/CSV/SpoutTestStream.php
+++ b/tests/Spout/Reader/CSV/SpoutTestStream.php
@@ -14,10 +14,10 @@ class SpoutTestStream
const PATH_TO_CSV_RESOURCES = 'tests/resources/csv/';
const CSV_EXTENSION = '.csv';
- /** @var int $position */
+ /** @var int */
private $position;
- /** @var resource $fileHandle */
+ /** @var resource */
private $fileHandle;
/**