for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
function page_initializer()
{
if (Session::get("is_logged_in") !== true) {
//ir a la pagina inicial
Session::set("flash", "Debe iniciar sesión para acceder al recurso *<i>page</i>*");
return redirect_to("");
redirect_to('')
null
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
}
function show($slug = '')
$template = new Template();
$template->slug = $slug;
slug
Template
__set
$template->render("page/show");
function edit()
$template->render("page/edit");
function update()
Session::set("flash", "Página actualizada correctamente");
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.