Issues (249)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/main/php/PHPMD/Node/AbstractTypeNode.php (1 issue)

Upgrade to new PHP Analysis Engine

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\AbstractASTClassOrInterface;
21
22
/**
23
 * Abstract base class for classes and interfaces.
24
 */
25
abstract class AbstractTypeNode extends AbstractNode
26
{
27
    /**
28
     * @var \PDepend\Source\AST\AbstractASTClassOrInterface
29
     */
30
    private $node;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
31
32
    /**
33
     * Constructs a new generic class or interface node.
34
     *
35
     * @param \PDepend\Source\AST\AbstractASTClassOrInterface $node
36
     */
37 20
    public function __construct(AbstractASTClassOrInterface $node)
38
    {
39 20
        parent::__construct($node);
40
41 20
        $this->node = $node;
42 20
    }
43
44
    /**
45
     * Returns an <b>array</b> with all methods defined in the context class or
46
     * interface.
47
     *
48
     * @return \PHPMD\Node\MethodNode[]
49
     */
50 7
    public function getMethods()
51
    {
52 7
        $methods = array();
53 7
        foreach ($this->node->getMethods() as $method) {
54 7
            $methods[] = new MethodNode($method);
55
        }
56 7
57
        return $methods;
58
    }
59
60
    /**
61
     * Returns an array with the names of all methods within this class or
62
     * interface node.
63
     *
64
     * @return string[]
65 3
     */
66
    public function getMethodNames()
67 3
    {
68 3
        $names = array();
69 3
        foreach ($this->node->getMethods() as $method) {
70
            $names[] = $method->getName();
71 3
        }
72
73
        return $names;
74
    }
75
76
    /**
77
     * Returns the number of constants declared in this type.
78
     *
79 5
     * @return integer
80
     */
81 5
    public function getConstantCount()
82
    {
83
        return count($this->node->getConstants());
84
    }
85
86
    /**
87
     * Returns the name of the parent namespace.
88
     *
89 3
     * @return string
90
     */
91 3
    public function getNamespaceName()
92
    {
93
        return $this->node->getNamespace()->getName();
94
    }
95
96
    /**
97
     * Returns the name of the parent type or <b>null</b> when this node has no
98
     * parent type.
99
     *
100 3
     * @return string
101
     */
102 3
    public function getParentName()
103
    {
104
        return null;
105
    }
106
107
    /**
108
     * Returns the full qualified name of a class, an interface, a method or
109
     * a function.
110
     *
111 3
     * @return string
112
     */
113 3
    public function getFullQualifiedName()
114
    {
115
        return sprintf('%s\\%s', $this->getNamespaceName(), $this->getName());
116
    }
117
}
118