diff --git a/src/Trinity/Bundle/AdminBreadcrumbsBundle/Model/BreadcrumbManager.php b/src/Trinity/Bundle/AdminBreadcrumbsBundle/Model/BreadcrumbManager.php index 40e87c7..a123a23 100644 --- a/src/Trinity/Bundle/AdminBreadcrumbsBundle/Model/BreadcrumbManager.php +++ b/src/Trinity/Bundle/AdminBreadcrumbsBundle/Model/BreadcrumbManager.php @@ -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]); diff --git a/src/Trinity/Bundle/ContentManagerBundle/Block/ObjectBlock.php b/src/Trinity/Bundle/ContentManagerBundle/Block/ObjectBlock.php index cf21b39..c92ea76 100644 --- a/src/Trinity/Bundle/ContentManagerBundle/Block/ObjectBlock.php +++ b/src/Trinity/Bundle/ContentManagerBundle/Block/ObjectBlock.php @@ -10,7 +10,7 @@ class ObjectBlock extends Block public function getTemplate() { - if ($this->template == null) { + if (empty($this->template)) { return $this::DEFAULT_TEMPLATE; } diff --git a/src/Trinity/Bundle/ContentManagerBundle/Model/Menu.php b/src/Trinity/Bundle/ContentManagerBundle/Model/Menu.php index ebf34d7..6f5d784 100644 --- a/src/Trinity/Bundle/ContentManagerBundle/Model/Menu.php +++ b/src/Trinity/Bundle/ContentManagerBundle/Model/Menu.php @@ -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; diff --git a/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php b/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php index 130be5e..3043f31 100644 --- a/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php +++ b/src/Trinity/Bundle/ContentManagerBundle/Model/Node.php @@ -229,7 +229,7 @@ class Node extends BaseNode public function setUrl($v) { - if (null == $this->oldUrl) { + if (null === $this->oldUrl) { $this->oldUrl = $this->url; } diff --git a/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php b/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php index b4c51d0..4bab0af 100644 --- a/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php +++ b/src/Trinity/Bundle/NotificationBundle/Form/Type/TemplateType.php @@ -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', diff --git a/src/Trinity/Bundle/SearchBundle/Page/SearchPage.php b/src/Trinity/Bundle/SearchBundle/Page/SearchPage.php index 0f3487e..8cad725 100644 --- a/src/Trinity/Bundle/SearchBundle/Page/SearchPage.php +++ b/src/Trinity/Bundle/SearchBundle/Page/SearchPage.php @@ -54,7 +54,7 @@ class SearchPage extends Page implements SeoPageInterface, PageableInterface public function getPager() { - if (null == $this->pager) { + if (null === $this->pager) { $this->initPager(); } diff --git a/src/Trinity/Bundle/SlideshowBundle/Block/SlideshowItemsContainerBlock.php b/src/Trinity/Bundle/SlideshowBundle/Block/SlideshowItemsContainerBlock.php index 1341d42..ff12512 100644 --- a/src/Trinity/Bundle/SlideshowBundle/Block/SlideshowItemsContainerBlock.php +++ b/src/Trinity/Bundle/SlideshowBundle/Block/SlideshowItemsContainerBlock.php @@ -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'; - }*/ - -} \ No newline at end of file +}