This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
It seems like $merchant of type object<YEntWeChat\Payment\Merchant> is incompatible with the declared type object<EntWeChat\Payment\Merchant> of property $merchant.
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..
It seems like $merchant of type object<YEntWeChat\Payment\Merchant> is incompatible with the declared type object<EntWeChat\Payment\Merchant> of property $merchant.
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...
42
}
43
44
/**
45
* Merchant getter.
46
*
47
* @return Merchant
48
*/
49
public function getMerchant()
50
{
51
return $this->merchant;
52
}
53
54
/**
55
* API setter.
56
*
57
* @param API $api
58
*/
59
public function setAPI(API $api)
60
{
61
$this->api = $api;
62
}
63
64
/**
65
* Return API instance.
66
*
67
* @return API
68
*/
69
public function getAPI()
70
{
71
return $this->api ?: $this->api = new API($this->getMerchant());
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.