Skip to content

Commit a1932a0

Browse files
author
MarkBaker
committed
Set formula attributes datatype in Cell
1 parent 8156ed9 commit a1932a0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

phpstan-baseline.neon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
count: 2
2+
path: src/PhpSpreadsheet/Calculation/Calculation.php
3+
14
parameters:
25
ignoreErrors:
36
-
@@ -7,9 +10,6 @@ parameters:
710

811
-
912
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
10-
count: 2
11-
path: src/PhpSpreadsheet/Calculation/Calculation.php
12-
1313
-
1414
message: "#^Cannot access offset 'onlyIf' on mixed\\.$#"
1515
count: 3

src/PhpSpreadsheet/Cell/Cell.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class Cell
6565

6666
/**
6767
* Attributes of the formula.
68+
*
69+
* @var null|array
6870
*/
6971
private $formulaAttributes;
7072

@@ -701,11 +703,11 @@ public function setXfIndex($indexValue)
701703
/**
702704
* Set the formula attributes.
703705
*
704-
* @param mixed $attributes
706+
* @param mixed[] $attributes
705707
*
706708
* @return $this
707709
*/
708-
public function setFormulaAttributes($attributes)
710+
public function setFormulaAttributes(array $attributes)
709711
{
710712
$this->formulaAttributes = $attributes;
711713

@@ -715,7 +717,7 @@ public function setFormulaAttributes($attributes)
715717
/**
716718
* Get the formula attributes.
717719
*/
718-
public function getFormulaAttributes()
720+
public function getFormulaAttributes(): ?array
719721
{
720722
return $this->formulaAttributes;
721723
}

0 commit comments

Comments
 (0)