Skip to content

Commit 1544c68

Browse files
committed
minor #74 clean up docblocks and fix some type hints (xabbuh)
This PR was merged into the 3.0.x-dev branch. Discussion ---------- clean up docblocks and fix some type hints Commits ------- fe7add5 clean up docblocks and fix some type hints
2 parents 2b511af + fe7add5 commit 1544c68

40 files changed

+83
-730
lines changed

src/Account.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@
1818
*/
1919
final class Account
2020
{
21-
/**
22-
* @var string The unique id or name used to log in to this account
23-
*/
2421
private $name;
25-
26-
/**
27-
* @var IRL Canonical home page for the system the account is on
28-
*/
2922
private $homePage;
3023

3124
public function __construct(string $name, IRL $homePage)
@@ -36,8 +29,6 @@ public function __construct(string $name, IRL $homePage)
3629

3730
/**
3831
* Returns the unique id or name used to log in to this account.
39-
*
40-
* @return string The user name
4132
*/
4233
public function getName(): string
4334
{
@@ -46,8 +37,6 @@ public function getName(): string
4637

4738
/**
4839
* Returns the home page for the system the account is on.
49-
*
50-
* @return IRL The home page
5140
*/
5241
public function getHomePage(): IRL
5342
{
@@ -58,10 +47,6 @@ public function getHomePage(): IRL
5847
* Checks if another account is equal.
5948
*
6049
* Two accounts are equal if and only if all of their properties are equal.
61-
*
62-
* @param Account $account The account to compare with
63-
*
64-
* @return bool True if the accounts are equal, false otherwise
6550
*/
6651
public function equals(Account $account): bool
6752
{

src/Activity.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,9 @@
1818
*/
1919
final class Activity extends StatementObject
2020
{
21-
/**
22-
* @var IRI The Activity's unique identifier
23-
*/
2421
private $id;
25-
26-
/**
27-
* @var Definition|null The Activity's {@link Definition}
28-
*/
2922
private $definition;
3023

31-
/**
32-
* @param IRI $id
33-
* @param Definition|null $definition
34-
*/
3524
public function __construct(IRI $id, Definition $definition = null)
3625
{
3726
$this->id = $id;
@@ -40,8 +29,6 @@ public function __construct(IRI $id, Definition $definition = null)
4029

4130
/**
4231
* Returns the Activity's unique identifier.
43-
*
44-
* @return IRI The identifier
4532
*/
4633
public function getId(): IRI
4734
{
@@ -50,8 +37,6 @@ public function getId(): IRI
5037

5138
/**
5239
* Returns the Activity's {@link Definition}.
53-
*
54-
* @return Definition|null The Definition
5540
*/
5641
public function getDefinition(): ?Definition
5742
{
@@ -67,8 +52,6 @@ public function equals(StatementObject $object): bool
6752
return false;
6853
}
6954

70-
/** @var Activity $object */
71-
7255
if (!$this->id->equals($object->id)) {
7356
return false;
7457
}

src/ActivityProfile.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
final class ActivityProfile extends Profile
2020
{
21-
/**
22-
* @var Activity The activity
23-
*/
2421
private $activity;
2522

2623
public function __construct(string $profileId, Activity $activity)
@@ -32,8 +29,6 @@ public function __construct(string $profileId, Activity $activity)
3229

3330
/**
3431
* Returns the {@link Activity}.
35-
*
36-
* @return Activity The activity
3732
*/
3833
public function getActivity(): Activity
3934
{

src/ActivityProfileDocument.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
final class ActivityProfileDocument extends Document
2020
{
21-
/**
22-
* @var ActivityProfile The activity profile
23-
*/
2421
private $profile;
2522

2623
public function __construct(ActivityProfile $profile, DocumentData $data)
@@ -30,11 +27,6 @@ public function __construct(ActivityProfile $profile, DocumentData $data)
3027
$this->profile = $profile;
3128
}
3229

33-
/**
34-
* Returns the {@link ActivityProfile activity profile}.
35-
*
36-
* @return ActivityProfile The activity profile
37-
*/
3830
public function getActivityProfile(): ActivityProfile
3931
{
4032
return $this->profile;

src/Actor.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,7 @@
1818
*/
1919
abstract class Actor extends StatementObject
2020
{
21-
/**
22-
* The actor's {@link InverseFunctionalIdentifier inverse functional identifier}
23-
*
24-
* @var InverseFunctionalIdentifier|null
25-
*/
2621
private $iri;
27-
28-
/**
29-
* Name of the {@link Agent} or {@link Group}
30-
* @var string|null
31-
*/
3222
private $name;
3323

3424
public function __construct(InverseFunctionalIdentifier $iri = null, string $name = null)
@@ -39,8 +29,6 @@ public function __construct(InverseFunctionalIdentifier $iri = null, string $nam
3929

4030
/**
4131
* Returns the Actor's {@link InverseFunctionalIdentifier inverse functional identifier}.
42-
*
43-
* @return InverseFunctionalIdentifier|null The inverse functional identifier
4432
*/
4533
public function getInverseFunctionalIdentifier(): ?InverseFunctionalIdentifier
4634
{
@@ -49,8 +37,6 @@ public function getInverseFunctionalIdentifier(): ?InverseFunctionalIdentifier
4937

5038
/**
5139
* Returns the name of the {@link Agent} or {@link Group}.
52-
*
53-
* @return string|null The name
5440
*/
5541
public function getName(): ?string
5642
{
@@ -61,10 +47,6 @@ public function getName(): ?string
6147
* Checks if another actor is equal.
6248
*
6349
* Two actors are equal if and only if all of their properties are equal.
64-
*
65-
* @param Object $actor The actor to compare with
66-
*
67-
* @return bool True if the actors are equal, false otherwise
6850
*/
6951
public function equals(StatementObject $actor): bool
7052
{

src/AgentProfile.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
final class AgentProfile extends Profile
2020
{
21-
/**
22-
* @var Agent The agent
23-
*/
2421
private $agent;
2522

2623
public function __construct(string $profileId, Agent $agent)
@@ -30,11 +27,6 @@ public function __construct(string $profileId, Agent $agent)
3027
$this->agent = $agent;
3128
}
3229

33-
/**
34-
* Returns the agent.
35-
*
36-
* @return Agent The agent
37-
*/
3830
public function getAgent(): Agent
3931
{
4032
return $this->agent;

src/AgentProfileDocument.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
final class AgentProfileDocument extends Document
2020
{
21-
/**
22-
* @var AgentProfile The agent profile
23-
*/
2421
private $profile;
2522

2623
public function __construct(AgentProfile $profile, DocumentData $data)
@@ -30,11 +27,6 @@ public function __construct(AgentProfile $profile, DocumentData $data)
3027
$this->profile = $profile;
3128
}
3229

33-
/**
34-
* Returns the agent profile.
35-
*
36-
* @return AgentProfile The agent profile
37-
*/
3830
public function getAgentProfile(): AgentProfile
3931
{
4032
return $this->profile;

src/Context.php

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,16 @@
1818
*/
1919
final class Context
2020
{
21-
/**
22-
* @var string|null
23-
*/
2421
private $registration;
25-
26-
/**
27-
* @var Actor|null
28-
*/
2922
private $instructor;
30-
31-
/**
32-
* @var Group|null
33-
*/
3423
private $team;
35-
36-
/**
37-
* @var ContextActivities|null
38-
*/
3924
private $contextActivities;
40-
/**
41-
* @var string|null
42-
*/
4325
private $revision;
44-
/**
45-
* @var string|null
46-
*/
4726
private $platform;
48-
49-
/**
50-
* @var string|null
51-
*/
5227
private $language;
53-
54-
/**
55-
* @var StatementReference|null
56-
*/
5728
private $statement;
58-
59-
/**
60-
* @var Extensions|null
61-
*/
6229
private $extensions;
6330

64-
/**
65-
* @param string $registration
66-
*
67-
* @return self
68-
*/
6931
public function withRegistration(string $registration): self
7032
{
7133
$context = clone $this;
@@ -98,11 +60,6 @@ public function withContextActivities(ContextActivities $contextActivities): sel
9860
return $context;
9961
}
10062

101-
/**
102-
* @param string $revision
103-
*
104-
* @return self
105-
*/
10663
public function withRevision(string $revision): self
10764
{
10865
$context = clone $this;
@@ -111,11 +68,6 @@ public function withRevision(string $revision): self
11168
return $context;
11269
}
11370

114-
/**
115-
* @param string $platform
116-
*
117-
* @return self
118-
*/
11971
public function withPlatform(string $platform): self
12072
{
12173
$context = clone $this;
@@ -124,11 +76,6 @@ public function withPlatform(string $platform): self
12476
return $context;
12577
}
12678

127-
/**
128-
* @param string $language
129-
*
130-
* @return self
131-
*/
13279
public function withLanguage(string $language): self
13380
{
13481
$context = clone $this;
@@ -153,73 +100,46 @@ public function withExtensions(Extensions $extensions): self
153100
return $context;
154101
}
155102

156-
/**
157-
* @return string|null
158-
*/
159103
public function getRegistration(): ?string
160104
{
161105
return $this->registration;
162106
}
163107

164-
/**
165-
* @return Actor|null
166-
*/
167108
public function getInstructor(): ?Actor
168109
{
169110
return $this->instructor;
170111
}
171112

172-
/**
173-
* @return Group|null
174-
*/
175113
public function getTeam(): ?Group
176114
{
177115
return $this->team;
178116
}
179117

180-
/**
181-
* @return ContextActivities|null
182-
*/
183118
public function getContextActivities(): ?ContextActivities
184119
{
185120
return $this->contextActivities;
186121
}
187122

188-
/**
189-
* @return string|null
190-
*/
191123
public function getRevision(): ?string
192124
{
193125
return $this->revision;
194126
}
195127

196-
/**
197-
* @return string|null
198-
*/
199128
public function getPlatform(): ?string
200129
{
201130
return $this->platform;
202131
}
203132

204-
/**
205-
* @return string|null
206-
*/
207133
public function getLanguage(): ?string
208134
{
209135
return $this->language;
210136
}
211137

212-
/**
213-
* @return StatementReference|null
214-
*/
215138
public function getStatement(): ?StatementReference
216139
{
217140
return $this->statement;
218141
}
219142

220-
/**
221-
* @return Extensions|null
222-
*/
223143
public function getExtensions(): ?Extensions
224144
{
225145
return $this->extensions;

0 commit comments

Comments
 (0)