@@ -202,7 +202,7 @@ public function getFormattedValue()
202
202
*
203
203
* @return Cell
204
204
*/
205
- public function setValue ($ pValue = null )
205
+ public function setValue ($ pValue )
206
206
{
207
207
if (!self ::getValueBinder ()->bindValue ($ this , $ pValue )) {
208
208
throw new Exception ('Value could not be bound to cell. ' );
@@ -215,13 +215,13 @@ public function setValue($pValue = null)
215
215
* Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder).
216
216
*
217
217
* @param mixed $pValue Value
218
- * @param string $pDataType Explicit data type
218
+ * @param string $pDataType Explicit data type, see Cell\DataType::TYPE_*
219
219
*
220
220
* @throws Exception
221
221
*
222
222
* @return Cell
223
223
*/
224
- public function setValueExplicit ($ pValue = null , $ pDataType = Cell \DataType:: TYPE_STRING )
224
+ public function setValueExplicit ($ pValue , $ pDataType )
225
225
{
226
226
// set the value according to data type
227
227
switch ($ pDataType ) {
@@ -311,7 +311,7 @@ public function getCalculatedValue($resetLog = true)
311
311
*
312
312
* @return Cell
313
313
*/
314
- public function setCalculatedValue ($ pValue = null )
314
+ public function setCalculatedValue ($ pValue )
315
315
{
316
316
if ($ pValue !== null ) {
317
317
$ this ->calculatedValue = (is_numeric ($ pValue )) ? (float ) $ pValue : $ pValue ;
@@ -348,11 +348,11 @@ public function getDataType()
348
348
/**
349
349
* Set cell data type.
350
350
*
351
- * @param string $pDataType
351
+ * @param string $pDataType see Cell\DataType::TYPE_*
352
352
*
353
353
* @return Cell
354
354
*/
355
- public function setDataType ($ pDataType = Cell \DataType:: TYPE_STRING )
355
+ public function setDataType ($ pDataType )
356
356
{
357
357
if ($ pDataType == Cell \DataType::TYPE_STRING2 ) {
358
358
$ pDataType = Cell \DataType::TYPE_STRING ;
@@ -571,7 +571,7 @@ public function rebindParent(Worksheet $parent)
571
571
*
572
572
* @return bool
573
573
*/
574
- public function isInRange ($ pRange = ' A1:A1 ' )
574
+ public function isInRange ($ pRange )
575
575
{
576
576
list ($ rangeStart , $ rangeEnd ) = self ::rangeBoundaries ($ pRange );
577
577
@@ -587,13 +587,13 @@ public function isInRange($pRange = 'A1:A1')
587
587
/**
588
588
* Coordinate from string.
589
589
*
590
- * @param string $pCoordinateString
590
+ * @param string $pCoordinateString eg: 'A1'
591
591
*
592
592
* @throws Exception
593
593
*
594
594
* @return string[] Array containing column and row (indexes 0 and 1)
595
595
*/
596
- public static function coordinateFromString ($ pCoordinateString = ' A1 ' )
596
+ public static function coordinateFromString ($ pCoordinateString )
597
597
{
598
598
if (preg_match ("/^([$]?[A-Z]{1,3})([$]?\d{1,7})$/ " , $ pCoordinateString , $ matches )) {
599
599
return [$ matches [1 ], $ matches [2 ]];
@@ -616,7 +616,7 @@ public static function coordinateFromString($pCoordinateString = 'A1')
616
616
*
617
617
* @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1'
618
618
*/
619
- public static function absoluteReference ($ pCoordinateString = ' A1 ' )
619
+ public static function absoluteReference ($ pCoordinateString )
620
620
{
621
621
if (strpos ($ pCoordinateString , ': ' ) === false && strpos ($ pCoordinateString , ', ' ) === false ) {
622
622
// Split out any worksheet name from the reference
@@ -651,7 +651,7 @@ public static function absoluteReference($pCoordinateString = 'A1')
651
651
*
652
652
* @return string Absolute coordinate e.g. '$A$1'
653
653
*/
654
- public static function absoluteCoordinate ($ pCoordinateString = ' A1 ' )
654
+ public static function absoluteCoordinate ($ pCoordinateString )
655
655
{
656
656
if (strpos ($ pCoordinateString , ': ' ) === false && strpos ($ pCoordinateString , ', ' ) === false ) {
657
657
// Split out any worksheet name from the coordinate
@@ -684,7 +684,7 @@ public static function absoluteCoordinate($pCoordinateString = 'A1')
684
684
* e.g. array('B4','D9') or array(array('B4','D9'),array('H2','O11'))
685
685
* or array('B4')
686
686
*/
687
- public static function splitRange ($ pRange = ' A1:A1 ' )
687
+ public static function splitRange ($ pRange )
688
688
{
689
689
// Ensure $pRange is a valid range
690
690
if (empty ($ pRange )) {
@@ -735,7 +735,7 @@ public static function buildRange($pRange)
735
735
* @return array Range coordinates array(Start Cell, End Cell)
736
736
* where Start Cell and End Cell are arrays (Column Number, Row Number)
737
737
*/
738
- public static function rangeBoundaries ($ pRange = ' A1:A1 ' )
738
+ public static function rangeBoundaries ($ pRange )
739
739
{
740
740
// Ensure $pRange is a valid range
741
741
if (empty ($ pRange )) {
@@ -770,7 +770,7 @@ public static function rangeBoundaries($pRange = 'A1:A1')
770
770
*
771
771
* @return array Range dimension (width, height)
772
772
*/
773
- public static function rangeDimension ($ pRange = ' A1:A1 ' )
773
+ public static function rangeDimension ($ pRange )
774
774
{
775
775
// Calculate range outer borders
776
776
list ($ rangeStart , $ rangeEnd ) = self ::rangeBoundaries ($ pRange );
@@ -786,7 +786,7 @@ public static function rangeDimension($pRange = 'A1:A1')
786
786
* @return array Range coordinates array(Start Cell, End Cell)
787
787
* where Start Cell and End Cell are arrays (Column ID, Row Number)
788
788
*/
789
- public static function getRangeBoundaries ($ pRange = ' A1:A1 ' )
789
+ public static function getRangeBoundaries ($ pRange )
790
790
{
791
791
// Ensure $pRange is a valid range
792
792
if (empty ($ pRange )) {
@@ -809,11 +809,11 @@ public static function getRangeBoundaries($pRange = 'A1:A1')
809
809
/**
810
810
* Column index from string.
811
811
*
812
- * @param string $pString
812
+ * @param string $pString eg 'A'
813
813
*
814
814
* @return int Column index (base 1 !!!)
815
815
*/
816
- public static function columnIndexFromString ($ pString = ' A ' )
816
+ public static function columnIndexFromString ($ pString )
817
817
{
818
818
// Using a lookup cache adds a slight memory overhead, but boosts speed
819
819
// caching using a static within the method is faster than a class static,
@@ -856,11 +856,11 @@ public static function columnIndexFromString($pString = 'A')
856
856
/**
857
857
* String from columnindex.
858
858
*
859
- * @param int $pColumnIndex Column index (base 0 !!! )
859
+ * @param int $pColumnIndex Column index (A = 0 )
860
860
*
861
861
* @return string
862
862
*/
863
- public static function stringFromColumnIndex ($ pColumnIndex = 0 )
863
+ public static function stringFromColumnIndex ($ pColumnIndex )
864
864
{
865
865
// Using a lookup cache adds a slight memory overhead, but boosts speed
866
866
// caching using a static within the method is faster than a class static,
@@ -891,7 +891,7 @@ public static function stringFromColumnIndex($pColumnIndex = 0)
891
891
*
892
892
* @return array Array containing single cell references
893
893
*/
894
- public static function extractAllCellReferencesInRange ($ pRange = ' A1 ' )
894
+ public static function extractAllCellReferencesInRange ($ pRange )
895
895
{
896
896
// Returnvalue
897
897
$ returnValue = [];
@@ -1031,7 +1031,7 @@ public function getXfIndex()
1031
1031
*
1032
1032
* @return Cell
1033
1033
*/
1034
- public function setXfIndex ($ pValue = 0 )
1034
+ public function setXfIndex ($ pValue )
1035
1035
{
1036
1036
$ this ->xfIndex = $ pValue ;
1037
1037
0 commit comments