Completed
Push — master ( 33ee7a...35da7e )
by Gabriel
565:17 queued 500:16
created

DoctrineBucketLogRepository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
rs 10
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\Fundraising\Frontend\BucketTesting\DataAccess;
6
7
use Doctrine\ORM\EntityManager;
8
use WMDE\Fundraising\Frontend\BucketTesting\Domain\BucketLoggingRepository;
9
use WMDE\Fundraising\Frontend\BucketTesting\Domain\Model\BucketLog;
10
11
class DoctrineBucketLogRepository implements BucketLoggingRepository {
12
13
	private EntityManager $entityManager;
14
15
	public function __construct( EntityManager $entityManager ) {
16
		$this->entityManager = $entityManager;
17
	}
18
19
	public function storeBucketLog( BucketLog $bucketLog ): void {
20
		$this->entityManager->persist( $bucketLog );
21
		$this->entityManager->flush();
22
	}
23
}
24