Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
VarLinksSet | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
20 | |
0.00% |
0 / 1 |
__toString | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | |||||
__clone | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 |
1 | <?php declare( strict_types=1 ); |
2 | |
3 | namespace SecurityCheckPlugin; |
4 | |
5 | use Phan\Language\Element\TypedElementInterface; |
6 | use Phan\Library\Set; |
7 | |
8 | /** |
9 | * Convenience class for better type inference. |
10 | * |
11 | * @method PreservedTaintedness offsetGet( \Phan\Language\Element\TypedElementInterface $object ) |
12 | * @method offsetSet( \Phan\Language\Element\TypedElementInterface $object, PreservedTaintedness $data ) |
13 | * @method void attach(TypedElementInterface $object, PreservedTaintedness $data) |
14 | * @method TypedElementInterface current() |
15 | * @phan-file-suppress PhanParamSignatureMismatch,PhanParamSignaturePHPDocMismatchParamType |
16 | * @phan-file-suppress PhanParamSignaturePHPDocMismatchTooManyRequiredParameters |
17 | */ |
18 | class VarLinksSet extends Set { |
19 | /** |
20 | * @codeCoverageIgnore |
21 | */ |
22 | public function __toString(): string { |
23 | $children = []; |
24 | foreach ( $this as $var ) { |
25 | $children[] = $var->getName() . ': ' . $this[$var]->toShortString(); |
26 | } |
27 | return '[' . implode( ',', $children ) . ']'; |
28 | } |
29 | |
30 | public function __clone() { |
31 | foreach ( $this as $var ) { |
32 | $this[$var] = clone $this[$var]; |
33 | } |
34 | } |
35 | } |