Skip to content

Commit df01873

Browse files
authored
Merge pull request #77 from jasperwissels/prepare-php-84
2 parents bae3f70 + 41b61d0 commit df01873

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/bootstrap_examples.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function getOfficialLink() {
142142
* optionally helpers for the specific profile
143143
*/
144144

145-
public function setTimestamps(ResourceInterface $resource, \DateTimeInterface $created=null, \DateTimeInterface $updated=null) {
145+
public function setTimestamps(ResourceInterface $resource, ?\DateTimeInterface $created=null, ?\DateTimeInterface $updated=null) {
146146
if ($resource instanceof ResourceIdentifierObject) {
147147
throw new Exception('cannot add attributes to identifier objects');
148148
}

src/ErrorsDocument.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class ErrorsDocument extends Document {
2929
];
3030

3131
/**
32-
* @param ErrorObject $errorObject optional
32+
* @param ?ErrorObject $errorObject optional
3333
*/
34-
public function __construct(ErrorObject $errorObject=null) {
34+
public function __construct(?ErrorObject $errorObject=null) {
3535
parent::__construct();
3636

3737
if ($errorObject !== null) {

tests/example_output/ExampleTimestampsProfile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function getOfficialLink() {
1111
return 'https://jsonapi.org/recommendations/#authoring-profiles';
1212
}
1313

14-
public function setTimestamps(ResourceInterface $resource, \DateTimeInterface $created=null, \DateTimeInterface $updated=null) {
14+
public function setTimestamps(ResourceInterface $resource, ?\DateTimeInterface $created=null, ?\DateTimeInterface $updated=null) {
1515
if ($resource instanceof ResourceIdentifierObject) {
1616
throw new Exception('cannot add attributes to identifier objects');
1717
}

0 commit comments

Comments
 (0)