Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
VarLinksSet | |
0.00% |
0 / 6 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 1 |
__toString | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
__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 | public function __toString(): string { |
20 | $children = []; |
21 | foreach ( $this as $var ) { |
22 | $children[] = $var->getName() . ': ' . $this[$var]->toShortString(); |
23 | } |
24 | return '[' . implode( ',', $children ) . ']'; |
25 | } |
26 | |
27 | public function __clone() { |
28 | foreach ( $this as $var ) { |
29 | $this[$var] = clone $this[$var]; |
30 | } |
31 | } |
32 | } |