1 | <?php |
||
20 | class FrameCollection implements ArrayAccess, IteratorAggregate, Serializable, Countable |
||
21 | { |
||
22 | /** |
||
23 | * @var array[] |
||
24 | */ |
||
25 | private $frames; |
||
26 | |||
27 | /** |
||
28 | * @param array $frames |
||
29 | */ |
||
30 | 1 | public function __construct(array $frames) |
|
36 | |||
37 | /** |
||
38 | * Filters frames using a callable, returns the same FrameCollection |
||
39 | * |
||
40 | * @param callable $callable |
||
41 | * @return FrameCollection |
||
42 | */ |
||
43 | 1 | public function filter($callable) |
|
48 | |||
49 | /** |
||
50 | * Map the collection of frames |
||
51 | * |
||
52 | * @param callable $callable |
||
53 | * @return FrameCollection |
||
54 | */ |
||
55 | 2 | public function map($callable) |
|
73 | |||
74 | /** |
||
75 | * Returns an array with all frames, does not affect |
||
76 | * the internal array. |
||
77 | * |
||
78 | * @todo If this gets any more complex than this, |
||
79 | * have getIterator use this method. |
||
80 | * @see FrameCollection::getIterator |
||
81 | * @return array |
||
82 | */ |
||
83 | 2 | public function getArray() |
|
87 | |||
88 | /** |
||
89 | * @see IteratorAggregate::getIterator |
||
90 | * @return ArrayIterator |
||
91 | */ |
||
92 | 2 | public function getIterator() |
|
96 | |||
97 | /** |
||
98 | * @see ArrayAccess::offsetExists |
||
99 | * @param int $offset |
||
100 | */ |
||
101 | 1 | public function offsetExists($offset) |
|
105 | |||
106 | /** |
||
107 | * @see ArrayAccess::offsetGet |
||
108 | * @param int $offset |
||
109 | */ |
||
110 | 1 | public function offsetGet($offset) |
|
114 | |||
115 | /** |
||
116 | * @see ArrayAccess::offsetSet |
||
117 | * @param int $offset |
||
118 | */ |
||
119 | 1 | public function offsetSet($offset, $value) |
|
123 | |||
124 | /** |
||
125 | * @see ArrayAccess::offsetUnset |
||
126 | * @param int $offset |
||
127 | */ |
||
128 | 1 | public function offsetUnset($offset) |
|
132 | |||
133 | /** |
||
134 | * @see Countable::count |
||
135 | * @return int |
||
136 | */ |
||
137 | 2 | public function count() |
|
141 | |||
142 | /** |
||
143 | * Count the frames that belongs to the application. |
||
144 | * |
||
145 | * @return int |
||
146 | */ |
||
147 | public function countIsApplication() |
||
153 | |||
154 | /** |
||
155 | * @see Serializable::serialize |
||
156 | * @return string |
||
157 | */ |
||
158 | 1 | public function serialize() |
|
162 | |||
163 | /** |
||
164 | * @see Serializable::unserialize |
||
165 | * @param string $serializedFrames |
||
166 | */ |
||
167 | 1 | public function unserialize($serializedFrames) |
|
171 | |||
172 | /** |
||
173 | * @param Frame[] $frames Array of Frame instances, usually from $e->getPrevious() |
||
174 | */ |
||
175 | public function prependFrames(array $frames) |
||
179 | |||
180 | /** |
||
181 | * Gets the innermost part of stack trace that is not the same as that of outer exception |
||
182 | * |
||
183 | * @param FrameCollection $parentFrames Outer exception frames to compare tail against |
||
184 | * @return Frame[] |
||
185 | */ |
||
186 | 1 | public function topDiff(FrameCollection $parentFrames) |
|
203 | } |
||
204 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..