Completed
Pull Request — master (#127)
by Jeroen De
03:37
created

SofortPayment::getDonationId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Entities\DonationPayments;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * @since 6.0
11
 *
12
 * @ORM\Table(name="donation_payment_sofort")
13
 * @ORM\Entity
14
 */
15
class SofortPayment {
16
17
	/**
18
	 * @var string
19
	 * Example value: W-Q-ABCDEZ
20
	 *
21
	 * @ORM\Column(name="transfer_code", type="string", length=10, unique=true)
22
	 * @ORM\Id
23
	 */
24
	private $bankTransferCode = '';
25
26
	/**
27
	 * @var integer
28
	 * Example value: 1337
29
	 *
30
	 * @ORM\Column(name="donation_id", type="integer", unique=true)
31
	 */
32
	private $donationId = '';
33
34 1
	public function __construct( string $bankTransferCode, int $donationId ) {
35 1
		$this->bankTransferCode = $bankTransferCode;
36 1
		$this->donationId = $donationId;
37 1
	}
38
39 1
	public function getBankTransferCode(): string {
40 1
		return $this->bankTransferCode;
41
	}
42
43 1
	public function getDonationId(): int {
44 1
		return $this->donationId;
45
	}
46
47
}
48