Permalink
Browse files

Automated CS fixes (mainly to trigger travis build)

  • Loading branch information...
1 parent bcf6987 commit 1ed071adeb9fd93e1dfa47d4e7b9618791b0b7de @Ocramius Ocramius committed Aug 6, 2012
View
2 src/DoctrineORMModule/Collector/SQLLoggerCollector.php
@@ -52,7 +52,7 @@ class SQLLoggerCollector implements CollectorInterface, AutoHideInterface
/**
* @param DebugStack $sqlLogger
- * @param string $name
+ * @param string $name
*/
public function __construct(DebugStack $sqlLogger, $name)
{
View
3 src/DoctrineORMModule/Form/Annotation/AnnotationBuilder.php
@@ -40,6 +40,7 @@ public function setAnnotationManager(AnnotationManager $annotationManager)
$parser->registerAnnotation('Doctrine\ORM\Mapping\GeneratedValue');
$this->annotationManager->attach($parser);
+
return $this;
}
@@ -57,4 +58,4 @@ public function setEventManager(EventManagerInterface $events)
return $this;
}
-}
+}
View
11 src/DoctrineORMModule/Form/Annotation/ElementAnnotationsListener.php
@@ -2,7 +2,6 @@
namespace DoctrineORMModule\Form\Annotation;
-use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\GeneratedValue;
use Zend\EventManager\EventManagerInterface;
@@ -64,7 +63,7 @@ public function handleAttributesAnnotation($e)
$attributes = array();
- switch($annotation->type) {
+ switch ($annotation->type) {
case 'bool':
case 'boolean':
$attributes['type'] = 'checkbox';
@@ -89,7 +88,7 @@ public function handleAttributesAnnotation($e)
public function handleExcludeAnnotation($e)
{
$annotations = $e->getParam('annotations');
- foreach($annotations as $annotation) {
+ foreach ($annotations as $annotation) {
if ($annotation instanceof GeneratedValue) {
if ($annotation->strategy == 'AUTO') {
return true;
@@ -120,7 +119,7 @@ public function handleFilterAnnotation($e)
$inputSpec['filters'] = array();
}
- switch($annotation->type) {
+ switch ($annotation->type) {
case 'bool':
case 'boolean':
$inputSpec['filters'][] = array('name' => 'Boolean');
@@ -176,7 +175,7 @@ public function handleTypeAnnotation($e)
}
$type = $annotation->type;
- switch($type) {
+ switch ($type) {
default:
$type = 'Zend\Form\Element';
break;
@@ -206,7 +205,7 @@ public function handleValidatorAnnotation($e)
$inputSpec['validators'] = array();
}
- switch($annotation->type) {
+ switch ($annotation->type) {
case 'bool':
case 'boolean':
$inputSpec['validators'][] = array(
View
14 src/DoctrineORMModule/Form/Element/DoctrineEntity.php
@@ -51,13 +51,13 @@ class DoctrineEntity extends Element implements InputProviderInterface
*/
protected $entities;
-
/**
* @return array|\Traversable
*/
public function getAttributes()
{
$this->loadOptions();
+
return parent::getAttributes();
}
@@ -125,6 +125,7 @@ public function getEntities()
public function setObjectManager(ObjectManager $objectManager)
{
$this->objectManager = $objectManager;
+
return $this;
}
@@ -141,12 +142,13 @@ public function getObjectManager()
/**
* Set the FQCN of the target entity
*
- * @param string $targetClass
+ * @param string $targetClass
* @return DoctrineEntity
*/
public function setTargetClass($targetClass)
{
$this->targetClass = $targetClass;
+
return $this;
}
@@ -163,12 +165,13 @@ public function getTargetClass()
/**
* Set the property to use as the label in the options
*
- * @param string $property
+ * @param string $property
* @return DoctrineEntity
*/
public function setProperty($property)
{
$this->property = $property;
+
return $this;
}
@@ -189,6 +192,7 @@ public function getProperty()
public function setSpec($spec)
{
$this->spec = $spec;
+
return $this;
}
@@ -256,7 +260,7 @@ protected function loadOptions()
$entities = $this->getEntities();
$options = array();
- foreach($entities as $key => $entity) {
+ foreach ($entities as $key => $entity) {
if (($property = $this->property)) {
if (!$metadata->hasField($property)) {
throw new RuntimeException(sprintf(
@@ -298,4 +302,4 @@ protected function loadOptions()
$this->attributes['options'] = $options;
}
-}
+}
View
2 src/DoctrineORMModule/Module.php
@@ -143,4 +143,4 @@ public function getServiceConfig()
),
);
}
-}
+}
View
38 src/DoctrineORMModule/Options/Configuration.php
@@ -109,12 +109,13 @@ class Configuration extends DBALConfiguration
protected $namedNativeQueries = array();
/**
- * @param array $datetimeFunctions
+ * @param array $datetimeFunctions
* @return self
*/
public function setDatetimeFunctions($datetimeFunctions)
{
$this->datetimeFunctions = $datetimeFunctions;
+
return $this;
}
@@ -127,12 +128,13 @@ public function getDatetimeFunctions()
}
/**
- * @param string $driver
+ * @param string $driver
* @return self
*/
public function setDriver($driver)
{
$this->driver = $driver;
+
return $this;
}
@@ -145,12 +147,13 @@ public function getDriver()
}
/**
- * @param array $entityNamespaces
+ * @param array $entityNamespaces
* @return self
*/
public function setEntityNamespaces($entityNamespaces)
{
$this->entityNamespaces = $entityNamespaces;
+
return $this;
}
@@ -163,12 +166,13 @@ public function getEntityNamespaces()
}
/**
- * @param boolean $generateProxies
+ * @param boolean $generateProxies
* @return self
*/
public function setGenerateProxies($generateProxies)
{
$this->generateProxies = $generateProxies;
+
return $this;
}
@@ -181,12 +185,13 @@ public function getGenerateProxies()
}
/**
- * @param string $metadataCache
+ * @param string $metadataCache
* @return self
*/
public function setMetadataCache($metadataCache)
{
$this->metadataCache = $metadataCache;
+
return $this;
}
@@ -199,12 +204,13 @@ public function getMetadataCache()
}
/**
- * @param array $namedNativeQueries
+ * @param array $namedNativeQueries
* @return self
*/
public function setNamedNativeQueries($namedNativeQueries)
{
$this->namedNativeQueries = $namedNativeQueries;
+
return $this;
}
@@ -217,12 +223,13 @@ public function getNamedNativeQueries()
}
/**
- * @param array $namedQueries
+ * @param array $namedQueries
* @return self
*/
public function setNamedQueries($namedQueries)
{
$this->namedQueries = $namedQueries;
+
return $this;
}
@@ -235,12 +242,13 @@ public function getNamedQueries()
}
/**
- * @param array $numericFunctions
+ * @param array $numericFunctions
* @return self
*/
public function setNumericFunctions($numericFunctions)
{
$this->numericFunctions = $numericFunctions;
+
return $this;
}
@@ -253,12 +261,13 @@ public function getNumericFunctions()
}
/**
- * @param string $proxyDir
+ * @param string $proxyDir
* @return self
*/
public function setProxyDir($proxyDir)
{
$this->proxyDir = $proxyDir;
+
return $this;
}
@@ -271,12 +280,13 @@ public function getProxyDir()
}
/**
- * @param string $proxyNamespace
+ * @param string $proxyNamespace
* @return self
*/
public function setProxyNamespace($proxyNamespace)
{
$this->proxyNamespace = $proxyNamespace;
+
return $this;
}
@@ -289,12 +299,13 @@ public function getProxyNamespace()
}
/**
- * @param string $queryCache
+ * @param string $queryCache
* @return self
*/
public function setQueryCache($queryCache)
{
$this->queryCache = $queryCache;
+
return $this;
}
@@ -307,12 +318,13 @@ public function getQueryCache()
}
/**
- * @param array $stringFunctions
+ * @param array $stringFunctions
* @return self
*/
public function setStringFunctions($stringFunctions)
{
$this->stringFunctions = $stringFunctions;
+
return $this;
}
@@ -323,4 +335,4 @@ public function getStringFunctions()
{
return $this->stringFunctions;
}
-}
+}
View
2 src/DoctrineORMModule/Options/DBALConnection.php
@@ -133,7 +133,7 @@ public function getParams()
}
/**
- * @param array $doctrineTypeMappings
+ * @param array $doctrineTypeMappings
* @return \DoctrineORMModule\Options\DBALConnection
*/
public function setDoctrineTypeMappings($doctrineTypeMappings)
View
6 src/DoctrineORMModule/Options/EntityManager.php
@@ -25,7 +25,7 @@ class EntityManager extends AbstractOptions
protected $connection = 'orm_default';
/**
- * @param string $configuration
+ * @param string $configuration
* @return self
*/
public function setConfiguration($configuration)
@@ -44,7 +44,7 @@ public function getConfiguration()
}
/**
- * @param string $connection
+ * @param string $connection
* @return self
*/
public function setConnection($connection)
@@ -62,4 +62,4 @@ public function getConnection()
{
return 'doctrine.connection.' . $this->connection;
}
-}
+}
View
2 src/DoctrineORMModule/Options/SQLLoggerCollectorOptions.php
@@ -98,4 +98,4 @@ public function getSqlLogger()
{
return $this->sqlLogger;
}
-}
+}
View
3 src/DoctrineORMModule/Paginator/Adapter/DoctrinePaginator.php
@@ -20,7 +20,6 @@
namespace DoctrineORMModule\Paginator\Adapter;
use Doctrine\ORM\Tools\Pagination\Paginator;
-use Doctrine\ORM\QueryBuilder;
use Zend\Paginator\Adapter\AdapterInterface;
/**
@@ -49,7 +48,7 @@ public function __construct(Paginator $paginator)
}
/**
- * @param Paginator $paginator
+ * @param Paginator $paginator
* @return self
*/
public function setPaginator(Paginator $paginator)
View
6 src/DoctrineORMModule/Service/ConfigurationFactory.php
@@ -40,11 +40,11 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$config->setCustomStringFunctions($options->getStringFunctions());
$config->setCustomNumericFunctions($options->getNumericFunctions());
- foreach($options->getNamedQueries() as $name => $query) {
+ foreach ($options->getNamedQueries() as $name => $query) {
$config->addNamedQuery($name, $query);
}
- foreach($options->getNamedNativeQueries() as $name => $query) {
+ foreach ($options->getNamedNativeQueries() as $name => $query) {
$config->addNamedNativeQuery($name, $query['sql'], new $query['rsm']);
}
@@ -62,4 +62,4 @@ protected function getOptionsClass()
{
return 'DoctrineORMModule\Options\Configuration';
}
-}
+}
View
2 src/DoctrineORMModule/Service/EntityManagerFactory.php
@@ -46,4 +46,4 @@ public function getOptionsClass()
{
return 'DoctrineORMModule\Options\EntityManager';
}
-}
+}
View
2 src/DoctrineORMModule/Service/SQLLoggerCollectorFactory.php
@@ -113,4 +113,4 @@ protected function getOptionsClass()
{
return 'DoctrineORMModule\Options\SQLLoggerCollectorOptions';
}
-}
+}
View
3 src/DoctrineORMModule/Stdlib/Hydrator/DoctrineEntity.php
@@ -39,6 +39,7 @@ protected function find($target, $identifiers)
{
/* @var $entityManager \Doctrine\ORM\EntityManager */
$entityManager = $this->objectManager;
+
return $entityManager->getReference($target, $identifiers);
}
-}
+}

0 comments on commit 1ed071a

Please sign in to comment.