InMemoryImageRepository::addImage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace Maps\Tests\TestDoubles;
6
7
use Maps\DataAccess\Image;
8
use Maps\DataAccess\ImageRepository;
9
10
class InMemoryImageRepository implements ImageRepository {
11
12
	private $images;
13
14
	public function getByName( string $imageName ): ?Image {
15
		return $this->images[$imageName] ?? null;
16
	}
17
18
	public function addImage( string $imageName, Image $image ) {
19
		$this->images[$imageName] = $image;
20
	}
21
22
}
23