Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RexStan: Rückgabe-Typen korrekt setzen #17

Open
christophboecker opened this issue Jul 28, 2024 · 0 comments
Open

RexStan: Rückgabe-Typen korrekt setzen #17

christophboecker opened this issue Jul 28, 2024 · 0 comments

Comments

@christophboecker
Copy link
Member

RexStan meckert z.B. hier:

if ($task->getDescription() || $task->getSource() || $task->getLinks()) {

grafik

Der Auslöser ist die Rückgabedefinition (?string) der angesprochenen Methoden wie z.B.

public function getDescription(bool $asPlaintext = false): ?string

Warum wird null als mögliche Rückgabe angesehen? Das müsste doch immer string sein bedingt durch das Datenfeld. Und wenn nicht müsste BaseQualityCheck::getDescription sicherstellen, dass ein String zurückgegeben wird (oder ein Whoops).

Ich würde stumpf die Rückgabetypen auf den Soll-Typ setzen und fertig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant