Skip to content

Commit 1599b80

Browse files
authored
Merge pull request #48 from API-Skeletons/2.0.x
2.0.x
2 parents 8039399 + 65da90e commit 1599b80

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+854
-2635
lines changed

app/Doctrine/ORM/Entity/Artist.php

Lines changed: 3 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
class Artist
1616
{
1717
#[GraphQL\Field(description: 'Artist name')]
18-
private string $name;
18+
public string $name;
1919

2020
#[GraphQL\Field(description: 'Primary key')]
21-
private int $id;
21+
public int $id;
2222

2323
/** @var mixed[]]> */
2424
#[GraphQL\Association(description: 'Performances')]
25-
private Collection $performances;
25+
public Collection $performances;
2626

2727
/**
2828
* Constructor
@@ -31,89 +31,4 @@ public function __construct()
3131
{
3232
$this->performances = new ArrayCollection();
3333
}
34-
35-
/**
36-
* Set name.
37-
*/
38-
public function setName(string $name): Artist
39-
{
40-
$this->name = $name;
41-
42-
return $this;
43-
}
44-
45-
/**
46-
* Get name.
47-
*/
48-
public function getName(): string
49-
{
50-
return $this->name;
51-
}
52-
53-
/**
54-
* Get id.
55-
*/
56-
public function getId(): int
57-
{
58-
return $this->id;
59-
}
60-
61-
/**
62-
* Add performance.
63-
*/
64-
public function addPerformance(Performance $performance): Artist
65-
{
66-
$this->performances[] = $performance;
67-
68-
return $this;
69-
}
70-
71-
/**
72-
* Add performances.
73-
*
74-
* @param Collection<int, Performance> $performances
75-
*/
76-
public function addPerformances(Collection $performances): self
77-
{
78-
foreach ($performances as $performance) {
79-
$performance->setArtist($this);
80-
$this->addPerformance($performance);
81-
}
82-
83-
return $this;
84-
}
85-
86-
/**
87-
* Remove performance.
88-
*
89-
* @return bool TRUE if this collection contained the specified element, FALSE otherwise.
90-
*/
91-
public function removePerformance(Performance $performance): bool
92-
{
93-
return $this->performances->removeElement($performance);
94-
}
95-
96-
/**
97-
* Remove performances.
98-
*
99-
* @param Collection<int, Performance> $performances
100-
*/
101-
public function removePerformances(Collection $performances): self
102-
{
103-
foreach ($performances as $performance) {
104-
$this->removePerformance($performance);
105-
}
106-
107-
return $this;
108-
}
109-
110-
/**
111-
* Get performances.
112-
*
113-
* @return mixed[]
114-
*/
115-
public function getPerformances(): Collection
116-
{
117-
return $this->performances;
118-
}
11934
}

app/Doctrine/ORM/Entity/Performance.php

Lines changed: 7 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@
1616
class Performance
1717
{
1818
#[GraphQL\Field(description: 'Venue name')]
19-
private string|null $venue = null;
19+
public string|null $venue = null;
2020

2121
#[GraphQL\Field(description: 'City name')]
22-
private string|null $city = null;
22+
public string|null $city = null;
2323

2424
#[GraphQL\Field(description: 'State name')]
25-
private string|null $state = null;
25+
public string|null $state = null;
2626

2727
#[GraphQL\Field(description: 'Performance date', alias: 'date')]
28-
private DateTime $performanceDate;
28+
public DateTime $performanceDate;
2929

3030
#[GraphQL\Field(description: 'Primary key')]
31-
private int $id;
31+
public int $id;
3232

3333
/** @var mixed[]]> */
3434
#[GraphQL\Association(description: 'Recordings by artist')]
35-
private Collection $recordings;
35+
public Collection $recordings;
3636

3737
#[GraphQL\Association(description: 'Artist entity')]
38-
private Artist $artist;
38+
public Artist $artist;
3939

4040
/**
4141
* Constructor
@@ -44,161 +44,4 @@ public function __construct()
4444
{
4545
$this->recordings = new ArrayCollection();
4646
}
47-
48-
/**
49-
* Set venue.
50-
*/
51-
public function setVenue(string|null $venue = null): Performance
52-
{
53-
$this->venue = $venue;
54-
55-
return $this;
56-
}
57-
58-
/**
59-
* Get venue.
60-
*/
61-
public function getVenue(): string|null
62-
{
63-
return $this->venue;
64-
}
65-
66-
/**
67-
* Set city.
68-
*/
69-
public function setCity(string|null $city = null): Performance
70-
{
71-
$this->city = $city;
72-
73-
return $this;
74-
}
75-
76-
/**
77-
* Get city.
78-
*/
79-
public function getCity(): string|null
80-
{
81-
return $this->city;
82-
}
83-
84-
/**
85-
* Set state.
86-
*/
87-
public function setState(string|null $state = null): Performance
88-
{
89-
$this->state = $state;
90-
91-
return $this;
92-
}
93-
94-
/**
95-
* Get state.
96-
*/
97-
public function getState(): string|null
98-
{
99-
return $this->state;
100-
}
101-
102-
/**
103-
* Set performanceDate.
104-
*/
105-
public function setPerformanceDate(DateTime $performanceDate): Performance
106-
{
107-
$this->performanceDate = $performanceDate;
108-
109-
return $this;
110-
}
111-
112-
/**
113-
* Get performanceDate.
114-
*/
115-
public function getPerformanceDate(): DateTime
116-
{
117-
return $this->performanceDate;
118-
}
119-
120-
/**
121-
* Get id.
122-
*/
123-
public function getId(): int
124-
{
125-
return $this->id;
126-
}
127-
128-
/**
129-
* Add recording.
130-
*/
131-
public function addRecording(Recording $recording): Performance
132-
{
133-
$this->recordings[] = $recording;
134-
135-
return $this;
136-
}
137-
138-
/**
139-
* Add recordings.
140-
*
141-
* @param Collection<int, Recording> $recordings
142-
*/
143-
public function addRecordings(Collection $recordings): self
144-
{
145-
foreach ($recordings as $recording) {
146-
$recording->setPerformance($this);
147-
$this->addRecording($recording);
148-
}
149-
150-
return $this;
151-
}
152-
153-
/**
154-
* Remove recording.
155-
*
156-
* @return bool TRUE if this collection contained the specified element, FALSE otherwise.
157-
*/
158-
public function removeRecording(Recording $recording): bool
159-
{
160-
return $this->recordings->removeElement($recording);
161-
}
162-
163-
/**
164-
* Remove recordings.
165-
*
166-
* @param Collection<int, Recording> $recordings
167-
*/
168-
public function removeRecordings(Collection $recordings): self
169-
{
170-
foreach ($recordings as $recording) {
171-
$this->removeRecording($recording);
172-
}
173-
174-
return $this;
175-
}
176-
177-
/**
178-
* Get recordings.
179-
*
180-
* @return mixed[]
181-
*/
182-
public function getRecordings(): Collection
183-
{
184-
return $this->recordings;
185-
}
186-
187-
/**
188-
* Set artist.
189-
*/
190-
public function setArtist(Artist $artist): Performance
191-
{
192-
$this->artist = $artist;
193-
194-
return $this;
195-
}
196-
197-
/**
198-
* Get artist.
199-
*/
200-
public function getArtist(): Artist
201-
{
202-
return $this->artist;
203-
}
20447
}

0 commit comments

Comments
 (0)