These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * This file is part of PHP Mess Detector. |
||
4 | * |
||
5 | * Copyright (c) Manuel Pichler <[email protected]>. |
||
6 | * All rights reserved. |
||
7 | * |
||
8 | * Licensed under BSD License |
||
9 | * For full copyright and license information, please see the LICENSE file. |
||
10 | * Redistributions of files must retain the above copyright notice. |
||
11 | * |
||
12 | * @author Manuel Pichler <[email protected]> |
||
13 | * @copyright Manuel Pichler. All rights reserved. |
||
14 | * @license https://opensource.org/licenses/bsd-license.php BSD License |
||
15 | * @link http://phpmd.org/ |
||
16 | */ |
||
17 | |||
18 | namespace PHPMD\Node; |
||
19 | |||
20 | use PDepend\Source\AST\ASTFunction; |
||
21 | |||
22 | /** |
||
23 | * Wrapper around a PDepend function node. |
||
24 | */ |
||
25 | class FunctionNode extends AbstractCallableNode |
||
26 | { |
||
27 | /** |
||
28 | * Constructs a new function wrapper. |
||
29 | * |
||
30 | * @param \PDepend\Source\AST\ASTFunction $node |
||
31 | */ |
||
32 | 21 | public function __construct(ASTFunction $node) |
|
33 | { |
||
34 | 21 | parent::__construct($node); |
|
35 | 21 | } |
|
36 | |||
37 | /** |
||
38 | * Returns the name of the parent package. |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 2 | public function getNamespaceName() |
|
43 | { |
||
44 | 2 | return $this->getNode()->getNamespace()->getName(); |
|
0 ignored issues
–
show
|
|||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Returns the name of the parent type or <b>null</b> when this node has no |
||
49 | * parent type. |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getParentName() |
||
54 | { |
||
55 | return null; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Returns the full qualified name of a class, an interface, a method or |
||
60 | * a function. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getFullQualifiedName() |
||
65 | { |
||
66 | return sprintf('%s\\%s()', $this->getNamespaceName(), $this->getName()); |
||
67 | } |
||
68 | } |
||
69 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.