The isOK method returns boolean, so this can be simplified to just

    $result = $status->isOK()