These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | /** |
||
5 | * This file is part of phpDocumentor. |
||
6 | * |
||
7 | * For the full copyright and license information, please view the LICENSE |
||
8 | * file that was distributed with this source code. |
||
9 | * |
||
10 | * @author Mike van Riel <[email protected]> |
||
11 | * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com) |
||
12 | * @license http://www.opensource.org/licenses/mit-license.php MIT |
||
13 | * @link http://phpdoc.org |
||
14 | */ |
||
15 | |||
16 | namespace phpDocumentor\Descriptor\Builder\Reflector\Tags; |
||
17 | |||
18 | use phpDocumentor\Descriptor\Builder\Reflector\AssemblerAbstract; |
||
19 | use phpDocumentor\Descriptor\Tag\SeeDescriptor; |
||
20 | use phpDocumentor\Reflection\DocBlock\Tags\See; |
||
21 | |||
22 | /** |
||
23 | * Constructs a new Descriptor from a Reflector object for the `@see` tag. |
||
24 | * |
||
25 | * This class will gather the properties that were parsed by the Reflection mechanism for, specifically, an `@see` tag |
||
26 | * and use that to create a SeeDescriptor that describes all properties that an `@see` tag may have. |
||
27 | */ |
||
28 | class SeeAssembler extends AssemblerAbstract |
||
29 | { |
||
30 | /** |
||
31 | * Creates a new Descriptor from the given Reflector. |
||
32 | * |
||
33 | * @param See $data |
||
34 | * |
||
35 | * @return SeeDescriptor |
||
36 | */ |
||
37 | 5 | public function create($data) |
|
38 | { |
||
39 | 5 | $descriptor = new SeeDescriptor($data->getName()); |
|
40 | 5 | $descriptor->setDescription($data->getDescription()); |
|
0 ignored issues
–
show
|
|||
41 | |||
42 | 5 | $reference = $data->getReference(); |
|
43 | 5 | $descriptor->setReference($reference); |
|
44 | |||
45 | 5 | return $descriptor; |
|
46 | } |
||
47 | } |
||
48 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.