Skip to content

Commit

Permalink
Update method parameters to allow nullable types
Browse files Browse the repository at this point in the history
Changed the `onGet` method parameters to explicitly use nullable types for better type clarity and consistency. This update ensures stricter adherence to PHP type declarations and improves code reliability.
  • Loading branch information
koriym committed Jan 11, 2025
1 parent 982501d commit fe5a373
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Greeting extends ResourceObject
* @Named("appName=BEAR\Resource\Annotation\AppName")
*/
#[ResourceParam(uri: 'app://self/rparam/login#login_id', param: 'name')]
public function onGet(string $name = null, string $appName = null)
public function onGet(?string $name = null, ?string $appName = null)
{
$this->body = [
'name' => $name,
Expand Down

0 comments on commit fe5a373

Please sign in to comment.