Permalink
Browse files

Merge pull request #168 from Adel-E/patch-1

Run PHP-CS PSR2
  • Loading branch information...
2 parents 102c7ac + 4219e70 commit b5e58ed89b720fe3a9933d86652b2d24d4bb761a @willdurand willdurand committed Jul 19, 2012
@@ -278,7 +278,7 @@ protected function getSchemasFromBundle(BundleInterface $bundle)
$logicalName = $this->transformToLogicalName($schema, $bundle);
$finalSchema = new \SplFileInfo($this->getFileLocator()->locate($logicalName));
- $finalSchemas[(string)$finalSchema] = array($bundle, $finalSchema);
+ $finalSchemas[(string) $finalSchema] = array($bundle, $finalSchema);
}
}
}
@@ -287,7 +287,7 @@ protected function getSchemasFromBundle(BundleInterface $bundle)
}
/**
- * @param \SplFileInfo $file
+ * @param \SplFileInfo $file
* @return string
*/
protected function getRelativeFileName(\SplFileInfo $file)
@@ -369,8 +369,8 @@ protected function createBuildTimeFile($file)
/**
* Returns an array of properties as key/value pairs from an input file.
*
- * @param string $file A file properties.
- * @return array An array of properties as key/value pairs.
+ * @param string $file A file properties.
+ * @return array An array of properties as key/value pairs.
*/
protected function getProperties($file)
{
@@ -405,7 +405,7 @@ protected function getProperties($file)
/**
* Return the current Propel cache directory.
- * @return string The current Propel cache directory.
+ * @return string The current Propel cache directory.
*/
protected function getCacheDir()
{
@@ -459,8 +459,8 @@ protected function getConnection(InputInterface $input, OutputInterface $output)
/**
* Extract the database name from a given DSN
*
- * @param string $dsn A DSN
- * @return string The database name extracted from the given DSN
+ * @param string $dsn A DSN
+ * @return string The database name extracted from the given DSN
*/
protected function parseDbName($dsn)
{
@@ -574,8 +574,8 @@ protected function askConfirmation(OutputInterface $output, $question, $default
}
/**
- * @param \SplFileInfo $schema
- * @param BundleInterface $bundle
+ * @param \SplFileInfo $schema
+ * @param BundleInterface $bundle
* @return string
*/
protected function transformToLogicalName(\SplFileInfo $schema, BundleInterface $bundle)
@@ -73,8 +73,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
*
* @see https://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Connection.php#L1491
*
- * @param string $name A connection name.
- * @param array $config A Propel connection configuration.
+ * @param string $name A connection name.
+ * @param array $config A Propel connection configuration.
* @return array
*/
private function getTemporaryConfiguration($name, $config)
@@ -160,8 +160,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
/**
* Load fixtures
*
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
+ * @param \Symfony\Component\Console\Input\InputInterface $input
+ * @param \Symfony\Component\Console\Output\OutputInterface $output
* @return void
*/
protected function loadFixtures(InputInterface $input, OutputInterface $output, $type = null)
@@ -205,8 +205,8 @@ protected function loadFixtures(InputInterface $input, OutputInterface $output,
/**
* Load SQL fixtures
*
- * @param \Symfony\Component\Console\Input\InputInterface $input
- * @param \Symfony\Component\Console\Output\OutputInterface $output
+ * @param \Symfony\Component\Console\Input\InputInterface $input
+ * @param \Symfony\Component\Console\Output\OutputInterface $output
* @return void
*/
protected function loadSqlFixtures(InputInterface $input, OutputInterface $output)
@@ -1,6 +1,5 @@
<?php
-
/**
* This file is part of the PropelBundle package.
* For the full copyright and license information, please view the LICENSE
View
@@ -15,7 +15,7 @@
*/
class Phing extends \Phing
{
- static public function getPhingVersion()
+ public static function getPhingVersion()
{
return 'Phing/Symfony';
}
@@ -55,7 +55,7 @@ public function dump($filename, $connectionName = null)
* Dumps data to fixture from a given connection and
* returns an array.
*
- * @param string $connectionName The connection name
+ * @param string $connectionName The connection name
* @return array
*/
protected function getDataAsArray()
@@ -175,7 +175,7 @@ protected function getDataAsArray()
* Fixes the ordering of foreign key data, by outputting data
* a foreign key depends on before the table with the foreign key.
*
- * @param array $classes The array with the class names
+ * @param array $classes The array with the class names
* @return array
*/
protected function fixOrderingOfForeignKeyData($classes)
@@ -23,5 +23,5 @@
* @param string $filename The file name to write data.
* @param string $connectionName The Propel connection name.
*/
- function dump($filename, $connectionName = null);
+ public function dump($filename, $connectionName = null);
}
@@ -10,7 +10,6 @@
namespace Propel\PropelBundle\DataFixtures\Loader;
-
use \BasePeer;
use \BaseObject;
use \Propel;
@@ -38,7 +37,7 @@
/**
* Transforms a file containing data in an array.
*
- * @param string $file A filename.
+ * @param string $file A filename.
* @return array
*/
abstract protected function transformDataToArray($file);
@@ -23,5 +23,5 @@
* @param array $files A set of files containing datas to load.
* @param string $connectionName The Propel connection name
*/
- function load($files = array(), $connectionName);
+ public function load($files = array(), $connectionName);
}
@@ -28,7 +28,7 @@ protected function transformDataToArray($file)
}
/**
- * @param SimpleXMLElement $xml
+ * @param SimpleXMLElement $xml
* @return array
*/
protected function simpleXmlToArray($xml)
@@ -39,7 +39,7 @@ protected function simpleXmlToArray($xml)
// First make a valid key which is the Ns (Namespace) attribute
// + the element name (the class name)
foreach ($value->attributes() as $subkey => $subvalue) {
- if ('Namespace' === (string)$subkey) {
+ if ('Namespace' === (string) $subkey) {
$key = $subvalue . '\\' . $key;
break;
}
@@ -37,7 +37,7 @@ public function __construct(array $properties = array())
/**
* Get properties.
*
- * @return array An array of properties.
+ * @return array An array of properties.
*/
public function getProperties()
{
View
@@ -26,7 +26,7 @@ class AclClass extends BaseAclClass
*
* @return \Propel\PropelBundle\Model\Acl\AclClass
*/
- static public function fromAclObjectIdentity(ObjectIdentityInterface $objectIdentity, \PropelPDO $con = null)
+ public static function fromAclObjectIdentity(ObjectIdentityInterface $objectIdentity, \PropelPDO $con = null)
{
$obj = AclClassQuery::create()
->filterByType($objectIdentity->getType())
View
@@ -31,7 +31,7 @@ class Entry extends BaseEntry
*
* @return \Propel\PropelBundle\Model\Acl\Entry
*/
- static public function fromAclEntry(EntryInterface $aclEntry)
+ public static function fromAclEntry(EntryInterface $aclEntry)
{
$entry = new self();
@@ -69,7 +69,7 @@ static public function fromAclEntry(EntryInterface $aclEntry)
*
* @return \Symfony\Component\Security\Acl\Model\EntryInterface
*/
- static public function toAclEntry(Entry $modelEntry, AclInterface $acl)
+ public static function toAclEntry(Entry $modelEntry, AclInterface $acl)
{
if (null === $modelEntry->getFieldName()) {
return new AclEntry($modelEntry, $acl);
@@ -25,7 +25,7 @@ class SecurityIdentity extends BaseSecurityIdentity
*
* @return \Symfony\Component\Security\Acl\Model\SecurityIdentityInterface
*/
- static public function toAclIdentity(SecurityIdentity $securityIdentity)
+ public static function toAclIdentity(SecurityIdentity $securityIdentity)
{
$identifier = $securityIdentity->getIdentifier();
@@ -58,7 +58,7 @@ static public function toAclIdentity(SecurityIdentity $securityIdentity)
*
* @return \Propel\PropelBundle\Model\Acl\SecurityIdentity
*/
- static public function fromAclIdentity(SecurityIdentityInterface $aclIdentity, \PropelPDO $con = null)
+ public static function fromAclIdentity(SecurityIdentityInterface $aclIdentity, \PropelPDO $con = null)
{
if ($aclIdentity instanceof UserSecurityIdentity) {
$identifier = $aclIdentity->getClass().'-'.$aclIdentity->getUsername();
@@ -8,7 +8,6 @@
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\Request;
-
/**
* PropelParamConverter
*
@@ -47,8 +46,21 @@ class PropelParamConverter implements ParamConverterInterface
*/
protected $withs;
+ /**
+ * @var bool
+ */
protected $hasWith = false;
+ /**
+ * @param Request $request
+ * @param ConfigurationInterface $configuration
+ *
+ * @return bool
+ *
+ * @throws \LogicException
+ * @throws NotFoundHttpException
+ * @throws \Exception
+ */
public function apply(Request $request, ConfigurationInterface $configuration)
{
$classQuery = $configuration->getClass() . 'Query';
@@ -107,6 +119,11 @@ public function apply(Request $request, ConfigurationInterface $configuration)
return true;
}
+ /**
+ * @param ConfigurationInterface $configuration
+ *
+ * @return bool
+ */
public function supports(ConfigurationInterface $configuration)
{
if (null === ($classname = $configuration->getClass())) {
@@ -129,6 +146,8 @@ public function supports(ConfigurationInterface $configuration)
*
* @param string $classQuery the query class
* @param Request $request
+ *
+ * @return mixed
*/
protected function findPk($classQuery, Request $request)
{
@@ -146,9 +165,10 @@ protected function findPk($classQuery, Request $request)
/**
* Try to find the object with all params from the $request
*
- * @param string $classQuery
- * @param Request $request the query class
- * @param array $exclude an array of param to exclude from the filter
+ * @param string $classQuery the query class
+ * @param Request $request
+ *
+ * @return mixed
*/
protected function findOneBy($classQuery, Request $request)
{
@@ -178,6 +198,9 @@ protected function findOneBy($classQuery, Request $request)
* Init the query class with optional joinWith
*
* @param string $classQuery
+ *
+ * @return \ModelCriteria
+ *
* @throws \Exception
*/
protected function getQuery($classQuery)
@@ -207,6 +230,9 @@ protected function getQuery($classQuery)
* Return the valid join Criteria base on the with parameter
*
* @param array $with
+ *
+ * @return string
+ *
* @throws \Exception
*/
protected function getValidJoin($with)
@@ -10,7 +10,6 @@
namespace Propel\PropelBundle\Security\Acl\Domain;
-
use Symfony\Component\Security\Acl\Exception\Exception as AclException;
use Symfony\Component\Security\Acl\Model\AclInterface;
@@ -24,7 +24,6 @@
use Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException;
use Symfony\Component\Security\Acl\Exception\Exception as AclException;
-
use Symfony\Component\Security\Acl\Model\AclInterface;
use Symfony\Component\Security\Acl\Model\EntryInterface;
use Symfony\Component\Security\Acl\Model\FieldEntryInterface;
@@ -61,7 +61,7 @@ protected function cleanFixtureIterator($file_iterator)
{
$tmp_dir = $this->fixtures_dir;
- return array_map(function($file) use($tmp_dir) {
+ return array_map(function($file) use ($tmp_dir) {
return str_replace($tmp_dir . DIRECTORY_SEPARATOR, '', $file);
}, array_keys(iterator_to_array($file_iterator)));
}
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBook;
-
/**
* Skeleton subclass for representing a row from the 'book' table.
*
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookPeer;
-
/**
* Skeleton subclass for performing query and update operations on the 'book' table.
*
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookQuery;
-
/**
* Skeleton subclass for performing query and update operations on the 'book' table.
*
@@ -5,7 +5,6 @@
use \RelationMap;
use \TableMap;
-
/**
* This class defines the structure of the 'book' table.
*
@@ -29,8 +28,8 @@ class BookTableMap extends TableMap
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
- * @return void
- * @throws PropelException
+ * @return void
+ * @throws PropelException
*/
public function initialize()
{
Oops, something went wrong.

0 comments on commit b5e58ed

Please sign in to comment.