GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (119)

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.

example/User.php (4 issues)

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
namespace PhpAbac\Example;
4
5
class User {
6
    /** @var int **/
7
    private $id;
8
    /** @var string **/
9
    private $name;
10
    /** @var int **/
11
    private $age;
12
    /** @var string **/
13
    private $parentNationality;
14
    /** @var array **/
15
    private $visas;
16
    /** @var bool **/
17
    private $hasDoneJapd;
18
    /** @var bool **/
19
    private $hasDrivingLicense;
20
    /** @var string Iso code of user country */
21
    private $country;
22
23
    /**
24
     * @param int $id
25
     * @return \PhpAbac\Example\User
26
     */
27 8
    public function setId($id) {
28 8
        $this->id = $id;
29
        
30 8
        return $this;
31
    }
32
    
33
    /**
34
     * @return int
35
     */
36 2
    public function getId() {
37 2
        return $this->id;
38
    }
39
    
40
    /**
41
     * @param string $name
42
     * @return \PhpAbac\Example\User
43
     */
44 6
    public function setName($name) {
45 6
        $this->name = $name;
46
        
47 6
        return $this;
48
    }
49
    
50
    /**
51
     * @return string
52
     */
53
    public function getName() {
54
        return $this->name;
55
    }
56
    
57
    /**
58
     * @param int $age
59
     * @return \PhpAbac\Example\User
60
     */
61 8
    public function setAge($age) {
62 8
        $this->age = $age;
63
        
64 8
        return $this;
65
    }
66
    
67
    /**
68
     * @return int
69
     */
70 5
    public function getAge() {
71 5
        return $this->age;
72
    }
73
    
74
    /**
75
     * @param string $parentNationality
76
     * @return \PhpAbac\Example\User
77
     */
78 7
    public function setParentNationality($parentNationality) {
79 7
        $this->parentNationality = $parentNationality;
80
        
81 7
        return $this;
82
    }
83
    
84
    /**
85
     * @return bool
86
     */
87 2
    public function getParentNationality() {
88 2
        return $this->parentNationality;
89
    }
90
    
91
    /**
92
     * @param \PhpAbac\Example\Visa $visa
93
     * @return \PhpAbac\Example\User
94
     */
95 6
    public function addVisa(Visa $visa) {
96 6
        $this->visas[$visa->getId()] = $visa;
97
        
98 6
        return $this;
99
    }
100
    
101
    /**
102
     * @param \PhpAbac\Example\Visa $visa
103
     * @return \PhpAbac\Example\User
104
     */
105
    public function removeVisa(Visa $visa) {
106
        if(isset($this->visas[$visa->getId()])) {
0 ignored issues
show
Expected 1 space after IF keyword; 0 found
Loading history...
107
            unset($this->visas[$visa->getId()]);
108
        }
109
        return $this;
110
    }
111
    
112
    /**
113
     * @return array
114
     */
115 1
    public function getVisas() {
116 1
        return $this->visas;
117
    }
118
	
119
	/**
120
	 * Return a specific visa
121
	 *
122
	 * @param Visa $visa
0 ignored issues
show
There is no parameter named $visa. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
123
	 *
124
	 * @return mixed|null
125
	 */
126 2
    public function getVisa($country_code) {
127
    	/** @var Visa $visa */
128 2
    	$visas = [];
129 2
		foreach($this->visas as $visa) {
0 ignored issues
show
Expected 1 space after FOREACH keyword; 0 found
Loading history...
130 2
    		if ($visa->getCountry()->getCode() == $country_code)
0 ignored issues
show
Coding Style Best Practice introduced by
It is generally a best practice to always use braces with control structures.

Adding braces to control structures avoids accidental mistakes as your code changes:

// Without braces (not recommended)
if (true)
    doSomething();

// Recommended
if (true) {
    doSomething();
}
Loading history...
131 2
				$visas[] = $visa;
132 2
		}
133 2
		return $visas;
134
	}
135
    
136
    /**
137
     * @param bool $hasDoneJapd
138
     * @return \PhpAbac\Example\User
139
     */
140 6
    public function setHasDoneJapd($hasDoneJapd) {
141 6
        $this->hasDoneJapd = $hasDoneJapd;
142
        
143 6
        return $this;
144
    }
145
    
146
    /**
147
     * @return bool
148
     */
149 1
    public function getHasDoneJapd() {
150 1
        return $this->hasDoneJapd;
151
    }
152
    
153
    /**
154
     * @param bool $hasDrivingLicense
155
     * @return \PhpAbac\Example\User
156
     */
157 6
    public function setHasDrivingLicense($hasDrivingLicense) {
158 6
        $this->hasDrivingLicense = $hasDrivingLicense;
159
        
160 6
        return $this;
161
    }
162
    
163
    /**
164
     * @return bool
165
     */
166 1
    public function getHasDrivingLicense() {
167 1
        return $this->hasDrivingLicense;
168
    }
169
170
171
    /**
172
     * Function to set the iso code of the user country
173
     *
174
     * @param $country
175
     */
176 5
    public function setCountry($country) {
177 5
        $this->country = $country;
178
179 5
        return $this;
180
    }
181
182
    /**
183
     * @return string Iso code of the user country
184
     */
185 1
    public function getCountry() {
186 1
        return $this->country;
187
    }
188
}