Failed Conditions
Push — develop ( d8db7e...1224af )
by Remco
03:11
created

src/Amount.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Amount
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2019 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Gateways\OmniKassa2
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Adyen;
12
13
/**
14
 * Amount
15
 *
16
 * @author  Remco Tolsma
17
 * @version 2.1.0
18
 * @since   2.0.2
19
 */
20
class Amount {
21
	/**
22
	 * Currency.
23
	 *
24
	 * @var string
25
	 */
26
	private $currency;
27
28
	/**
29
	 * Value.
30
	 *
31
	 * @var int
32
	 */
33
	private $value;
34
35
	/**
36
	 * Construct amount.
37
	 *
38
	 * @param string $currency Currency.
39
	 * @param int    $value    Value
40
	 */
41
	public function __construct( $currency, $value ) {
42
		$this->currency = $currency;
43
		$this->value    = $value;
44
	}
45
46
	/**
47
	 * Get currency.
48
	 *
49
	 * @return string
50
	 */
51
	public function get_currency() {
52
		return $this->currency;
53
	}
54
55
	/**
56
	 * Get amount.
57
	 *
58
	 * @return int
59
	 */
60
	public function get_value() {
61
		return $this->value;
62
	}
63
64
	/**
65
	 * Get JSON.
66
	 *
67
	 * @return object
68
	 */
69
	public function get_json() {
70
		return (object) array(
71
			'currency' => $this->get_currency(),
72
			'value'    => $this->get_avalue(),
0 ignored issues
show
The method get_avalue() does not exist on Pronamic\WordPress\Pay\Gateways\Adyen\Amount. Did you maybe mean get_value()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

72
			'value'    => $this->/** @scrutinizer ignore-call */ get_avalue(),

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
73
		);
74
	}
75
}
76