for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FSi\Bundle\AdminSecurityBundle\Doctrine\Admin;
use FSi\Bundle\AdminBundle\Doctrine\Admin\CRUDElement;
use FSi\Component\DataGrid\DataGridFactoryInterface;
use FSi\Component\DataSource\DataSourceFactoryInterface;
use Symfony\Component\Form\FormFactoryInterface;
class UserElement extends CRUDElement
{
/**
* @var string
*/
private $userModel;
public function __construct($options, $userModel)
parent::__construct($options);
$this->userModel = $userModel;
}
* {@inheritdoc}
protected function initDataGrid(DataGridFactoryInterface $factory)
return $factory->createDataGrid('admin_security_user');
protected function initDataSource(DataSourceFactoryInterface $factory)
return $factory->createDataSource('doctrine', ['entity' => $this->getClassName()])->setMaxResults(20);
createDataSource()
$name
This check looks for function calls that miss required arguments.
protected function initForm(FormFactoryInterface $factory, $data = null)
return $factory->create('admin_user', $data);
public function getId()
return 'admin_security_user';
public function getClassName()
return $this->userModel;
This check looks for function calls that miss required arguments.