Added type hinting for method argument and return value.[Fixing phpstan error]