Skip to content

Commit

Permalink
Apply PHP-CS-Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Feb 16, 2013
1 parent 54e161e commit cae5a7d
Show file tree
Hide file tree
Showing 160 changed files with 465 additions and 582 deletions.
24 changes: 9 additions & 15 deletions Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Form\Util\PropertyPath;
use Symfony\Component\Validator\ValidatorInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Acl\Model\DomainObjectInterface;
Expand Down Expand Up @@ -43,7 +42,6 @@

use Knp\Menu\FactoryInterface as MenuFactoryInterface;
use Knp\Menu\ItemInterface as MenuItemInterface;
use Knp\Menu\MenuItem;

abstract class Admin implements AdminInterface, DomainObjectInterface
{
Expand Down Expand Up @@ -438,7 +436,6 @@ protected function configureListFields(ListMapper $list)

}


/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -894,7 +891,7 @@ public function getBaseRouteName()
* urlize the given word
*
* @param string $word
* @param string $sep the separator
* @param string $sep the separator
*
* @return string
*/
Expand Down Expand Up @@ -934,7 +931,7 @@ public function setSubClasses(array $subClasses)
/**
* Gets the subclass corresponding to the given name
*
* @param string $name The name of the sub class
* @param string $name The name of the sub class
*
* @return string the subclass
*/
Expand All @@ -950,7 +947,7 @@ protected function getSubClass($name)
/**
* Returns true if the admin has the sub classes
*
* @param string $name The name of the sub class
* @param string $name The name of the sub class
*
* @return bool
*/
Expand Down Expand Up @@ -1062,7 +1059,7 @@ public function buildRoutes()

$this->configureRoutes($this->routes);

foreach($this->getExtensions() as $extension) {
foreach ($this->getExtensions() as $extension) {
$extension->configureRoutes($this, $this->routes);
}
}
Expand Down Expand Up @@ -1093,13 +1090,12 @@ public function hasRoute($name)
return $this->routes->has($name);
}


/**
* Generates the object url with the given $name
*
* @param string $name
* @param mixed $object
* @param array $parameters
* @param string $name
* @param mixed $object
* @param array $parameters
*
* @return string return a complete url
*/
Expand Down Expand Up @@ -1383,7 +1379,6 @@ public function getRoot()
$parentFieldDescription = $this->getParentFieldDescription();

if (!$parentFieldDescription) {

return $this;
}

Expand Down Expand Up @@ -1990,7 +1985,7 @@ public function buildBreadcrumbs($action, MenuItemInterface $menu = null)
);
}

} else if ($action != 'list') {
} elseif ($action != 'list') {
$breadcrumbs = $child->getBreadcrumbsArray(
$this->trans($this->getLabelTranslatorStrategy()->getLabel(sprintf('%s_%s', $this->getClassnameLabel(), $action), 'breadcrumb', 'link'))
);
Expand Down Expand Up @@ -2078,7 +2073,6 @@ public function transChoice($id, $count, array $parameters = array(), $domain =
return $this->translator->transChoice($id, $count, $parameters, $domain, $locale);
}


/**
* set the translation domain
*
Expand Down Expand Up @@ -2528,7 +2522,7 @@ public function getRouteBuilder()
public function toString($object)
{
if (method_exists($object, '__toString')) {
return (string)$object;
return (string) $object;
}

return sprintf("%s:%s", get_class($object), spl_object_hash($object));
Expand Down
28 changes: 14 additions & 14 deletions Admin/AdminExtensionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,46 @@ interface AdminExtensionInterface
*
* @return void
*/
function configureFormFields(FormMapper $form);
public function configureFormFields(FormMapper $form);

/**
* @param \Sonata\AdminBundle\Datagrid\ListMapper $list
*
* @return void
*/
function configureListFields(ListMapper $list);
public function configureListFields(ListMapper $list);

/**
* @param \Sonata\AdminBundle\Datagrid\DatagridMapper $filter
*
* @return void
*/
function configureDatagridFilters(DatagridMapper $filter);
public function configureDatagridFilters(DatagridMapper $filter);

/**
* @param \Sonata\AdminBundle\Show\ShowMapper $filter
*
* @return void
*/
function configureShowFields(ShowMapper $filter);
public function configureShowFields(ShowMapper $filter);

/**
* @param AdminInterface $admin
* @param \Sonata\AdminBundle\Route\RouteCollection $collection
* @param AdminInterface $admin
* @param \Sonata\AdminBundle\Route\RouteCollection $collection
*
* @return void
*/
function configureRoutes(AdminInterface $admin, RouteCollection $collection);
public function configureRoutes(AdminInterface $admin, RouteCollection $collection);

/**
* @param AdminInterface $admin
* @param \Knp\Menu\ItemInterface $menu
* @param string $action
* @param null|AdminInterface $childAdmin
* @param AdminInterface $admin
* @param \Knp\Menu\ItemInterface $menu
* @param string $action
* @param null|AdminInterface $childAdmin
*
* @return mixed
*/
function configureSideMenu(AdminInterface $admin, MenuItemInterface $menu, $action, AdminInterface $childAdmin = null);
public function configureSideMenu(AdminInterface $admin, MenuItemInterface $menu, $action, AdminInterface $childAdmin = null);

/**
* @param AdminInterface $admin
Expand All @@ -82,13 +82,13 @@ function configureSideMenu(AdminInterface $admin, MenuItemInterface $menu, $acti
*
* @return void
*/
function validate(AdminInterface $admin, ErrorElement $errorElement, $object);
public function validate(AdminInterface $admin, ErrorElement $errorElement, $object);

/**
* @param \Sonata\AdminBundle\Datagrid\ProxyQueryInterface $query
* @param string $context
*
* @return void
*/
function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list');
public function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list');
}
Loading

0 comments on commit cae5a7d

Please sign in to comment.