Skip to content

Commit dcdca86

Browse files
committed
add resource as optional parameter
1 parent f7a1c63 commit dcdca86

File tree

1 file changed

+4
-4
lines changed
  • src/Ubiquity/attributes/items/rest

1 file changed

+4
-4
lines changed

src/Ubiquity/attributes/items/rest/Rest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
* - #[Rest(resource: "modelClassname")]
1414
*
1515
* @author jc
16-
* @version 1.0.0
16+
* @version 1.0.1
1717
*/
1818
#[Attribute(Attribute::TARGET_CLASS)]
1919
class Rest extends BaseAttribute {
2020
use BaseAnnotationTrait;
2121

22-
public string $resource;
22+
public ?string $resource;
2323

2424
/**
2525
* Rest constructor.
26-
* @param string $resource
26+
* @param ?string $resource
2727
*/
28-
public function __construct(string $resource) {
28+
public function __construct(?string $resource=null) {
2929
$this->resource = $resource;
3030
}
3131

0 commit comments

Comments
 (0)