Fix phpstan level 6
[MAILPOET-1969]
This commit is contained in:
@@ -45,9 +45,9 @@ class ImportExport extends APIEndpoint {
|
||||
if (!empty($errors)) {
|
||||
return $this->errorResponse($errors);
|
||||
} else {
|
||||
return $this->successResponse(
|
||||
Segment::findOne($segment->id)->asArray()
|
||||
);
|
||||
$segment = Segment::findOne($segment->id);
|
||||
if(!$segment instanceof Segment) return $this->errorResponse();
|
||||
return $this->successResponse($segment->asArray());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user