|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Orm\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
8
|
|
|
use Doctrine\Common\Collections\Collection; |
|
9
|
|
|
use Doctrine\ORM\Mapping\Column; |
|
10
|
|
|
use Doctrine\ORM\Mapping\Entity; |
|
11
|
|
|
use Doctrine\ORM\Mapping\GeneratedValue; |
|
12
|
|
|
use Doctrine\ORM\Mapping\Id; |
|
13
|
|
|
use Doctrine\ORM\Mapping\JoinColumn; |
|
14
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
|
15
|
|
|
use Doctrine\ORM\Mapping\OneToMany; |
|
16
|
|
|
use Doctrine\ORM\Mapping\Table; |
|
17
|
|
|
use Override; |
|
|
|
|
|
|
18
|
|
|
use Stu\Orm\Repository\MapRegionRepository; |
|
19
|
|
|
|
|
20
|
|
|
#[Table(name: 'stu_map_regions')] |
|
21
|
|
|
#[Entity(repositoryClass: MapRegionRepository::class)] |
|
22
|
|
|
class MapRegion implements MapRegionInterface |
|
23
|
|
|
{ |
|
24
|
|
|
#[Id] |
|
25
|
|
|
#[Column(type: 'integer')] |
|
26
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
|
27
|
|
|
private int $id; |
|
28
|
|
|
|
|
29
|
|
|
#[Column(type: 'string')] |
|
30
|
|
|
private string $description = ''; |
|
31
|
|
|
|
|
32
|
|
|
#[Column(type: 'integer', nullable: true)] |
|
33
|
|
|
private ?int $database_id = 0; |
|
|
|
|
|
|
34
|
|
|
|
|
35
|
|
|
#[ManyToOne(targetEntity: 'DatabaseEntry')] |
|
36
|
|
|
#[JoinColumn(name: 'database_id', referencedColumnName: 'id')] |
|
37
|
|
|
private ?DatabaseEntryInterface $databaseEntry = null; |
|
38
|
|
|
|
|
39
|
|
|
/** @var ArrayCollection<int, AstronomicalEntryInterface> */ |
|
40
|
|
|
#[OneToMany(targetEntity: 'AstronomicalEntry', mappedBy: 'region', indexBy: 'user_id', fetch: 'EXTRA_LAZY')] |
|
41
|
|
|
private Collection $astronomicalEntries; |
|
42
|
|
|
|
|
43
|
|
|
public function __construct() |
|
44
|
|
|
{ |
|
45
|
|
|
$this->astronomicalEntries = new ArrayCollection(); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
#[Override] |
|
49
|
|
|
public function getId(): int |
|
50
|
|
|
{ |
|
51
|
|
|
return $this->id; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
#[Override] |
|
55
|
|
|
public function getDescription(): string |
|
56
|
|
|
{ |
|
57
|
|
|
return $this->description; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
#[Override] |
|
61
|
|
|
public function setDescription(string $description): MapRegionInterface |
|
62
|
|
|
{ |
|
63
|
|
|
$this->description = $description; |
|
64
|
|
|
|
|
65
|
|
|
return $this; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
#[Override] |
|
69
|
|
|
public function getDatabaseEntry(): ?DatabaseEntryInterface |
|
70
|
|
|
{ |
|
71
|
|
|
return $this->databaseEntry; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
#[Override] |
|
75
|
|
|
public function setDatabaseEntry(?DatabaseEntryInterface $databaseEntry): MapRegionInterface |
|
76
|
|
|
{ |
|
77
|
|
|
$this->databaseEntry = $databaseEntry; |
|
78
|
|
|
|
|
79
|
|
|
return $this; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
#[Override] |
|
83
|
|
|
public function getAstronomicalEntries(): Collection |
|
84
|
|
|
{ |
|
85
|
|
|
return $this->astronomicalEntries; |
|
86
|
|
|
} |
|
87
|
|
|
} |
|
88
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths