Permalink
Browse files

RUN PHP-CS PSR-2

  • Loading branch information...
1 parent 102c7ac commit 4219e706d4b189b6691d002677ba1a28c5db488b @Adel-E Adel-E committed with Adel-E Jul 18, 2012
View
18 Command/AbstractCommand.php
@@ -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)
View
4 Command/DatabaseCreateCommand.php
@@ -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)
View
8 Command/FixturesLoadCommand.php
@@ -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)
View
1 Command/FormGenerateCommand.php
@@ -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
2 Command/Phing.php
@@ -15,7 +15,7 @@
*/
class Phing extends \Phing
{
- static public function getPhingVersion()
+ public static function getPhingVersion()
{
return 'Phing/Symfony';
}
View
4 DataFixtures/Dumper/AbstractDataDumper.php
@@ -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)
View
2 DataFixtures/Dumper/DataDumperInterface.php
@@ -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);
}
View
3 DataFixtures/Loader/AbstractDataLoader.php
@@ -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);
View
2 DataFixtures/Loader/DataLoaderInterface.php
@@ -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);
}
View
4 DataFixtures/Loader/XmlDataLoader.php
@@ -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;
}
View
2 DependencyInjection/Properties.php
@@ -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
2 Model/Acl/AclClass.php
@@ -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
4 Model/Acl/Entry.php
@@ -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);
View
4 Model/Acl/SecurityIdentity.php
@@ -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();
View
34 Request/ParamConverter/PropelParamConverter.php
@@ -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)
View
1 Security/Acl/Domain/Acl.php
@@ -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;
View
1 Security/Acl/MutableAclProvider.php
@@ -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;
View
2 Tests/Command/FixturesLoadCommandTest.php
@@ -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)));
}
View
1 Tests/Fixtures/Model/Book.php
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBook;
-
/**
* Skeleton subclass for representing a row from the 'book' table.
*
View
1 Tests/Fixtures/Model/BookPeer.php
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookPeer;
-
/**
* Skeleton subclass for performing query and update operations on the 'book' table.
*
View
1 Tests/Fixtures/Model/BookQuery.php
@@ -4,7 +4,6 @@
use Propel\PropelBundle\Tests\Fixtures\Model\om\BaseBookQuery;
-
/**
* Skeleton subclass for performing query and update operations on the 'book' table.
*
View
5 Tests/Fixtures/Model/map/BookTableMap.php
@@ -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()
{
View
119 Tests/Fixtures/Model/om/BaseBook.php
@@ -9,7 +9,6 @@
use \Persistent;
use \Propel;
use \PropelException;
-use \PropelObjectCollection;
use \PropelPDO;
use Propel\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery;
@@ -71,7 +70,7 @@
/**
* Get the [id] column value.
*
- * @return int
+ * @return int
*/
public function getId()
{
@@ -81,7 +80,7 @@ public function getId()
/**
* Get the [name] column value.
*
- * @return string
+ * @return string
*/
public function getName()
{
@@ -91,7 +90,7 @@ public function getName()
/**
* Get the [slug] column value.
*
- * @return string
+ * @return string
*/
public function getSlug()
{
@@ -101,8 +100,8 @@ public function getSlug()
/**
* Set the value of [id] column.
*
- * @param int $v new value
- * @return Book The current object (for fluent API support)
+ * @param int $v new value
+ * @return Book The current object (for fluent API support)
*/
public function setId($v)
{
@@ -121,8 +120,8 @@ public function setId($v)
/**
* Set the value of [name] column.
*
- * @param string $v new value
- * @return Book The current object (for fluent API support)
+ * @param string $v new value
+ * @return Book The current object (for fluent API support)
*/
public function setName($v)
{
@@ -141,8 +140,8 @@ public function setName($v)
/**
* Set the value of [slug] column.
*
- * @param string $v new value
- * @return Book The current object (for fluent API support)
+ * @param string $v new value
+ * @return Book The current object (for fluent API support)
*/
public function setSlug($v)
{
@@ -164,7 +163,7 @@ public function setSlug($v)
* This method can be used in conjunction with isModified() to indicate whether an object is both
* modified _and_ has some values set which are non-default.
*
- * @return boolean Whether the columns in this object are only been set with default values.
+ * @return boolean Whether the columns in this object are only been set with default values.
*/
public function hasOnlyDefaultValues()
{
@@ -180,11 +179,11 @@ public function hasOnlyDefaultValues()
* for results of JOIN queries where the resultset row includes columns from two or
* more tables.
*
- * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
- * @param int $startcol 0-based offset column which indicates which restultset column to start with.
- * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
- * @return int next starting column
- * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
+ * @param array $row The row returned by PDOStatement->fetch(PDO::FETCH_NUM)
+ * @param int $startcol 0-based offset column which indicates which restultset column to start with.
+ * @param boolean $rehydrate Whether this object is being re-hydrated from the database.
+ * @return int next starting column
+ * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
*/
public function hydrate($row, $startcol = 0, $rehydrate = false)
{
@@ -219,7 +218,7 @@ public function hydrate($row, $startcol = 0, $rehydrate = false)
* the base method from the overridden method (i.e. parent::ensureConsistency()),
* in case your model changes.
*
- * @throws PropelException
+ * @throws PropelException
*/
public function ensureConsistency()
{
@@ -231,10 +230,10 @@ public function ensureConsistency()
*
* This will only work if the object has been saved and has a valid primary key set.
*
- * @param boolean $deep (optional) Whether to also de-associated any related objects.
- * @param PropelPDO $con (optional) The PropelPDO connection to use.
- * @return void
- * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
+ * @param boolean $deep (optional) Whether to also de-associated any related objects.
+ * @param PropelPDO $con (optional) The PropelPDO connection to use.
+ * @return void
+ * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db
*/
public function reload($deep = false, PropelPDO $con = null)
{
@@ -269,9 +268,9 @@ public function reload($deep = false, PropelPDO $con = null)
/**
* Removes this object from datastore and sets delete attribute.
*
- * @param PropelPDO $con
- * @return void
- * @throws PropelException
+ * @param PropelPDO $con
+ * @return void
+ * @throws PropelException
* @see BaseObject::setDeleted()
* @see BaseObject::isDeleted()
*/
@@ -312,9 +311,9 @@ public function delete(PropelPDO $con = null)
* method. This method wraps all precipitate database operations in a
* single transaction.
*
- * @param PropelPDO $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
* @see doSave()
*/
public function save(PropelPDO $con = null)
@@ -363,9 +362,9 @@ public function save(PropelPDO $con = null)
* If the object is new, it inserts it; otherwise an update is performed.
* All related objects are also updated in this method.
*
- * @param PropelPDO $con
- * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
- * @throws PropelException
+ * @param PropelPDO $con
+ * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations.
+ * @throws PropelException
* @see save()
*/
protected function doSave(PropelPDO $con)
@@ -414,7 +413,7 @@ protected function doSave(PropelPDO $con)
* Gets any ValidationFailed objects that resulted from last call to validate().
*
*
- * @return array ValidationFailed[]
+ * @return array ValidationFailed[]
* @see validate()
*/
public function getValidationFailures()
@@ -428,8 +427,8 @@ public function getValidationFailures()
* If $columns is either a column name or an array of column names
* only those columns are validated.
*
- * @param mixed $columns Column name or an array of column names.
- * @return boolean Whether all columns pass validation.
+ * @param mixed $columns Column name or an array of column names.
+ * @return boolean Whether all columns pass validation.
* @see doValidate()
* @see getValidationFailures()
*/
@@ -454,8 +453,8 @@ public function validate($columns = null)
* also be validated. If all pass then <code>true</code> is returned; otherwise
* an aggreagated array of ValidationFailed objects will be returned.
*
- * @param array $columns Array of column names to validate.
- * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
+ * @param array $columns Array of column names to validate.
+ * @return mixed <code>true</code> if all validations pass; array of <code>ValidationFailed</code> objets otherwise.
*/
protected function doValidate($columns = null)
{
@@ -485,7 +484,7 @@ protected function doValidate($columns = null)
* @param string $type The type of fieldname the $name is of:
* one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
- * @return mixed Value of field.
+ * @return mixed Value of field.
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
@@ -499,8 +498,8 @@ public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
* Retrieves a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @return mixed Value of field at $pos
+ * @param int $pos position in xml schema
+ * @return mixed Value of field at $pos
*/
public function getByPosition($pos)
{
@@ -532,7 +531,7 @@ public function getByPosition($pos)
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE.
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
*
- * @return array an associative array containing the field names (as keys) and field values
+ * @return array an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
{
@@ -558,7 +557,7 @@ public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColum
* @param string $type The type of fieldname the $name is of:
* one of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
- * @return void
+ * @return void
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
@@ -571,9 +570,9 @@ public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
* Sets a field from the object by Position as specified in the xml schema.
* Zero-based.
*
- * @param int $pos position in xml schema
- * @param mixed $value field value
- * @return void
+ * @param int $pos position in xml schema
+ * @param mixed $value field value
+ * @return void
*/
public function setByPosition($pos, $value)
{
@@ -603,9 +602,9 @@ public function setByPosition($pos, $value)
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
* The default key type is the column's phpname (e.g. 'AuthorId')
*
- * @param array $arr An array to populate the object from.
- * @param string $keyType The type of keys the array uses.
- * @return void
+ * @param array $arr An array to populate the object from.
+ * @param string $keyType The type of keys the array uses.
+ * @return void
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
@@ -619,7 +618,7 @@ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
/**
* Build a Criteria object containing the values of all modified columns in this object.
*
- * @return Criteria The Criteria object containing all modified values.
+ * @return Criteria The Criteria object containing all modified values.
*/
public function buildCriteria()
{
@@ -638,7 +637,7 @@ public function buildCriteria()
* Unlike buildCriteria() this method includes the primary key values regardless
* of whether or not they have been modified.
*
- * @return Criteria The Criteria object containing value(s) for primary key(s).
+ * @return Criteria The Criteria object containing value(s) for primary key(s).
*/
public function buildPkeyCriteria()
{
@@ -650,7 +649,7 @@ public function buildPkeyCriteria()
/**
* Returns the primary key for this object (row).
- * @return int
+ * @return int
*/
public function getPrimaryKey()
{
@@ -660,8 +659,8 @@ public function getPrimaryKey()
/**
* Generic method to set the primary key (id column).
*
- * @param int $key Primary key.
- * @return void
+ * @param int $key Primary key.
+ * @return void
*/
public function setPrimaryKey($key)
{
@@ -670,7 +669,7 @@ public function setPrimaryKey($key)
/**
* Returns true if the primary key for this object is null.
- * @return boolean
+ * @return boolean
*/
public function isPrimaryKeyNull()
{
@@ -683,10 +682,10 @@ public function isPrimaryKeyNull()
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param object $copyObj An object of Book (or compatible) type.
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
- * @throws PropelException
+ * @param object $copyObj An object of Book (or compatible) type.
+ * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new.
+ * @throws PropelException
*/
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
@@ -706,9 +705,9 @@ public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
* If desired, this method can also make copies of all associated (fkey referrers)
* objects.
*
- * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
- * @return Book Clone of current object.
- * @throws PropelException
+ * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
+ * @return Book Clone of current object.
+ * @throws PropelException
*/
public function copy($deepCopy = false)
{
@@ -727,7 +726,7 @@ public function copy($deepCopy = false)
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return BookPeer
+ * @return BookPeer
*/
public function getPeer()
{
View
165 Tests/Fixtures/Model/om/BaseBookPeer.php
@@ -61,11 +61,10 @@
* An identiy map to hold any loaded instances of Book objects.
* This must be public so that other peer classes can access this when hydrating from JOIN
* queries.
- * @var array Book[]
+ * @var array Book[]
*/
public static $instances = array();
-
/**
* holds an array of fieldnames
*
@@ -102,11 +101,11 @@
* @param string $name field name
* @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
- * @param string $toType One of the class type constants
- * @return string translated name of the field.
- * @throws PropelException - if the specified name could not be found in the fieldname mappings.
+ * @param string $toType One of the class type constants
+ * @return string translated name of the field.
+ * @throws PropelException - if the specified name could not be found in the fieldname mappings.
*/
- static public function translateFieldName($name, $fromType, $toType)
+ public static function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
@@ -123,10 +122,10 @@ static public function translateFieldName($name, $fromType, $toType)
* @param string $type The type of fieldnames to return:
* One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
* BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
- * @return array A list of field names
+ * @return array A list of field names
*/
- static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
+ public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
if (!array_key_exists($type, self::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. ' . $type . ' was given.');
@@ -140,12 +139,12 @@ static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
- * $c->addAlias("alias1", TablePeer::TABLE_NAME);
- * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
+ * $c->addAlias("alias1", TablePeer::TABLE_NAME);
+ * $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
- * @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. BookPeer::COLUMN_NAME).
- * @return string
+ * @param string $alias The alias for the current table.
+ * @param string $column The column name for current table. (i.e. BookPeer::COLUMN_NAME).
+ * @return string
*/
public static function alias($alias, $column)
{
@@ -159,10 +158,10 @@ public static function alias($alias, $column)
* XML schema will not be added to the select list and only loaded
* on demand.
*
- * @param Criteria $criteria object containing the columns to add.
- * @param string $alias optional table alias
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param Criteria $criteria object containing the columns to add.
+ * @param string $alias optional table alias
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria, $alias = null)
{
@@ -180,10 +179,10 @@ public static function addSelectColumns(Criteria $criteria, $alias = null)
/**
* Returns the number of rows matching criteria.
*
- * @param Criteria $criteria
- * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
- * @param PropelPDO $con
- * @return int Number of matching rows.
+ * @param Criteria $criteria
+ * @param boolean $distinct Whether to select only distinct columns; deprecated: use Criteria->setDistinct() instead.
+ * @param PropelPDO $con
+ * @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, PropelPDO $con = null)
{
@@ -224,11 +223,11 @@ public static function doCount(Criteria $criteria, $distinct = false, PropelPDO
/**
* Selects one object from the DB.
*
- * @param Criteria $criteria object used to create the SELECT statement.
- * @param PropelPDO $con
- * @return Book
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param Criteria $criteria object used to create the SELECT statement.
+ * @param PropelPDO $con
+ * @return Book
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
{
@@ -244,11 +243,11 @@ public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
/**
* Selects several row from the DB.
*
- * @param Criteria $criteria The Criteria object used to build the SELECT statement.
- * @param PropelPDO $con
- * @return array Array of selected Objects
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param Criteria $criteria The Criteria object used to build the SELECT statement.
+ * @param PropelPDO $con
+ * @return array Array of selected Objects
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
@@ -260,11 +259,11 @@ public static function doSelect(Criteria $criteria, PropelPDO $con = null)
* Use this method directly if you want to work with an executed statement durirectly (for example
* to perform your own object hydration).
*
- * @param Criteria $criteria The Criteria object used to build the SELECT statement.
- * @param PropelPDO $con The connection to use
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- * @return PDOStatement The executed PDOStatement object.
+ * @param Criteria $criteria The Criteria object used to build the SELECT statement.
+ * @param PropelPDO $con The connection to use
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ * @return PDOStatement The executed PDOStatement object.
* @see BasePeer::doSelect()
*/
public static function doSelectStmt(Criteria $criteria, PropelPDO $con = null)
@@ -339,8 +338,8 @@ public static function removeInstanceFromPool($value)
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
- * @param string $key The key (@see getPrimaryKeyHash()) for this instance.
- * @return Book Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
+ * @param string $key The key (@see getPrimaryKeyHash()) for this instance.
+ * @return Book Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled.
* @see getPrimaryKeyHash()
*/
public static function getInstanceFromPool($key)
@@ -357,7 +356,7 @@ public static function getInstanceFromPool($key)
/**
* Clear the instance pool.
*
- * @return void
+ * @return void
*/
public static function clearInstancePool()
{
@@ -378,9 +377,9 @@ public static function clearRelatedInstancePool()
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, a serialize()d version of the primary key will be returned.
*
- * @param array $row PropelPDO resultset row.
- * @param int $startcol The 0-based offset for reading from the resultset row.
- * @return string A string version of PK or NULL if the components of primary key in result array are all null.
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @return string A string version of PK or NULL if the components of primary key in result array are all null.
*/
public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
{
@@ -397,9 +396,9 @@ public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
* For tables with a single-column primary key, that simple pkey value will be returned. For tables with
* a multi-column primary key, an array of the primary key columns will be returned.
*
- * @param array $row PropelPDO resultset row.
- * @param int $startcol The 0-based offset for reading from the resultset row.
- * @return mixed The primary key of the row
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @return mixed The primary key of the row
*/
public static function getPrimaryKeyFromRow($row, $startcol = 0)
{
@@ -410,8 +409,8 @@ public static function getPrimaryKeyFromRow($row, $startcol = 0)
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function populateObjects(PDOStatement $stmt)
{
@@ -441,11 +440,11 @@ public static function populateObjects(PDOStatement $stmt)
/**
* Populates an object of the default type or an object that inherit from the default.
*
- * @param array $row PropelPDO resultset row.
- * @param int $startcol The 0-based offset for reading from the resultset row.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
- * @return array (Book object, last column rank)
+ * @param array $row PropelPDO resultset row.
+ * @param int $startcol The 0-based offset for reading from the resultset row.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
+ * @return array (Book object, last column rank)
*/
public static function populateObject($row, $startcol = 0)
{
@@ -468,9 +467,9 @@ public static function populateObject($row, $startcol = 0)
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
- * @return TableMap
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @return TableMap
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
@@ -496,8 +495,8 @@ public static function buildTableMap()
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
- * @param boolean $withPrefix Whether or not to return the path with the class name
- * @return string path.to.ClassName
+ * @param boolean $withPrefix Whether or not to return the path with the class name
+ * @return string path.to.ClassName
*/
public static function getOMClass($withPrefix = true)
{
@@ -507,11 +506,11 @@ public static function getOMClass($withPrefix = true)
/**
* Performs an INSERT on the database, given a Book or Criteria object.
*
- * @param mixed $values Criteria or Book object containing data that is used to create the INSERT statement.
- * @param PropelPDO $con the PropelPDO connection to use
- * @return mixed The new primary key.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param mixed $values Criteria or Book object containing data that is used to create the INSERT statement.
+ * @param PropelPDO $con the PropelPDO connection to use
+ * @return mixed The new primary key.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function doInsert($values, PropelPDO $con = null)
{
@@ -529,7 +528,6 @@ public static function doInsert($values, PropelPDO $con = null)
throw new PropelException('Cannot insert a value for auto-increment primary key ('.BookPeer::ID.')');
}
-
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
@@ -550,11 +548,11 @@ public static function doInsert($values, PropelPDO $con = null)
/**
* Performs an UPDATE on the database, given a Book or Criteria object.
*
- * @param mixed $values Criteria or Book object containing data that is used to create the UPDATE statement.
- * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
- * @return int The number of affected rows (if supported by underlying database driver).
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param mixed $values Criteria or Book object containing data that is used to create the UPDATE statement.
+ * @param PropelPDO $con The connection to use (specify PropelPDO connection object to exert more control over transactions).
+ * @return int The number of affected rows (if supported by underlying database driver).
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, PropelPDO $con = null)
{
@@ -589,8 +587,8 @@ public static function doUpdate($values, PropelPDO $con = null)
/**
* Deletes all rows from the book table.
*
- * @param PropelPDO $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver).
+ * @param PropelPDO $con the connection to use
+ * @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll(PropelPDO $con = null)
{
@@ -622,11 +620,11 @@ public static function doDeleteAll(PropelPDO $con = null)
*
* @param mixed $values Criteria or Book object or primary key or array of primary keys
* which is used to create the DELETE statement
- * @param PropelPDO $con the connection to use
- * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
- * if supported by native driver or if emulated using Propel.
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param PropelPDO $con the connection to use
+ * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows
+ * if supported by native driver or if emulated using Propel.
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
@@ -686,7 +684,7 @@ public static function doDelete($values, PropelPDO $con = null)
* @param Book $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
- * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
+ * @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate($obj, $cols = null)
{
@@ -716,9 +714,9 @@ public static function doValidate($obj, $cols = null)
/**
* Retrieve a single object by pkey.
*
- * @param int $pk the primary key.
- * @param PropelPDO $con the connection to use
- * @return Book
+ * @param int $pk the primary key.
+ * @param PropelPDO $con the connection to use
+ * @return Book
*/
public static function retrieveByPK($pk, PropelPDO $con = null)
{
@@ -742,10 +740,10 @@ public static function retrieveByPK($pk, PropelPDO $con = null)
/**
* Retrieve multiple objects by pkey.
*
- * @param array $pks List of primary keys
- * @param PropelPDO $con the connection to use
- * @throws PropelException Any exceptions caught during processing will be
- * rethrown wrapped into a PropelException.
+ * @param array $pks List of primary keys
+ * @param PropelPDO $con the connection to use
+ * @throws PropelException Any exceptions caught during processing will be
+ * rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
@@ -770,4 +768,3 @@ public static function retrieveByPKs($pks, PropelPDO $con = null)
// This is the static code needed to register the TableMap for this table with the main Propel class.
//
BaseBookPeer::buildTableMap();
-
View
19 Tests/Fixtures/Model/om/BaseBookQuery.php
@@ -4,7 +4,6 @@
use \Criteria;
use \ModelCriteria;
-use \ModelJoin;
use \PropelPDO;
use Propel\PropelBundle\Tests\Fixtures\Model\BookPeer;
use Propel\PropelBundle\Tests\Fixtures\Model\BookQuery;
@@ -59,7 +58,7 @@ public function __construct($dbName = 'mydb', $modelName = 'Propel\\PropelBundle
* @param string $modelAlias The alias of a model in the query
* @param Criteria $criteria Optional Criteria to build the query from
*
- * @return BookQuery
+ * @return BookQuery
*/
public static function create($modelAlias = null, $criteria = null)
{
@@ -86,7 +85,7 @@ public static function create($modelAlias = null, $criteria = null)
* @param mixed $key Primary key to use for the query
* @param PropelPDO $con an optional connection object
*
- * @return Book|array|mixed the result, formatted by the current formatter
+ * @return Book|array|mixed the result, formatted by the current formatter
*/
public function findPk($key, $con = null)
{
@@ -112,7 +111,7 @@ public function findPk($key, $con = null)
* @param array $keys Primary keys to use for the query
* @param PropelPDO $con an optional connection object
*
- * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
+ * @return PropelObjectCollection|array|mixed the list of results, formatted by the current formatter
*/
public function findPks($keys, $con = null)
{
@@ -128,7 +127,7 @@ public function findPks($keys, $con = null)
*
* @param mixed $key Primary key to use for the query
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function filterByPrimaryKey($key)
{
@@ -140,7 +139,7 @@ public function filterByPrimaryKey($key)
*
* @param array $keys The list of primary key to use for the query
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function filterByPrimaryKeys($keys)
{
@@ -163,7 +162,7 @@ public function filterByPrimaryKeys($keys)
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function filterById($id = null, $comparison = null)
{
@@ -187,7 +186,7 @@ public function filterById($id = null, $comparison = null)
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function filterByName($name = null, $comparison = null)
{
@@ -216,7 +215,7 @@ public function filterByName($name = null, $comparison = null)
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function filterBySlug($slug = null, $comparison = null)
{
@@ -237,7 +236,7 @@ public function filterBySlug($slug = null, $comparison = null)
*
* @param Book $book Object to remove from the list of results
*
- * @return BookQuery The current query, for fluid interface
+ * @return BookQuery The current query, for fluid interface
*/
public function prune($book = null)
{
View
4 Tests/Request/ParamConverter/PropelParamConverterTest.php
@@ -8,7 +8,6 @@
use Propel\PropelBundle\Tests\TestCase;
-
class PropelParamConverterTest extends TestCase
{
@@ -152,7 +151,6 @@ public function testParamConverterFindLogicError()
$paramConverter->apply($request, $configuration);
}
-
public function testParamConverterFindWithOptionalParam()
{
$paramConverter = new PropelParamConverter();
@@ -179,7 +177,7 @@ public function testParamConverterFindWithMapping()
}
public function testParamConverterFindSlugWithMapping()
- {
+ {
$paramConverter = new PropelParamConverter();
$request = new Request(array(), array(), array('slugParam_special' => 'my-book', 'book' => null));
$configuration = new ParamConverter(array('class' => 'Propel\PropelBundle\Tests\Fixtures\Model\Book',
View
2 Util/PropelInflector.php
@@ -21,7 +21,7 @@ class PropelInflector
* Camelize a word.
* Inspirated by https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Util/Inflector.php
*
- * @param string $word The word to camelize.
+ * @param string $word The word to camelize.
* @return string
*/
public static function camelize($word)
View
6 Validator/Constraints/UniqueObjectValidator.php
@@ -23,8 +23,8 @@
class UniqueObjectValidator extends ConstraintValidator
{
/**
- * @param object $object
- * @param \Symfony\Component\Validator\Constraint $constraint
+ * @param object $object
+ * @param \Symfony\Component\Validator\Constraint $constraint
* @return Boolean
*/
public function isValid($object, Constraint $constraint)
@@ -33,7 +33,7 @@ public function isValid($object, Constraint $constraint)
throw new UnexpectedTypeException($constraint->fields, 'array');
}
- $fields = (array)$constraint->fields;
+ $fields = (array) $constraint->fields;
if (0 === count($fields)) {
throw new ConstraintDefinitionException("At least one field must be specified.");

0 comments on commit 4219e70

Please sign in to comment.