PagamentoController::setReference()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Documentation introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
Bug introduced by
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
}