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

SofortPayment   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 33
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBankTransferCode() 0 3 1
A getDonationId() 0 3 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