Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix CS

  • Loading branch information...
commit 15898fe0e4a62e3764fd07cb653870defeebb158 1 parent 531e5c1
@rande rande authored
View
16 Builder/ShowBuilder.php
@@ -27,16 +27,17 @@ class ShowBuilder implements ShowBuilderInterface
/**
* @param \Sonata\AdminBundle\Guesser\TypeGuesserInterface $guesser
- * @param array $templates
+ * @param array $templates
*/
public function __construct(TypeGuesserInterface $guesser, array $templates)
{
- $this->guesser = $guesser;
+ $this->guesser = $guesser;
$this->templates = $templates;
}
/**
* @param array $options
+ *
* @return \Sonata\AdminBundle\Admin\FieldDescriptionCollection
*/
public function getBaseList(array $options = array())
@@ -46,9 +47,10 @@ public function getBaseList(array $options = array())
/**
* @param \Sonata\AdminBundle\Admin\FieldDescriptionCollection $list
- * @param null $type
- * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
- * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
+ * @param null $type
+ * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
+ * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
+ *
* @return mixed
*/
public function addField(FieldDescriptionCollection $list, $type = null, FieldDescriptionInterface $fieldDescription, AdminInterface $admin)
@@ -68,6 +70,7 @@ public function addField(FieldDescriptionCollection $list, $type = null, FieldDe
/**
* @param string $type
+ *
* @return string
*/
private function getTemplate($type)
@@ -82,8 +85,9 @@ private function getTemplate($type)
/**
* The method defines the correct default settings for the provided FieldDescription
*
- * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
+ * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
* @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
+ *
* @return void
*/
public function fixFieldDescription(AdminInterface $admin, FieldDescriptionInterface $fieldDescription)
View
5 DependencyInjection/Compiler/AddAuditEntityCompilerPass.php
@@ -48,13 +48,12 @@ public function process(ContainerBuilder $container)
$autitedEntities = array_unique($autitedEntities);
$container->setParameter('simplethings.entityaudit.audited_entities', $autitedEntities);
- $container->getDefinition('sonata.admin.audit.manager')
- ->addMethodCall('setReader', array('sonata.admin.audit.orm.reader', $autitedEntities));
+ $container->getDefinition('sonata.admin.audit.manager')->addMethodCall('setReader', array('sonata.admin.audit.orm.reader', $autitedEntities));
}
/**
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
- * @param string $name
+ * @param string $name
*
* @return string
*/
View
12 DependencyInjection/Compiler/AddGuesserCompilerPass.php
@@ -31,8 +31,8 @@ public function process(ContainerBuilder $container)
// ListBuilder
$definition = $container->getDefinition('sonata.admin.guesser.orm_list_chain');
- $services = array();
- foreach($container->findTaggedServiceIds('sonata.admin.guesser.orm_list') as $id => $attributes) {
+ $services = array();
+ foreach ($container->findTaggedServiceIds('sonata.admin.guesser.orm_list') as $id => $attributes) {
$services[] = new Reference($id);
}
@@ -40,8 +40,8 @@ public function process(ContainerBuilder $container)
// ListBuilder
$definition = $container->getDefinition('sonata.admin.guesser.orm_datagrid_chain');
- $services = array();
- foreach($container->findTaggedServiceIds('sonata.admin.guesser.orm_datagrid') as $id => $attributes) {
+ $services = array();
+ foreach ($container->findTaggedServiceIds('sonata.admin.guesser.orm_datagrid') as $id => $attributes) {
$services[] = new Reference($id);
}
@@ -49,8 +49,8 @@ public function process(ContainerBuilder $container)
// ShowBuilder
$definition = $container->getDefinition('sonata.admin.guesser.orm_show_chain');
- $services = array();
- foreach($container->findTaggedServiceIds('sonata.admin.guesser.orm_show') as $id => $attributes) {
+ $services = array();
+ foreach ($container->findTaggedServiceIds('sonata.admin.guesser.orm_show') as $id => $attributes) {
$services[] = new Reference($id);
}
View
1  DependencyInjection/SonataDoctrineORMAdminExtension.php
@@ -65,6 +65,7 @@ public function load(array $configs, ContainerBuilder $container)
/**
* @param array $configs
+ *
* @return array
*/
private function fixTemplatesConfiguration(array $configs)
View
1  Filter/ChoiceFilter.php
@@ -61,6 +61,7 @@ public function filter(ProxyQueryInterface $queryBuilder, $alias, $field, $data)
/**
* @param string $type
+ *
* @return bool
*/
private function getOperator($type)
View
3  Filter/Filter.php
@@ -58,13 +58,14 @@ protected function applyWhere(ProxyQueryInterface $queryBuilder, $parameter)
/**
* @param \Sonata\AdminBundle\Datagrid\ProxyQueryInterface $queryBuilder
+ *
* @return string
*/
protected function getNewParameterName(ProxyQueryInterface $queryBuilder)
{
// dots are not accepted in a DQL identifier so replace them
// by underscores.
- return str_replace('.', '_', $this->getName()).'_'.$queryBuilder->getUniqueParameterId();
+ return str_replace('.', '_', $this->getName()) . '_' . $queryBuilder->getUniqueParameterId();
}
/**
View
23 Model/ModelManager.php
@@ -54,9 +54,10 @@ public function getMetadata($class)
* Returns the model's metadata holding the fully qualified property, and the last
* property name
*
- * @param string $baseClass The base class of the model holding the fully qualified property.
+ * @param string $baseClass The base class of the model holding the fully qualified property.
* @param string $propertyFullName The name of the fully qualified property (dot ('.') separated
- * property string)
+ * property string)
+ *
* @return array(
* \Doctrine\ORM\Mapping\ClassMetadata $parentMetadata,
* string $lastPropertyName,
@@ -123,7 +124,7 @@ public function create($object)
$entityManager = $this->getEntityManager($object);
$entityManager->persist($object);
$entityManager->flush();
- } catch ( \PDOException $e ) {
+ } catch (\PDOException $e) {
throw new ModelManagerException('', 0, $e);
}
}
@@ -137,7 +138,7 @@ public function update($object)
$entityManager = $this->getEntityManager($object);
$entityManager->persist($object);
$entityManager->flush();
- } catch ( \PDOException $e ) {
+ } catch (\PDOException $e) {
throw new ModelManagerException('', 0, $e);
}
}
@@ -151,7 +152,7 @@ public function delete($object)
$entityManager = $this->getEntityManager($object);
$entityManager->remove($object);
$entityManager->flush();
- } catch ( \PDOException $e ) {
+ } catch (\PDOException $e) {
throw new ModelManagerException('', 0, $e);
}
}
@@ -161,7 +162,7 @@ public function delete($object)
*/
public function find($class, $id)
{
- if ( !isset($id) ) {
+ if (!isset($id)) {
return null;
}
@@ -233,7 +234,7 @@ public function createQuery($class, $alias = 'o')
public function executeQuery($query)
{
if ($query instanceof QueryBuilder) {
- return $query->getQuery()->execute();
+ return $query->getQuery()->execute();
}
return $query->execute();
@@ -335,7 +336,7 @@ public function batchDelete($class, ProxyQueryInterface $queryProxy)
$entityManager->flush();
$entityManager->clear();
- } catch ( \PDOException $e ) {
+ } catch (\PDOException $e) {
throw new ModelManagerException('', 0, $e);
}
}
@@ -348,7 +349,7 @@ public function getDataSourceIterator(DatagridInterface $datagrid, array $fields
$datagrid->buildPager();
$query = $datagrid->getQuery();
- $query->select('DISTINCT '.$query->getRootAlias());
+ $query->select('DISTINCT ' . $query->getRootAlias());
$query->setFirstResult($firstResult);
$query->setMaxResults($maxResult);
@@ -387,8 +388,8 @@ public function getSortParameters(FieldDescriptionInterface $fieldDescription, D
$values['_sort_order'] = 'ASC';
}
} else {
- $values['_sort_order'] = 'ASC';
- $values['_sort_by'] = $fieldDescription->getName();
+ $values['_sort_order'] = 'ASC';
+ $values['_sort_by'] = $fieldDescription->getName();
}
return array('filter' => $values);
View
2  Tests/Filter/QueryBuilder.php
@@ -21,7 +21,7 @@ class QueryBuilder
/**
* @param string $name
- * @param mixed $value
+ * @param mixed $value
*/
public function setParameter($name, $value)
{
Please sign in to comment.
Something went wrong with that request. Please try again.