Issues (4141)

Security Analysis    not enabled

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.

app/Controller/PagamentoController.php (20 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
require 'PagseguroController.php';
4
5
class PagamentoController
6
{
7
8
	private $gateway = '';	
9
10
	public function __construct($gateway)
11
	{
12
		$this->gateway = new $gateway();
0 ignored issues
show
Documentation Bug introduced by
It seems like new $gateway() of type object is incompatible with the declared type string of property $gateway.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
13
	}
14
15
	/**
16
	* @return void
17
	* @param String $token
18
	**/
19
	public function setToken($token)
20
	{
21
		$this->gateway->setToken($token);
0 ignored issues
show
The method setToken cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
22
	}
23
24
	/**
25
	* @return void
26
	* @param String $email
27
	**/
28
	public function setEmail($email)
29
	{
30
		$this->gateway->setEmail($email);
0 ignored issues
show
The method setEmail cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
31
	}
32
33
	/**
34
	* @return String $token
35
	**/
36
	public function getToken()
37
	{
38
		return $this->gateway->getToken();
0 ignored issues
show
The method getToken cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
39
	}
40
41
	/**
42
	* @return String $email
43
	**/
44
	public function getEmail()
45
	{
46
		return $this->gateway->getEmail();
0 ignored issues
show
The method getEmail cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
47
	}
48
49
	/**
50
	* @return void
51
	* @param Array $produtos
0 ignored issues
show
There is no parameter named $produtos. Did you maybe mean $produto?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

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

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

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

Loading history...
52
	**/
53
	public function setProdutos($produto)
54
	{
55
		$this->gateway->setProdutos($produto);
0 ignored issues
show
The method setProdutos cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
56
	}
57
58
	/**
59
	* @return Array $produto
60
	**/
61
	public function getProdutos()
62
	{
63
		return $this->gateway->getProdutos();
0 ignored issues
show
The method getProdutos cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
64
	}
65
66
	public function adicionarProdutosGateway()
67
	{
68
		return $this->gateway->adicionarProdutosGateway();
0 ignored issues
show
The method adicionarProdutosGateway cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
69
	}
70
71
	public function setEndereco($endereco)
72
	{
73
		$this->gateway->setEndereco($endereco);
0 ignored issues
show
The method setEndereco cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
74
	}
75
76
	public function getEndereco()
77
	{
78
		return $this->gateway->getEndereco();
0 ignored issues
show
The method getEndereco cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
79
	}
80
81
	public function setEnderecoClienteGateway()
82
	{
83
		return $this->gateway->setEnderecoClienteGateway();
0 ignored issues
show
The method setEnderecoClienteGateway cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
84
	}
85
86
	public function setReference($reference)
87
	{
88
		$this->gateway->setReference($reference);
0 ignored issues
show
The method setReference cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
89
	}
90
91
	public function getReference()
92
	{
93
		return $this->gateway->getReference();
0 ignored issues
show
The method getReference cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
94
	}
95
96
	public function setValorFrete($valor_frete)
97
	{
98
		$this->gateway->setValorFrete($valor_frete);
0 ignored issues
show
The method setValorFrete cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
99
	}
100
101
	public function getValorFrete()
102
	{
103
		return $this->gateway->getValorFrete();
0 ignored issues
show
The method getValorFrete cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
104
	}
105
106
	public function setCliente($cliente)
107
	{
108
		$this->gateway->setCliente($cliente);
0 ignored issues
show
The method setCliente cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
109
	}
110
111
	public function getCliente()
112
	{
113
		return $this->gateway->getCliente();
0 ignored issues
show
The method getCliente cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
114
	}
115
116
	public function setClienteGateway()
117
	{
118
		return $this->gateway->setClienteGateway();
0 ignored issues
show
The method setClienteGateway cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
119
	}
120
121
	public function finalizarPedido()
122
	{
123
		return $this->gateway->finalizarPedido();
0 ignored issues
show
The method finalizarPedido cannot be called on $this->gateway (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
124
	}
125
126
}