Event::getStartDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace ModernTimeline;
6
7
use ModernTimeline\ResultFacade\Subject;
8
use SMWDITime;
0 ignored issues
show
Bug introduced by
The type SMWDITime was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
class Event {
11
12
	private string $imageUrl = '';
13
14
	public function __construct(
15
		private Subject $subject,
16
		private SMWDITime $startDate,
17 3
		private ?SMWDITime $endDate
18 3
	) {
19 3
	}
20 3
21 3
	public function getSubject(): Subject {
22
		return $this->subject;
23 3
	}
24 3
25
	public function getStartDate(): SMWDITime {
26
		return $this->startDate;
27 3
	}
28 3
29
	public function getEndDate(): ?SMWDITime {
30
		return $this->endDate;
31 3
	}
32 3
33
	public function hasImage(): bool {
34
		return $this->imageUrl !== '';
35 3
	}
36 3
37
	public function getImageUrl(): string {
38
		return $this->imageUrl;
39
	}
40
41
	public function setImageUrl( string $url ): void {
42
		$this->imageUrl = $url;
43
	}
44
45
}
46