for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class UsersController extends ControllerBase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
protected $model;
protected $title;
protected $controller;
public function initialize()
$this->model = "User";
$this->title = "Utilisateurs";
$this->controller = "Users";
}
public function readAction($id = null)
$user = User::findFirst($id);
$usecases = Usecase::find("idDev=$id");
$projets = array();
foreach ($usecases as $u) {
$projets[$u->getProjet()->getId()] = $u->getProjet();
$projetsCree = Projet::find("idClient = $id");
$this->view->setVar("user", $user);
$this->view->setVar("projets", $projets);
$this->view->setVar("projetsCree", $projetsCree);
$this->view->setVar("usecases", $usecases);
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.