insight recommandations

This commit is contained in:
Simon Vieille 2015-03-05 17:37:40 +01:00
parent ba64c7e209
commit cbdc3109e3
7 changed files with 13 additions and 22 deletions

View file

@ -2,7 +2,8 @@
namespace Trinity\Bundle\AdminBreadcrumbsBundle\Model;
use \Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\HttpFoundation\Request;
class BreadcrumbManager
{
@ -54,7 +55,7 @@ class BreadcrumbManager
return $this->root_item;
}
public function buildCrudBreadcrumbFor($request)
public function buildCrudBreadcrumbFor(Request $request)
{
$routename = $request->get('_route');
@ -86,7 +87,7 @@ class BreadcrumbManager
return $item;
}
private function generateRoute($request, $index = false)
private function generateRoute(Request $request, $index = false)
{
if ($index) {
$route = preg_replace('`_.*$`','_index', $request->get('_route'));
@ -97,7 +98,7 @@ class BreadcrumbManager
return $this->router->generate($request->get('_route'), $request->get('_route_params'));
}
private function generateKey($request, $index = false)
private function generateKey(Request $request, $index = false)
{
$datas = explode('::', $request->get('_controller'));
$action = ($index) ? 'index' : str_replace('Action', '', $datas[1]);

View file

@ -10,7 +10,7 @@ class ObjectBlock extends Block
public function getTemplate()
{
if ($this->template == null) {
if (empty($this->template)) {
return $this::DEFAULT_TEMPLATE;
}

View file

@ -48,7 +48,7 @@ class Menu extends BaseMenu
return $this;
}
public function getNodes($criteria = null, PropelPDO $con = null)
public function getNodes($criteria = null, \PropelPDO $con = null)
{
if (!empty($this->nodes)) {
return $this->nodes;

View file

@ -229,7 +229,7 @@ class Node extends BaseNode
public function setUrl($v)
{
if (null == $this->oldUrl) {
if (null === $this->oldUrl) {
$this->oldUrl = $this->url;
}

View file

@ -41,7 +41,7 @@ class TemplateType extends BaseAbstractType
)
);
if ($options['use_ace_editor'] == true) {
if ($options['use_ace_editor'] === true) {
$builder->add(
'content',
'ace_editor',

View file

@ -54,7 +54,7 @@ class SearchPage extends Page implements SeoPageInterface, PageableInterface
public function getPager()
{
if (null == $this->pager) {
if (null === $this->pager) {
$this->initPager();
}

View file

@ -2,10 +2,7 @@
namespace Trinity\Bundle\SlideshowBundle\Block;
use Symfony\Component\HttpFoundation\File\File;
use Trinity\Bundle\ContentManagerBundle\Model\Block;
use Trinity\Component\File\FileUploadInterface;
use Trinity\Bundle\SlideshowBundle\Model\SlideshowItemQuery;
use Trinity\Bundle\SlideshowBundle\Model\SlideshowItemPeer;
class SlideshowItemsContainerBlock extends Block
@ -14,7 +11,7 @@ class SlideshowItemsContainerBlock extends Block
public function getTemplate()
{
if ($this->template == null) {
if (empty($this->template)) {
return $this::DEFAULT_TEMPLATE;
}
@ -31,7 +28,7 @@ class SlideshowItemsContainerBlock extends Block
public function getSlideshowItems($criteria = null, \PropelPDO $con = null)
{
if(is_null($criteria)) {
if (is_null($criteria)) {
$criteria = new \Criteria();
}
@ -44,11 +41,4 @@ class SlideshowItemsContainerBlock extends Block
{
return parent::getSlideshowItems(null, null);
}
/*public function getName()
{
return 'block_slideshow_item_container';
}*/
}
}