Skip to content

Instantly share code, notes, and snippets.

@alexweissman
Created May 24, 2016 19:59
Show Gist options
  • Save alexweissman/31bd3655472d7246778a67a1f3c653a6 to your computer and use it in GitHub Desktop.
Save alexweissman/31bd3655472d7246778a67a1f3c653a6 to your computer and use it in GitHub Desktop.
check yoself before you wreck yoself
public function __invoke($request, $response, $next)
{
$problems_found = $this->problemChecker();
if ($problems_found){
$response = $this->view->render($response, 'pages/config-errors.html.twig', [
"messages" => $this->results
]);
} else {
$response = $next($request, $response);
}
return $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment