From 3391db2d002221e7b76ef03616989075e3d7c742 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Thu, 14 Jun 2012 16:37:40 +0200 Subject: [PATCH] Fixed some CS --- features/bootstrap/FeatureContext.php | 2 +- .../AlternativeCodingStandardsBehavior.php | 2 +- .../Archivable/templates/objectPreDelete.php | 2 +- ...NestedSetBehaviorObjectBuilderModifier.php | 1 - .../Builder/Om/AbstractPeerBuilder.php | 3 +- .../Generator/Builder/Om/ClassTools.php | 14 ++-- .../Builder/Om/ExtensionPeerBuilder.php | 1 - .../Generator/Builder/Om/ObjectBuilder.php | 4 -- .../Generator/Builder/Om/PeerBuilder.php | 66 +++++++++---------- .../Generator/Builder/Om/QueryBuilder.php | 2 +- .../Builder/Om/QueryInheritanceBuilder.php | 2 +- .../Generator/Builder/Sql/DataSQLBuilder.php | 6 +- .../Builder/Sql/Pgsql/PgsqlDataSQLBuilder.php | 2 +- .../Config/GeneratorConfigInterface.php | 10 +-- .../Generator/Manager/MigrationManager.php | 6 +- src/Propel/Generator/Model/Column.php | 4 +- src/Propel/Generator/Model/Database.php | 3 +- .../Generator/Model/Diff/ColumnComparator.php | 4 +- .../Model/Diff/DatabaseComparator.php | 2 +- .../Model/Diff/ForeignKeyComparator.php | 2 +- .../Generator/Model/Diff/IndexComparator.php | 2 +- .../Generator/Model/Diff/TableComparator.php | 2 +- .../Generator/Model/MappingModelInterface.php | 2 +- src/Propel/Generator/Model/NameFactory.php | 2 +- src/Propel/Generator/Model/NameGenerator.php | 2 +- src/Propel/Generator/Model/PropelTypes.php | 24 +++---- src/Propel/Generator/Model/Table.php | 1 - src/Propel/Generator/Model/VendorInfo.php | 1 - .../Generator/Platform/MysqlPlatform.php | 9 ++- .../Generator/Platform/OraclePlatform.php | 1 - .../Generator/Platform/PgsqlPlatform.php | 1 - .../Reverse/AbstractSchemaParser.php | 1 - .../Generator/Reverse/MssqlSchemaParser.php | 1 - .../Generator/Reverse/MysqlSchemaParser.php | 1 - .../Reverse/SchemaParserInterface.php | 12 ++-- .../Generator/Reverse/SqliteSchemaParser.php | 1 - src/Propel/Generator/Util/QuickBuilder.php | 4 +- src/Propel/Generator/Util/SqlParser.php | 8 +-- src/Propel/Runtime/Adapter/AdapterFactory.php | 2 +- .../Runtime/Adapter/AdapterInterface.php | 54 +++++++-------- .../Runtime/Adapter/Pdo/MssqlAdapter.php | 2 +- .../Runtime/Adapter/Pdo/OracleAdapter.php | 2 +- src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php | 2 +- .../Runtime/Connection/ConnectionFactory.php | 2 +- .../Connection/ConnectionInterface.php | 24 +++---- .../Connection/ConnectionManagerInterface.php | 10 +-- .../Connection/ProfilerStatementWrapper.php | 2 - .../Runtime/Connection/StatementInterface.php | 18 ++--- src/Propel/Runtime/Map/ColumnMap.php | 2 +- src/Propel/Runtime/Map/DatabaseMap.php | 2 +- src/Propel/Runtime/Map/TableMap.php | 1 - src/Propel/Runtime/Om/Persistent.php | 1 - src/Propel/Runtime/Parser/AbstractParser.php | 2 +- src/Propel/Runtime/Parser/XmlParser.php | 1 - src/Propel/Runtime/Propel.php | 36 +++++----- src/Propel/Runtime/Query/Criteria.php | 1 - src/Propel/Runtime/Query/ModelCriteria.php | 6 +- src/Propel/Runtime/Query/ModelCriterion.php | 2 +- src/Propel/Runtime/Query/PropelQuery.php | 2 +- .../ServiceContainerInterface.php | 22 +++---- src/Propel/Runtime/Util/BasePeer.php | 36 +++++----- src/Propel/Runtime/Util/Profiler.php | 8 +-- src/Propel/Runtime/Util/PropelColumnTypes.php | 2 +- src/Propel/Runtime/Util/PropelDateTime.php | 6 +- src/Propel/Runtime/Util/PropelModelPager.php | 2 +- .../Runtime/Validator/Constraints/Unique.php | 1 - ...AlternativeCodingStandardsBehaviorTest.php | 13 ++-- ...ortableBehaviorPeerBuilderModifierTest.php | 1 - .../Validate/ValidateBehaviorTest.php | 2 - .../Om/AbstractOMBuilderRelatedByTest.php | 1 - .../Builder/Om/GeneratedObjectRelTest.php | 1 - .../Builder/Om/GeneratedObjectTest.php | 6 +- .../Om/GeneratedObjectWithFixturesTest.php | 1 - .../Builder/Om/GeneratedPeerDoDeleteTest.php | 1 - .../Builder/Om/GeneratedPeerDoSelectTest.php | 2 - .../Platform/DefaultPlatformTest.php | 1 - .../Generator/Platform/OraclePlatformTest.php | 1 - .../Platform/PlatformTestProvider.php | 1 - .../Reverse/PgsqlSchemaParserTest.php | 1 - .../Runtime/Adapter/Pdo/OracleAdapterTest.php | 1 - .../ConnectionManagerMasterSlaveTest.php | 1 - .../Runtime/Formatter/ArrayFormatterTest.php | 1 - .../Formatter/SimpleArrayFormatterTest.php | 1 - .../Tests/Runtime/Map/ColumnMapTest.php | 1 - .../Runtime/Om/BaseObjectConvertTest.php | 1 - .../Runtime/Query/ModelCriteriaSelectTest.php | 2 - .../Tests/Runtime/Query/ModelCriteriaTest.php | 3 - .../Util/PropelConditionalProxyTest.php | 1 - .../Tests/Runtime/Util/PropelDateTimeTest.php | 1 - .../pear/BuildPropelGenPEARPackageTask.php | 25 +++---- .../pear/BuildPropelPEARPackageTask.php | 25 +++---- 91 files changed, 253 insertions(+), 306 deletions(-) diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index cf7b5820e7..5e2d1825df 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -26,7 +26,7 @@ class FeatureContext extends BehatContext * Initializes context. * Every scenario gets it's own context object. * - * @param array $parameters context parameters (set them up through behat.yml) + * @param array $parameters context parameters (set them up through behat.yml) */ public function __construct(array $parameters) { diff --git a/src/Propel/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehavior.php b/src/Propel/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehavior.php index 364194a2d5..06462bcc22 100644 --- a/src/Propel/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehavior.php +++ b/src/Propel/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehavior.php @@ -118,7 +118,7 @@ protected function filter(&$script) * @param string $code The input code * @return string The input code, without comments */ - static public function stripComments($code) + public static function stripComments($code) { $output = ''; $commentTokens = array(T_COMMENT, T_DOC_COMMENT); diff --git a/src/Propel/Generator/Behavior/Archivable/templates/objectPreDelete.php b/src/Propel/Generator/Behavior/Archivable/templates/objectPreDelete.php index cbd9a979bf..a7bddc05c4 100644 --- a/src/Propel/Generator/Behavior/Archivable/templates/objectPreDelete.php +++ b/src/Propel/Generator/Behavior/Archivable/templates/objectPreDelete.php @@ -14,4 +14,4 @@ $deleteQuery->setArchiveOnDelete(false); $this->archiveOnDelete = true; } - +getPeerName()) { diff --git a/src/Propel/Generator/Builder/Om/ClassTools.php b/src/Propel/Generator/Builder/Om/ClassTools.php index 20cd36beb3..6a74a0e2a1 100644 --- a/src/Propel/Generator/Builder/Om/ClassTools.php +++ b/src/Propel/Generator/Builder/Om/ClassTools.php @@ -25,7 +25,7 @@ class ClassTools * @param string $qualifiedName * @return string */ - static public function classname($qualifiedName) + public static function classname($qualifiedName) { if (false === $pos = strrpos($qualifiedName, '.')) { return $qualifiedName; // there is no '.' in the qualifed name @@ -48,7 +48,7 @@ static public function classname($qualifiedName) * @param string $extension The extension to use on the file. * @return string The constructed file path. */ - static public function getFilePath($path, $classname = null, $extension = '.php') + public static function getFilePath($path, $classname = null, $extension = '.php') { $path = strtr(ltrim($path, '.'), '.', '/'); @@ -65,7 +65,7 @@ static public function getFilePath($path, $classname = null, $extension = '.php' * @param string $extension The extension to use on the file. * @return string The constructed file path. */ - static public function createFilePath($path, $classname = null, $extension = '.php') + public static function createFilePath($path, $classname = null, $extension = '.php') { if (null === $classname) { return $path . $extension; @@ -83,7 +83,7 @@ static public function createFilePath($path, $classname = null, $extension = '.p * If not, will return 'propel.util.BasePeer' * @return string */ - static public function getBasePeer(Table $table) + public static function getBasePeer(Table $table) { if (null === $class = $table->getBasePeer()) { $class = 'propel.util.BasePeer'; @@ -97,7 +97,7 @@ static public function getBasePeer(Table $table) * If not, will return 'propel.om.BaseObject' * @return string */ - static public function getBaseClass(Table $table) + public static function getBaseClass(Table $table) { if (null === $class = $table->getBaseClass()) { $class = 'propel.om.BaseObject'; @@ -111,7 +111,7 @@ static public function getBaseClass(Table $table) * If not, will return 'propel.om.Persistent'. * @return string */ - static public function getInterface(Table $table) + public static function getInterface(Table $table) { $interface = $table->getInterface(); if (null === $interface && !$table->isReadOnly()) { @@ -126,7 +126,7 @@ static public function getInterface(Table $table) * * @return array string[] */ - static public function getPhpReservedWords() + public static function getPhpReservedWords() { return array( 'and', 'or', 'xor', 'exception', '__FILE__', '__LINE__', diff --git a/src/Propel/Generator/Builder/Om/ExtensionPeerBuilder.php b/src/Propel/Generator/Builder/Om/ExtensionPeerBuilder.php index 5e61063512..d6ea075021 100644 --- a/src/Propel/Generator/Builder/Om/ExtensionPeerBuilder.php +++ b/src/Propel/Generator/Builder/Om/ExtensionPeerBuilder.php @@ -92,5 +92,4 @@ protected function addClassClose(&$script) $this->applyBehaviorModifier('extensionPeerFilter', $script, ""); } - } // ExtensionPeerBuilder diff --git a/src/Propel/Generator/Builder/Om/ObjectBuilder.php b/src/Propel/Generator/Builder/Om/ObjectBuilder.php index b6f683e76d..ec23bd7f2d 100644 --- a/src/Propel/Generator/Builder/Om/ObjectBuilder.php +++ b/src/Propel/Generator/Builder/Om/ObjectBuilder.php @@ -751,7 +751,6 @@ protected function addApplyDefaultValuesBody(&$script) } } - /** * Adds the function close for the applyDefaults method. * @@ -778,7 +777,6 @@ protected function addTemporalAccessor(&$script, Column $column) $this->addTemporalAccessorClose($script); } - /** * Adds the comment for a temporal accessor. * @@ -916,7 +914,6 @@ protected function addTemporalAccessorBody(&$script, Column $column) }"; } - /** * Adds the body of the temporal accessor. * @@ -4504,7 +4501,6 @@ protected function doUpdate(ConnectionInterface \$con) "; } - /** * Adds the $alreadyInSave attribute, which prevents attempting to re-save the same object. * @param string &$script The script will be modified in this method. diff --git a/src/Propel/Generator/Builder/Om/PeerBuilder.php b/src/Propel/Generator/Builder/Om/PeerBuilder.php index 9798a6cf1f..c8d336c371 100644 --- a/src/Propel/Generator/Builder/Om/PeerBuilder.php +++ b/src/Propel/Generator/Builder/Om/PeerBuilder.php @@ -424,7 +424,7 @@ protected function addGetFieldNames(&$script) * @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.'); @@ -449,7 +449,7 @@ protected function addTranslateFieldName(&$script) * @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; @@ -473,7 +473,7 @@ protected function addGetValueSets(&$script) * Gets the list of values for all ENUM columns * @return array */ - static public function getValueSets() + public static function getValueSets() { return static::\$enumValueSets; } @@ -491,7 +491,7 @@ protected function addGetValueSet(&$script) * Gets the list of values for an ENUM column * @return array list of possible values for the column */ - static public function getValueSet(\$colname) + public static function getValueSet(\$colname) { \$valueSets = self::getValueSets(); @@ -511,7 +511,7 @@ protected function addBuildTableMap(&$script) /** * Add a TableMap instance to the database for this peer class. */ - static public function buildTableMap() + public static function buildTableMap() { \$dbMap = Propel::getServiceContainer()->getDatabaseMap(static::DATABASE_NAME); if (!\$dbMap->hasTable(static::TABLE_NAME)) { @@ -578,7 +578,7 @@ protected function addAlias(&$script) * @param string \$column The column name for current table. (i.e. ".$this->getPeerClassName(true)."::COLUMN_NAME). * @return string */ - static public function alias(\$alias, \$column) + public static function alias(\$alias, \$column) { return str_replace(static::TABLE_NAME.'.', \$alias.'.', \$column); } @@ -604,7 +604,7 @@ protected function addAddSelectColumns(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function addSelectColumns(Criteria \$criteria, \$alias = null) + public static function addSelectColumns(Criteria \$criteria, \$alias = null) { if (null === \$alias) {"; foreach ($this->getTable()->getColumns() as $col) { @@ -643,7 +643,7 @@ protected function addDoCount(&$script) * @param ConnectionInterface \$con * @return int Number of matching rows. */ - static public function doCount(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null) + public static function doCount(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null) { // we may modify criteria, so copy it first \$criteria = clone \$criteria; @@ -702,7 +702,7 @@ protected function addDoSelectOne(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doSelectOne(Criteria \$criteria, ConnectionInterface \$con = null) + public static function doSelectOne(Criteria \$criteria, ConnectionInterface \$con = null) { \$critcopy = clone \$criteria; \$critcopy->setLimit(1); @@ -731,7 +731,7 @@ protected function addDoSelect(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doSelect(Criteria \$criteria, ConnectionInterface \$con = null) + public static function doSelect(Criteria \$criteria, ConnectionInterface \$con = null) { return static::populateObjects(static::doSelectStmt(\$criteria, \$con)); }"; @@ -757,7 +757,7 @@ protected function addDoSelectStmt(&$script) * @return StatementInterface The executed Statement object. * @see ".$this->basePeerClassName."::doSelect() */ - static public function doSelectStmt(Criteria \$criteria, ConnectionInterface \$con = null) + public static function doSelectStmt(Criteria \$criteria, ConnectionInterface \$con = null) { if (null === \$con) { \$con = Propel::getServiceContainer()->getReadConnection(static::DATABASE_NAME); @@ -823,7 +823,7 @@ protected function addAddInstanceToPool(&$script) * @param ".$this->getObjectClassName()." \$value A ".$this->getObjectClassName()." object. * @param string \$key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ - static public function addInstanceToPool(\$obj, \$key = null) + public static function addInstanceToPool(\$obj, \$key = null) { if (Propel::isInstancePoolingEnabled()) { if (null === \$key) {"; @@ -862,7 +862,7 @@ protected function addRemoveInstanceFromPool(&$script) * * @param mixed \$value A ".$this->getObjectClassName()." object or a primary key value. */ - static public function removeInstanceFromPool(\$value) + public static function removeInstanceFromPool(\$value) {"; $script .= " if (Propel::isInstancePoolingEnabled() && null !== \$value) {"; @@ -916,7 +916,7 @@ protected function addClearInstancePool(&$script) * * @return void */ - static public function clearInstancePool() + public static function clearInstancePool() { self::\$instances = array(); } @@ -935,7 +935,7 @@ protected function addClearRelatedInstancePool(&$script) * Method to invalidate the instance pool of all tables related to " . $table->getName() . " * by a foreign key with ON DELETE CASCADE */ - static public function clearRelatedInstancePool() + public static function clearRelatedInstancePool() {"; // Handle ON DELETE CASCADE for updating instance pool foreach ($table->getReferrers() as $fk) { @@ -981,7 +981,7 @@ protected function addGetInstanceFromPool(&$script) * @return ".$this->getObjectClassName()." Found object or NULL if 1) no instance exists for specified key or 2) instance pooling has been disabled. * @see getPrimaryKeyHash() */ - static public function getInstanceFromPool(\$key) + public static function getInstanceFromPool(\$key) { if (Propel::isInstancePoolingEnabled()) { if (isset(self::\$instances[\$key])) { @@ -1011,7 +1011,7 @@ protected function addGetPrimaryKeyHash(&$script) * @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. */ - static public function getPrimaryKeyHashFromRow(\$row, \$startcol = 0) + public static function getPrimaryKeyHashFromRow(\$row, \$startcol = 0) {"; // We have to iterate through all the columns so that we know the offset of the primary @@ -1057,7 +1057,7 @@ protected function addGetPrimaryKeyFromRow(&$script) * @param int \$startcol The 0-based offset for reading from the resultset row. * @return mixed The primary key of the row */ - static public function getPrimaryKeyFromRow(\$row, \$startcol = 0) + public static function getPrimaryKeyFromRow(\$row, \$startcol = 0) {"; // We have to iterate through all the columns so that we @@ -1107,7 +1107,7 @@ protected function addPopulateObjects(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function populateObjects(StatementInterface \$stmt) + public static function populateObjects(StatementInterface \$stmt) { \$results = array(); "; @@ -1171,7 +1171,7 @@ protected function addPopulateObject(&$script) * rethrown wrapped into a PropelException. * @return array (" . $this->getObjectClassName(). " object, last column rank) */ - static public function populateObject(\$row, \$startcol = 0) + public static function populateObject(\$row, \$startcol = 0) { \$key = static::getPrimaryKeyHashFromRow(\$row, \$startcol); if (null !== (\$obj = static::getInstanceFromPool(\$key))) { @@ -1225,7 +1225,7 @@ protected function addGetOMClass_Inheritance(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function getOMClass(\$row, \$colnum, \$withPrefix = true) + public static function getOMClass(\$row, \$colnum, \$withPrefix = true) { try { "; @@ -1287,7 +1287,7 @@ protected function addGetOMClass_NoInheritance(&$script) * @param boolean \$withPrefix Whether or not to return the path with the class name * @return string path.to.ClassName */ - static public function getOMClass(\$withPrefix = true) + public static function getOMClass(\$withPrefix = true) { return \$withPrefix ? static::CLASS_DEFAULT : static::OM_CLASS; } @@ -1307,7 +1307,7 @@ protected function addGetOMClass_NoInheritance_Abstract(&$script) * This method must be overridden by the stub subclass, because * ".$this->getObjectClassName()." is declared abstract in the schema. */ - abstract static public function getOMClass(\$withPrefix = true); + abstract public static function getOMClass(\$withPrefix = true); "; } @@ -1328,7 +1328,7 @@ protected function addDoInsert(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doInsert(\$values, ConnectionInterface \$con = null) + public static function doInsert(\$values, ConnectionInterface \$con = null) { if (null === \$con) { \$con = Propel::getServiceContainer()->getWriteConnection(static::DATABASE_NAME); @@ -1410,7 +1410,7 @@ protected function addDoUpdate(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doUpdate(\$values, ConnectionInterface \$con = null) + public static function doUpdate(\$values, ConnectionInterface \$con = null) { if (null === \$con) { \$con = Propel::getServiceContainer()->getWriteConnection(static::DATABASE_NAME); @@ -1463,7 +1463,7 @@ protected function addDoDeleteAll(&$script) * @param ConnectionInterface \$con the connection to use * @return int The number of affected rows (if supported by underlying database driver). */ - static public function doDeleteAll(ConnectionInterface \$con = null) + public static function doDeleteAll(ConnectionInterface \$con = null) { if (null === \$con) { \$con = Propel::getServiceContainer()->getWriteConnection(static::DATABASE_NAME); @@ -1963,7 +1963,7 @@ protected function addGetTableMap(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function getTableMap() + public static function getTableMap() { return Propel::getServiceContainer()->getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); } @@ -2103,7 +2103,7 @@ protected function addDoSelectJoin(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doSelectJoin".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) + public static function doSelectJoin".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) { \$criteria = clone \$criteria; @@ -2233,7 +2233,7 @@ protected function addDoCountJoin(&$script) * @param String \$joinBehavior the type of joins to use, defaults to $joinBehavior * @return int Number of matching rows. */ - static public function doCountJoin".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) + public static function doCountJoin".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) { // we're going to modify criteria, so copy it first \$criteria = clone \$criteria; @@ -2306,7 +2306,7 @@ protected function addDoSelectJoinAll(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doSelectJoinAll(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) + public static function doSelectJoinAll(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) { \$criteria = clone \$criteria; @@ -2472,7 +2472,7 @@ protected function addDoCountJoinAll(&$script) * @param String \$joinBehavior the type of joins to use, defaults to $joinBehavior * @return int Number of matching rows. */ - static public function doCountJoinAll(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) + public static function doCountJoinAll(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) { // we're going to modify criteria, so copy it first \$criteria = clone \$criteria; @@ -2564,7 +2564,7 @@ protected function addDoSelectJoinAllExcept(&$script) * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ - static public function doSelectJoinAllExcept".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) + public static function doSelectJoinAllExcept".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$con = null, \$joinBehavior = $joinBehavior) { \$criteria = clone \$criteria; @@ -2743,7 +2743,7 @@ protected function addDoCountJoinAllExcept(&$script) * @param String \$joinBehavior the type of joins to use, defaults to $joinBehavior * @return int Number of matching rows. */ - static public function doCountJoinAllExcept".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) + public static function doCountJoinAllExcept".$thisTableObjectBuilder->getFKPhpNameAffix($fk, false)."(Criteria \$criteria, \$distinct = false, ConnectionInterface \$con = null, \$joinBehavior = $joinBehavior) { // we're going to modify criteria, so copy it first \$criteria = clone \$criteria; diff --git a/src/Propel/Generator/Builder/Om/QueryBuilder.php b/src/Propel/Generator/Builder/Om/QueryBuilder.php index 7d92e68dc4..573b57b3af 100644 --- a/src/Propel/Generator/Builder/Om/QueryBuilder.php +++ b/src/Propel/Generator/Builder/Om/QueryBuilder.php @@ -321,7 +321,7 @@ protected function addFactoryComment(&$script) protected function addFactoryOpen(&$script) { $script .= " - static public function create(\$modelAlias = null, \$criteria = null) + public static function create(\$modelAlias = null, \$criteria = null) {"; } diff --git a/src/Propel/Generator/Builder/Om/QueryInheritanceBuilder.php b/src/Propel/Generator/Builder/Om/QueryInheritanceBuilder.php index 69540fc83f..4d89cd4253 100644 --- a/src/Propel/Generator/Builder/Om/QueryInheritanceBuilder.php +++ b/src/Propel/Generator/Builder/Om/QueryInheritanceBuilder.php @@ -190,7 +190,7 @@ protected function addFactory(&$script) * * @return " . $classname . " */ - static public function create(\$modelAlias = null, \$criteria = null) + public static function create(\$modelAlias = null, \$criteria = null) { if (\$criteria instanceof " . $classname . ") { return \$criteria; diff --git a/src/Propel/Generator/Builder/Sql/DataSQLBuilder.php b/src/Propel/Generator/Builder/Sql/DataSQLBuilder.php index 4d42af57ee..c151bc37c3 100644 --- a/src/Propel/Generator/Builder/Sql/DataSQLBuilder.php +++ b/src/Propel/Generator/Builder/Sql/DataSQLBuilder.php @@ -26,7 +26,7 @@ abstract class DataSQLBuilder extends DataModelBuilder * * This can be used, for example, to clear any stored start/end SQL. */ - static public function reset() + public static function reset() { // does nothing by default } @@ -36,7 +36,7 @@ static public function reset() * * @return string */ - static public function getDatabaseStartSql() + public static function getDatabaseStartSql() { return ''; } @@ -46,7 +46,7 @@ static public function getDatabaseStartSql() * * @return string */ - static public function getDatabaseEndSql() + public static function getDatabaseEndSql() { return ''; } diff --git a/src/Propel/Generator/Builder/Sql/Pgsql/PgsqlDataSQLBuilder.php b/src/Propel/Generator/Builder/Sql/Pgsql/PgsqlDataSQLBuilder.php index 6be0cc5c95..2a1026c941 100644 --- a/src/Propel/Generator/Builder/Sql/Pgsql/PgsqlDataSQLBuilder.php +++ b/src/Propel/Generator/Builder/Sql/Pgsql/PgsqlDataSQLBuilder.php @@ -59,7 +59,7 @@ public function getTableEndSql() $sql = ''; if ($table->hasAutoIncrementPrimaryKey() && $table->getIdMethod() == IdMethod::NATIVE) { $seqname = $this->getPlatform()->getSequenceName($table); - $sql .= "SELECT pg_catalog.setval('$seqname', ".((int)$this->maxSeqVal)."); + $sql .= "SELECT pg_catalog.setval('$seqname', ".((int) $this->maxSeqVal)."); "; } diff --git a/src/Propel/Generator/Config/GeneratorConfigInterface.php b/src/Propel/Generator/Config/GeneratorConfigInterface.php index 2c4085c254..245604d284 100644 --- a/src/Propel/Generator/Config/GeneratorConfigInterface.php +++ b/src/Propel/Generator/Config/GeneratorConfigInterface.php @@ -22,14 +22,14 @@ interface GeneratorConfigInterface * @param string $type * @return DataModelBuilder */ - function getConfiguredBuilder(Table $table, $type); + public function getConfiguredBuilder(Table $table, $type); /** * Returns a configured Pluralizer class. * * @return PluralizerInterface */ - function getConfiguredPluralizer(); + public function getConfiguredPluralizer(); /** * Returns a specific propel (renamed) property from the build. @@ -37,7 +37,7 @@ function getConfiguredPluralizer(); * @param string $name * @return mixed */ - function getBuildProperty($name); + public function getBuildProperty($name); /** * Sets a specific propel (renamed) property from the build. @@ -45,7 +45,7 @@ function getBuildProperty($name); * @param string $name * @param mixed $value */ - function setBuildProperty($name, $value); + public function setBuildProperty($name, $value); /** * Creates and configures a new Platform class. @@ -53,5 +53,5 @@ function setBuildProperty($name, $value); * @param \PDO $con * @return PlatformInterface */ - function getConfiguredPlatform(\PDO $con = null, $database = null); + public function getConfiguredPlatform(\PDO $con = null, $database = null); } diff --git a/src/Propel/Generator/Manager/MigrationManager.php b/src/Propel/Generator/Manager/MigrationManager.php index 9825952044..7de8819d27 100644 --- a/src/Propel/Generator/Manager/MigrationManager.php +++ b/src/Propel/Generator/Manager/MigrationManager.php @@ -266,7 +266,7 @@ public function getFirstDownMigrationTimestamp() return $this->getOldestDatabaseVersion(); } - static public function getMigrationClassName($timestamp) + public static function getMigrationClassName($timestamp) { return sprintf('PropelMigration_%d', $timestamp); } @@ -348,12 +348,12 @@ public function getDownSQL() return $migrationClassBody; } - static public function getMigrationFileName($timestamp) + public static function getMigrationFileName($timestamp) { return sprintf('%s.php', self::getMigrationClassName($timestamp)); } - static public function getUser() + public static function getUser() { if (function_exists('posix_getuid')) { $currentUser = posix_getpwuid(posix_getuid()); diff --git a/src/Propel/Generator/Model/Column.php b/src/Propel/Generator/Model/Column.php index a8e2437a52..52aa9acfe6 100644 --- a/src/Propel/Generator/Model/Column.php +++ b/src/Propel/Generator/Model/Column.php @@ -30,7 +30,7 @@ class Column extends MappingModel const DEFAULT_TYPE = 'VARCHAR'; const DEFAULT_VISIBILITY = 'public'; - static public $validVisibilities = array('public', 'protected', 'private'); + public static $validVisibilities = array('public', 'protected', 'private'); private $name; private $description; @@ -1420,7 +1420,7 @@ public function __clone() * @param string $namePrefix * @return string */ - static public function generatePhpName($name, $phpNamingMethod = PhpNameGenerator::CONV_METHOD_CLEAN, $namePrefix = null) + public static function generatePhpName($name, $phpNamingMethod = PhpNameGenerator::CONV_METHOD_CLEAN, $namePrefix = null) { return NameFactory::generateName(NameFactory::PHP_GENERATOR, array($name, $phpNamingMethod, $namePrefix)); } diff --git a/src/Propel/Generator/Model/Database.php b/src/Propel/Generator/Model/Database.php index 01c5628e3f..f12d49b868 100644 --- a/src/Propel/Generator/Model/Database.php +++ b/src/Propel/Generator/Model/Database.php @@ -221,7 +221,7 @@ public function setDefaultPhpNamingMethod($strategy) * * @return array */ - static public function getSupportedStringFormats() + public static function getSupportedStringFormats() { return array('XML', 'YAML', 'JSON', 'CSV'); } @@ -646,7 +646,6 @@ public function getNextTableBehavior() $nextBehavior = $behaviors[key($behaviors)][0]; } - return $nextBehavior; } diff --git a/src/Propel/Generator/Model/Diff/ColumnComparator.php b/src/Propel/Generator/Model/Diff/ColumnComparator.php index e5abaa1095..567f68dda2 100644 --- a/src/Propel/Generator/Model/Diff/ColumnComparator.php +++ b/src/Propel/Generator/Model/Diff/ColumnComparator.php @@ -26,7 +26,7 @@ class ColumnComparator * @param Column $toColumn * @return ColumnDiff|boolean return false if the two columns are similar */ - static public function computeDiff(Column $fromColumn, Column $toColumn) + public static function computeDiff(Column $fromColumn, Column $toColumn) { if ($changedProperties = self::compareColumns($fromColumn, $toColumn)) { if ($fromColumn->hasPlatform() || $toColumn->hasPlatform()) { @@ -46,7 +46,7 @@ static public function computeDiff(Column $fromColumn, Column $toColumn) return false; } - static function compareColumns(Column $fromColumn, Column $toColumn) + public static function compareColumns(Column $fromColumn, Column $toColumn) { $changedProperties = array(); diff --git a/src/Propel/Generator/Model/Diff/DatabaseComparator.php b/src/Propel/Generator/Model/Diff/DatabaseComparator.php index 8d3eec353b..6d1e20a337 100644 --- a/src/Propel/Generator/Model/Diff/DatabaseComparator.php +++ b/src/Propel/Generator/Model/Diff/DatabaseComparator.php @@ -81,7 +81,7 @@ public function getToDatabase() * @param Boolean $caseInsensitive * @return DatabaseDiff|Boolean */ - static public function computeDiff(Database $fromDatabase, Database $toDatabase, $caseInsensitive = false) + public static function computeDiff(Database $fromDatabase, Database $toDatabase, $caseInsensitive = false) { $dc = new self(); $dc->setFromDatabase($fromDatabase); diff --git a/src/Propel/Generator/Model/Diff/ForeignKeyComparator.php b/src/Propel/Generator/Model/Diff/ForeignKeyComparator.php index fd9d81dd75..3fede3af8d 100644 --- a/src/Propel/Generator/Model/Diff/ForeignKeyComparator.php +++ b/src/Propel/Generator/Model/Diff/ForeignKeyComparator.php @@ -31,7 +31,7 @@ class ForeignKeyComparator * * @return Boolean false if the two fks are similar, true if they have differences */ - static public function computeDiff(ForeignKey $fromFk, ForeignKey $toFk, $caseInsensitive = false) + public static function computeDiff(ForeignKey $fromFk, ForeignKey $toFk, $caseInsensitive = false) { // Check for differences in local and remote table $test = $caseInsensitive ? diff --git a/src/Propel/Generator/Model/Diff/IndexComparator.php b/src/Propel/Generator/Model/Diff/IndexComparator.php index cf2198e1e4..9ffa64c600 100644 --- a/src/Propel/Generator/Model/Diff/IndexComparator.php +++ b/src/Propel/Generator/Model/Diff/IndexComparator.php @@ -27,7 +27,7 @@ class IndexComparator * @param Boolean $caseInsensitive * @return Boolean */ - static public function computeDiff(Index $fromIndex, Index $toIndex, $caseInsensitive = false) + public static function computeDiff(Index $fromIndex, Index $toIndex, $caseInsensitive = false) { // Check for removed index columns in $toIndex $fromIndexColumns = $fromIndex->getColumns(); diff --git a/src/Propel/Generator/Model/Diff/TableComparator.php b/src/Propel/Generator/Model/Diff/TableComparator.php index 66d5cef561..3c2df9240c 100644 --- a/src/Propel/Generator/Model/Diff/TableComparator.php +++ b/src/Propel/Generator/Model/Diff/TableComparator.php @@ -79,7 +79,7 @@ public function getToTable() * @param Boolean $caseInsensitive * @return TableDiff|Boolean */ - static public function computeDiff(Table $fromTable, Table $toTable, $caseInsensitive = false) + public static function computeDiff(Table $fromTable, Table $toTable, $caseInsensitive = false) { $tc = new self(); $tc->setFromTable($fromTable); diff --git a/src/Propel/Generator/Model/MappingModelInterface.php b/src/Propel/Generator/Model/MappingModelInterface.php index 580224698d..0f7dc21170 100644 --- a/src/Propel/Generator/Model/MappingModelInterface.php +++ b/src/Propel/Generator/Model/MappingModelInterface.php @@ -22,5 +22,5 @@ interface MappingModelInterface * * @param array $attributes */ - function loadMapping(array $attributes); + public function loadMapping(array $attributes); } diff --git a/src/Propel/Generator/Model/NameFactory.php b/src/Propel/Generator/Model/NameFactory.php index 6f86856f98..0ed014e29d 100644 --- a/src/Propel/Generator/Model/NameFactory.php +++ b/src/Propel/Generator/Model/NameFactory.php @@ -62,7 +62,7 @@ protected static function getAlgorithm($name) * @return The generated name. * @throws EngineException */ - static public function generateName($algorithmName, $inputs) + public static function generateName($algorithmName, $inputs) { $algorithm = self::getAlgorithm($algorithmName); diff --git a/src/Propel/Generator/Model/NameGenerator.php b/src/Propel/Generator/Model/NameGenerator.php index cce2533653..9df9b1d66d 100644 --- a/src/Propel/Generator/Model/NameGenerator.php +++ b/src/Propel/Generator/Model/NameGenerator.php @@ -68,5 +68,5 @@ interface NameGenerator * @return The generated name. * @throws EngineException */ - function generateName($inputs); + public function generateName($inputs); } diff --git a/src/Propel/Generator/Model/PropelTypes.php b/src/Propel/Generator/Model/PropelTypes.php index 467386751d..ebdbd9470d 100644 --- a/src/Propel/Generator/Model/PropelTypes.php +++ b/src/Propel/Generator/Model/PropelTypes.php @@ -209,7 +209,7 @@ class PropelTypes * @param string $mappingType * @return string */ - static public function getPhpNative($mappingType) + public static function getPhpNative($mappingType) { return self::$mappingToPHPNativeMap[$mappingType]; } @@ -219,7 +219,7 @@ static public function getPhpNative($mappingType) * * @return integer */ - static public function getPDOType($type) + public static function getPDOType($type) { return self::$mappingTypeToPDOTypeMap[$type]; } @@ -229,7 +229,7 @@ static public function getPDOType($type) * * @return string */ - static public function getPdoTypeString($type) + public static function getPdoTypeString($type) { return self::$pdoTypeNames[self::$mappingTypeToPDOTypeMap[$type]]; } @@ -239,7 +239,7 @@ static public function getPdoTypeString($type) * * @return array */ - static public function getPropelTypes() + public static function getPropelTypes() { return self::$mappingTypes; } @@ -250,7 +250,7 @@ static public function getPropelTypes() * @param string $mappingType * @return Boolean */ - static public function isTemporalType($type) + public static function isTemporalType($type) { return in_array($type, array( self::DATE, @@ -267,7 +267,7 @@ static public function isTemporalType($type) * @param string $mappingType * @return Boolean */ - static public function isTextType($mappingType) + public static function isTextType($mappingType) { return in_array($mappingType, array( self::CHAR, @@ -288,7 +288,7 @@ static public function isTextType($mappingType) * @param string $mappingType * @return Boolean */ - static public function isNumericType($mappingType) + public static function isNumericType($mappingType) { return in_array($mappingType, array( self::SMALLINT, @@ -309,7 +309,7 @@ static public function isNumericType($mappingType) * @param string $mappingType * @return Boolean */ - static public function isBooleanType($mappingType) + public static function isBooleanType($mappingType) { return in_array($mappingType, array( self::BOOLEAN, @@ -323,7 +323,7 @@ static public function isBooleanType($mappingType) * @param string $mappingType * @return Boolean */ - static public function isLobType($mappingType) + public static function isLobType($mappingType) { return in_array($mappingType, array( self::VARBINARY, @@ -338,7 +338,7 @@ static public function isLobType($mappingType) * @param string $phpType * @return Boolean */ - static public function isPhpPrimitiveType($phpType) + public static function isPhpPrimitiveType($phpType) { return in_array($phpType, array('boolean', 'int', 'double', 'float', 'string')); } @@ -349,7 +349,7 @@ static public function isPhpPrimitiveType($phpType) * @param string $phpType * @return Boolean */ - static public function isPhpPrimitiveNumericType($phpType) + public static function isPhpPrimitiveNumericType($phpType) { return in_array($phpType, array('boolean', 'int', 'double', 'float')); } @@ -360,7 +360,7 @@ static public function isPhpPrimitiveNumericType($phpType) * @param string $phpType * @return Boolean */ - static public function isPhpObjectType($phpType) + public static function isPhpObjectType($phpType) { return !self::isPhpPrimitiveType($phpType) && !in_array($phpType, array('resource', 'array')); } diff --git a/src/Propel/Generator/Model/Table.php b/src/Propel/Generator/Model/Table.php index f0f42d30b4..26d975c6f9 100644 --- a/src/Propel/Generator/Model/Table.php +++ b/src/Propel/Generator/Model/Table.php @@ -130,7 +130,6 @@ public function setupObject() $this->idMethod = $this->getAttribute('idMethod', $this->database->getDefaultIdMethod()); $this->allowPkInsert = $this->booleanValue($this->getAttribute('allowPkInsert')); - $this->skipSql = $this->booleanValue($this->getAttribute('skipSql')); $this->readOnly = $this->booleanValue($this->getAttribute('readOnly')); diff --git a/src/Propel/Generator/Model/VendorInfo.php b/src/Propel/Generator/Model/VendorInfo.php index 5af9ab337a..a866f969ae 100644 --- a/src/Propel/Generator/Model/VendorInfo.php +++ b/src/Propel/Generator/Model/VendorInfo.php @@ -10,7 +10,6 @@ namespace Propel\Generator\Model; - /** * Object to hold vendor specific information. * diff --git a/src/Propel/Generator/Platform/MysqlPlatform.php b/src/Propel/Generator/Platform/MysqlPlatform.php index acc0caddf9..695bc5b8e4 100644 --- a/src/Propel/Generator/Platform/MysqlPlatform.php +++ b/src/Propel/Generator/Platform/MysqlPlatform.php @@ -75,7 +75,7 @@ public function setGeneratorConfig(GeneratorConfigInterface $generatorConfig) * * @param string $tableEngineKeyword */ - function setTableEngineKeyword($tableEngineKeyword) + public function setTableEngineKeyword($tableEngineKeyword) { $this->tableEngineKeyword = $tableEngineKeyword; } @@ -85,7 +85,7 @@ function setTableEngineKeyword($tableEngineKeyword) * * @return string */ - function getTableEngineKeyword() + public function getTableEngineKeyword() { return $this->tableEngineKeyword; } @@ -95,7 +95,7 @@ function getTableEngineKeyword() * * @param string $defaultTableEngine */ - function setDefaultTableEngine($defaultTableEngine) + public function setDefaultTableEngine($defaultTableEngine) { $this->defaultTableEngine = $defaultTableEngine; } @@ -105,7 +105,7 @@ function setDefaultTableEngine($defaultTableEngine) * * @return string */ - function getDefaultTableEngine() + public function getDefaultTableEngine() { return $this->defaultTableEngine; } @@ -594,7 +594,6 @@ public function getModifyColumnsDDL($columnDiffs) return $ret; } - /** * @see Platform::supportsSchemas() */ diff --git a/src/Propel/Generator/Platform/OraclePlatform.php b/src/Propel/Generator/Platform/OraclePlatform.php index 8509640fb9..f4b89630dd 100644 --- a/src/Propel/Generator/Platform/OraclePlatform.php +++ b/src/Propel/Generator/Platform/OraclePlatform.php @@ -231,7 +231,6 @@ public function getForeignKeyDDL(ForeignKey $fk) return $script; } - /** * Whether the underlying PDO driver for this platform returns BLOB columns as streams (instead of strings). * @return Boolean diff --git a/src/Propel/Generator/Platform/PgsqlPlatform.php b/src/Propel/Generator/Platform/PgsqlPlatform.php index 7763847ec3..5c2a129b08 100644 --- a/src/Propel/Generator/Platform/PgsqlPlatform.php +++ b/src/Propel/Generator/Platform/PgsqlPlatform.php @@ -183,7 +183,6 @@ public function getAddSchemaDDL(Table $table) }; } - public function getUseSchemaDDL(Table $table) { $vi = $table->getVendorInfoForType('pgsql'); diff --git a/src/Propel/Generator/Reverse/AbstractSchemaParser.php b/src/Propel/Generator/Reverse/AbstractSchemaParser.php index 4c213982a0..e5406accdc 100644 --- a/src/Propel/Generator/Reverse/AbstractSchemaParser.php +++ b/src/Propel/Generator/Reverse/AbstractSchemaParser.php @@ -112,7 +112,6 @@ public function getMigrationTable() return $this->migrationTable; } - /** * Pushes a message onto the stack of warnings. * diff --git a/src/Propel/Generator/Reverse/MssqlSchemaParser.php b/src/Propel/Generator/Reverse/MssqlSchemaParser.php index 10f864326e..4b89e7970d 100644 --- a/src/Propel/Generator/Reverse/MssqlSchemaParser.php +++ b/src/Propel/Generator/Reverse/MssqlSchemaParser.php @@ -236,7 +236,6 @@ protected function addPrimaryKey(Table $table) } } - /** * according to the identifier definition, we have to clean simple quote (') around the identifier name * returns by mssql diff --git a/src/Propel/Generator/Reverse/MysqlSchemaParser.php b/src/Propel/Generator/Reverse/MysqlSchemaParser.php index 432bf20547..d030555b14 100644 --- a/src/Propel/Generator/Reverse/MysqlSchemaParser.php +++ b/src/Propel/Generator/Reverse/MysqlSchemaParser.php @@ -130,7 +130,6 @@ public function parse(Database $database) return count($tables); } - /** * Adds Columns to the specified table. * diff --git a/src/Propel/Generator/Reverse/SchemaParserInterface.php b/src/Propel/Generator/Reverse/SchemaParserInterface.php index 072b1a1e93..9a96ad890b 100644 --- a/src/Propel/Generator/Reverse/SchemaParserInterface.php +++ b/src/Propel/Generator/Reverse/SchemaParserInterface.php @@ -25,21 +25,21 @@ interface SchemaParserInterface * Gets the database connection. * @return ConnectionInterface */ - function getConnection(); + public function getConnection(); /** * Sets the database connection. * * @param ConnectionInterface $dbh */ - function setConnection(ConnectionInterface $dbh); + public function setConnection(ConnectionInterface $dbh); /** * Sets the GeneratorConfig to use in the parsing. * * @param GeneratorConfigInterface $config */ - function setGeneratorConfig(GeneratorConfigInterface $config); + public function setGeneratorConfig(GeneratorConfigInterface $config); /** * Gets a specific propel (renamed) property from the build. @@ -47,13 +47,13 @@ function setGeneratorConfig(GeneratorConfigInterface $config); * @param string $name * @return mixed */ - function getBuildProperty($name); + public function getBuildProperty($name); /** * Gets array of warning messages. * @return array string[] */ - function getWarnings(); + public function getWarnings(); /** * Parse the schema and populate passed-in Database model object. @@ -61,5 +61,5 @@ function getWarnings(); * @param Database $database * @return int number of generated tables */ - function parse(Database $database); + public function parse(Database $database); } diff --git a/src/Propel/Generator/Reverse/SqliteSchemaParser.php b/src/Propel/Generator/Reverse/SqliteSchemaParser.php index 1cbb2e8a1e..084ab05f56 100644 --- a/src/Propel/Generator/Reverse/SqliteSchemaParser.php +++ b/src/Propel/Generator/Reverse/SqliteSchemaParser.php @@ -107,7 +107,6 @@ public function parse(Database $database) return count($tables); } - /** * Adds Columns to the specified table. * diff --git a/src/Propel/Generator/Util/QuickBuilder.php b/src/Propel/Generator/Util/QuickBuilder.php index 89d56c4bb2..c628f0b1b1 100644 --- a/src/Propel/Generator/Util/QuickBuilder.php +++ b/src/Propel/Generator/Util/QuickBuilder.php @@ -81,7 +81,7 @@ public function getConfig() return $this->config; } - static public function buildSchema($schema, $dsn = null, $user = null, $pass = null, $adapter = null) + public static function buildSchema($schema, $dsn = null, $user = null, $pass = null, $adapter = null) { $builder = new self; $builder->setSchema($schema); @@ -213,7 +213,7 @@ public function getClassesForTable(Table $table, array $classTargets = null) return $script; } - static public function debugClassesForTable($schema, $tableName) + public static function debugClassesForTable($schema, $tableName) { $builder = new self; $builder->setSchema($schema); diff --git a/src/Propel/Generator/Util/SqlParser.php b/src/Propel/Generator/Util/SqlParser.php index bb134cc17d..68c5db6a22 100644 --- a/src/Propel/Generator/Util/SqlParser.php +++ b/src/Propel/Generator/Util/SqlParser.php @@ -55,7 +55,7 @@ public function getSQL() * * @return integer the number of executed statements */ - static public function executeString($input, $connection) + public static function executeString($input, $connection) { return self::executeStatements(self::parseString($input), $connection); } @@ -69,7 +69,7 @@ static public function executeString($input, $connection) * * @return integer the number of executed statements */ - static public function executeFile($file, $connection) + public static function executeFile($file, $connection) { return self::executeStatements(self::parseFile($file), $connection); } @@ -121,7 +121,7 @@ protected static function executeStatements($statements, $connection) * * @return array A list of SQL statement strings */ - static public function parseString($input) + public static function parseString($input) { $parser = new self(); $parser->setSQL($input); @@ -150,7 +150,7 @@ static public function parseString($input) * * @return array A list of SQL statement strings */ - static public function parseFile($file) + public static function parseFile($file) { if (!file_exists($file)) { return array(); diff --git a/src/Propel/Runtime/Adapter/AdapterFactory.php b/src/Propel/Runtime/Adapter/AdapterFactory.php index 99673fceb6..69a8ab7be4 100644 --- a/src/Propel/Runtime/Adapter/AdapterFactory.php +++ b/src/Propel/Runtime/Adapter/AdapterFactory.php @@ -27,7 +27,7 @@ class AdapterFactory * @throws \Propel\Runtime\Exception\InvalidArgumentException If the adapter could not be instantiated. * @return \Propel\Runtime\Adapter\AdapterInterface An instance of a Propel database adapter. */ - static public function create($driver) + public static function create($driver) { if (!$driver) { $adapterClass = '\Propel\Runtime\Adapter\NoneAdapter'; diff --git a/src/Propel/Runtime/Adapter/AdapterInterface.php b/src/Propel/Runtime/Adapter/AdapterInterface.php index a454685c1d..2d4c81235b 100644 --- a/src/Propel/Runtime/Adapter/AdapterInterface.php +++ b/src/Propel/Runtime/Adapter/AdapterInterface.php @@ -33,7 +33,7 @@ interface AdapterInterface * * @return Propel\Runtime\Connection\ConnectionInterface */ - function getConnection($conparams); + public function getConnection($conparams); /** * Sets the character encoding using SQL standard SET NAMES statement. @@ -46,7 +46,7 @@ function getConnection($conparams); * @param Propel\Runtime\Connection\ConnectionInterface $con * @param string $charset The $string charset encoding. */ - function setCharset(ConnectionInterface $con, $charset); + public function setCharset(ConnectionInterface $con, $charset); /** * This method is used to ignore case. @@ -54,7 +54,7 @@ function setCharset(ConnectionInterface $con, $charset); * @param string $in The string to transform to upper case. * @return string The upper case string. */ - function toUpperCase($in); + public function toUpperCase($in); /** * This method is used to ignore case. @@ -62,7 +62,7 @@ function toUpperCase($in); * @param string $in The string whose case to ignore. * @return string The string in a case that can be ignored. */ - function ignoreCase($in); + public function ignoreCase($in); /** * This method is used to ignore case in an ORDER BY clause. @@ -73,7 +73,7 @@ function ignoreCase($in); * @param string $in The string whose case to ignore. * @return string The string in a case that can be ignored. */ - function ignoreCaseInOrderBy($in); + public function ignoreCaseInOrderBy($in); /** * Returns the character used to indicate the beginning and end of @@ -82,7 +82,7 @@ function ignoreCaseInOrderBy($in); * * @return string The text delimeter. */ - function getStringDelimiter(); + public function getStringDelimiter(); /** * Returns SQL which concatenates the second string to the first. @@ -92,7 +92,7 @@ function getStringDelimiter(); * * @return string */ - function concatString($s1, $s2); + public function concatString($s1, $s2); /** * Returns SQL which extracts a substring. @@ -103,7 +103,7 @@ function concatString($s1, $s2); * * @return string */ - function subString($s, $pos, $len); + public function subString($s, $pos, $len); /** * Returns SQL which calculates the length (in chars) of a string. @@ -111,14 +111,14 @@ function subString($s, $pos, $len); * @param string $s String to calculate length of. * @return string */ - function strLength($s); + public function strLength($s); /** * Quotes database objec identifiers (table names, col names, sequences, etc.). * @param string $text The identifier to quote. * @return string The quoted identifier. */ - function quoteIdentifier($text); + public function quoteIdentifier($text); /** * Quotes a database table which could have space seperating it from an alias, @@ -129,21 +129,21 @@ function quoteIdentifier($text); * @param string $table The table name to quo * @return string The quoted table name **/ - function quoteIdentifierTable($table); + public function quoteIdentifierTable($table); /** * Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. * * @return Boolean */ - function isGetIdBeforeInsert(); + public function isGetIdBeforeInsert(); /** * Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. * * @return Boolean */ - function isGetIdAfterInsert(); + public function isGetIdAfterInsert(); /** * Gets the generated ID (either last ID for autoincrement or next sequence ID). @@ -153,7 +153,7 @@ function isGetIdAfterInsert(); * * @return mixed */ - function getId(ConnectionInterface $con, $name = null); + public function getId(ConnectionInterface $con, $name = null); /** * Formats a temporal value before binding, given a ColumnMap object @@ -163,28 +163,28 @@ function getId(ConnectionInterface $con, $name = null); * * @return string The formatted temporal value */ - function formatTemporalValue($value, ColumnMap $cMap); + public function formatTemporalValue($value, ColumnMap $cMap); /** * Returns timestamp formatter string for use in date() function. * * @return string */ - function getTimestampFormatter(); + public function getTimestampFormatter(); /** * Returns date formatter string for use in date() function. * * @return string */ - function getDateFormatter(); + public function getDateFormatter(); /** * Returns time formatter string for use in date() function. * * @return string */ - function getTimeFormatter(); + public function getTimeFormatter(); /** * Should Column-Names get identifiers for inserts or updates. @@ -197,7 +197,7 @@ function getTimeFormatter(); * * @return Boolean */ - function useQuoteIdentifier(); + public function useQuoteIdentifier(); /** * Allows manipulation of the query string before StatementPdo is instantiated. @@ -207,7 +207,7 @@ function useQuoteIdentifier(); * @param Propel\Runtime\Map\Criteria $values * @param Propel\Runtime\Map\DatabaseMap $dbMap */ - function cleanupSQL(&$sql, array &$params, Criteria $values, DatabaseMap $dbMap); + public function cleanupSQL(&$sql, array &$params, Criteria $values, DatabaseMap $dbMap); /** * Modifies the passed-in SQL to add LIMIT and/or OFFSET. @@ -216,14 +216,14 @@ function cleanupSQL(&$sql, array &$params, Criteria $values, DatabaseMap $dbMap) * @param integer $offset * @param integer $limit */ - function applyLimit(&$sql, $offset, $limit); + public function applyLimit(&$sql, $offset, $limit); /** * Gets the SQL string that this adapter uses for getting a random number. * * @param mixed $seed (optional) seed value for databases that support this */ - function random($seed = null); + public function random($seed = null); /** * Returns the "DELETE FROM [AS ]" part of DELETE query. @@ -233,7 +233,7 @@ function random($seed = null); * * @return string */ - function getDeleteFromClause(Criteria $criteria, $tableName); + public function getDeleteFromClause(Criteria $criteria, $tableName); /** * Builds the SELECT part of a SQL statement based on a Criteria @@ -246,7 +246,7 @@ function getDeleteFromClause(Criteria $criteria, $tableName); * * @return string */ - function createSelectSqlPart(Criteria $criteria, &$fromClause, $aliasAll = false); + public function createSelectSqlPart(Criteria $criteria, &$fromClause, $aliasAll = false); /** * Ensures uniqueness of select column names by turning them all into aliases @@ -258,7 +258,7 @@ function createSelectSqlPart(Criteria $criteria, &$fromClause, $aliasAll = false * @param Propel\Runtime\Map\Criteria $criteria * @return Propel\Runtime\Map\Criteria The input, with Select columns replaced by aliases */ - function turnSelectColumnsToAliases(Criteria $criteria); + public function turnSelectColumnsToAliases(Criteria $criteria); /** * Binds values in a prepared statement. @@ -280,7 +280,7 @@ function turnSelectColumnsToAliases(Criteria $criteria); * @param array $params array('column' => ..., 'table' => ..., 'value' => ...) * @param Propel\Runtime\Map\DatabaseMap $dbMap */ - function bindValues(StatementInterface $stmt, array $params, DatabaseMap $dbMap); + public function bindValues(StatementInterface $stmt, array $params, DatabaseMap $dbMap); /** * Binds a value to a positioned parameted in a statement, @@ -294,5 +294,5 @@ function bindValues(StatementInterface $stmt, array $params, DatabaseMap $dbMap) * * @return Boolean */ - function bindValue(StatementInterface $stmt, $parameter, $value, ColumnMap $cMap, $position = null); + public function bindValue(StatementInterface $stmt, $parameter, $value, ColumnMap $cMap, $position = null); } diff --git a/src/Propel/Runtime/Adapter/Pdo/MssqlAdapter.php b/src/Propel/Runtime/Adapter/Pdo/MssqlAdapter.php index 8f8a2d05a0..8d1a30f208 100644 --- a/src/Propel/Runtime/Adapter/Pdo/MssqlAdapter.php +++ b/src/Propel/Runtime/Adapter/Pdo/MssqlAdapter.php @@ -106,7 +106,7 @@ public function quoteIdentifierTable($table) */ public function random($seed = null) { - return 'RAND(' . ((int)$seed) . ')'; + return 'RAND(' . ((int) $seed) . ')'; } /** diff --git a/src/Propel/Runtime/Adapter/Pdo/OracleAdapter.php b/src/Propel/Runtime/Adapter/Pdo/OracleAdapter.php index 1211d26d7e..1f68992acf 100644 --- a/src/Propel/Runtime/Adapter/Pdo/OracleAdapter.php +++ b/src/Propel/Runtime/Adapter/Pdo/OracleAdapter.php @@ -46,7 +46,7 @@ public function initConnection(ConnectionInterface $con, array $settings) $con->exec("ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'"); if (isset($settings['queries']) && is_array($settings['queries'])) { foreach ($settings['queries'] as $queries) { - foreach ((array)$queries as $query) { + foreach ((array) $queries as $query) { $con->exec($query); } } diff --git a/src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php b/src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php index 86039f42de..a0fbda64f4 100644 --- a/src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php +++ b/src/Propel/Runtime/Adapter/Pdo/PdoAdapter.php @@ -106,7 +106,7 @@ public function initConnection(ConnectionInterface $con, array $settings) if (isset($settings['queries']) && is_array($settings['queries'])) { foreach ($settings['queries'] as $queries) { - foreach ((array)$queries as $query) { + foreach ((array) $queries as $query) { $con->exec($query); } } diff --git a/src/Propel/Runtime/Connection/ConnectionFactory.php b/src/Propel/Runtime/Connection/ConnectionFactory.php index 70d0647c48..398c313c0f 100644 --- a/src/Propel/Runtime/Connection/ConnectionFactory.php +++ b/src/Propel/Runtime/Connection/ConnectionFactory.php @@ -28,7 +28,7 @@ class ConnectionFactory * * @return \Propel\Runtime\Connection\ConnectionInterface */ - static public function create($configuration, AdapterInterface $adapter, $defaultConnectionClass = self::DEFAULT_CONNECTION_CLASS) + public static function create($configuration, AdapterInterface $adapter, $defaultConnectionClass = self::DEFAULT_CONNECTION_CLASS) { if (isset($configuration['classname'])) { $connectionClass = $configuration['classname']; diff --git a/src/Propel/Runtime/Connection/ConnectionInterface.php b/src/Propel/Runtime/Connection/ConnectionInterface.php index 2c1aee2613..0fa92b5958 100644 --- a/src/Propel/Runtime/Connection/ConnectionInterface.php +++ b/src/Propel/Runtime/Connection/ConnectionInterface.php @@ -22,12 +22,12 @@ interface ConnectionInterface /** * @param string $name The datasource name associated to this connection */ - function setName($name); + public function setName($name); /** * @return string The datasource name associated to this connection */ - function getName(); + public function getName(); /** * Turns off autocommit mode. @@ -40,7 +40,7 @@ function getName(); * * @return Boolean TRUE on success or FALSE on failure. */ - function beginTransaction(); + public function beginTransaction(); /** * Commits a transaction. @@ -50,7 +50,7 @@ function beginTransaction(); * * @return Boolean TRUE on success or FALSE on failure. */ - function commit(); + public function commit(); /** * Rolls back a transaction. @@ -62,7 +62,7 @@ function commit(); * * @return Boolean TRUE on success or FALSE on failure. */ - function rollBack(); + public function rollBack(); /** * Retrieve a database connection attribute. @@ -73,7 +73,7 @@ function rollBack(); * @return mixed A successful call returns the value of the requested attribute. * An unsuccessful call returns null. */ - function getAttribute($attribute); + public function getAttribute($attribute); /** * Set an attribute. @@ -83,7 +83,7 @@ function getAttribute($attribute); * * @return Boolean TRUE on success or FALSE on failure. */ - function setAttribute($attribute, $value); + public function setAttribute($attribute, $value); /** * Execute an SQL statement and return the number of affected rows. @@ -94,7 +94,7 @@ function setAttribute($attribute, $value); * @return int The number of rows that were modified or deleted by the SQL * statement you issued. If no rows were affected, returns 0. */ - function exec($statement); + public function exec($statement); /** * Prepares a statement for execution and returns a statement object. @@ -115,7 +115,7 @@ function exec($statement); * successfully prepares, FALSE otherwise. * @throws \Propel\Runtime\Connection\ConnectionException depending on error handling. */ - function prepare($statement, $driver_options = array()); + public function prepare($statement, $driver_options = array()); /** * Executes an SQL statement, returning a result set as a Statement object. @@ -127,7 +127,7 @@ function prepare($statement, $driver_options = array()); * successfully prepares, FALSE otherwise. * @throws \Propel\Runtime\Connection\ConnectionException depending on error handling. */ - function query(); + public function query(); /** * Quotes a string for use in a query. @@ -144,7 +144,7 @@ function query(); * SQL statement. Returns FALSE if the driver does not support * quoting in this way. */ - function quote($string, $parameter_type = 2); + public function quote($string, $parameter_type = 2); /** * Returns the ID of the last inserted row or sequence value. @@ -163,5 +163,5 @@ function quote($string, $parameter_type = 2); * a string representing the last value retrieved from the specified * sequence object. */ - function lastInsertId($name = null); + public function lastInsertId($name = null); } diff --git a/src/Propel/Runtime/Connection/ConnectionManagerInterface.php b/src/Propel/Runtime/Connection/ConnectionManagerInterface.php index c2451d47de..132c2478d8 100644 --- a/src/Propel/Runtime/Connection/ConnectionManagerInterface.php +++ b/src/Propel/Runtime/Connection/ConnectionManagerInterface.php @@ -17,26 +17,26 @@ interface ConnectionManagerInterface /** * @param string $name The datasource name associated to this connection */ - function setName($name); + public function setName($name); /** * @return string The datasource name associated to this connection */ - function getName(); + public function getName(); /** * @param \Propel\Runtime\Adapter\AdapterInterface $adapter * * @return \Propel\Runtime\Connection\ConnectionInterface */ - function getWriteConnection(AdapterInterface $adapter = null); + public function getWriteConnection(AdapterInterface $adapter = null); /** * @param \Propel\Runtime\Adapter\AdapterInterface $adapter * * @return \Propel\Runtime\Connection\ConnectionInterface */ - function getReadConnection(AdapterInterface $adapter = null); + public function getReadConnection(AdapterInterface $adapter = null); - function closeConnections(); + public function closeConnections(); } diff --git a/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php b/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php index efb29515d5..e9f822cd97 100644 --- a/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php +++ b/src/Propel/Runtime/Connection/ProfilerStatementWrapper.php @@ -10,7 +10,6 @@ namespace Propel\Runtime\Connection; - /** * Statement class with profiling abilities. */ @@ -54,7 +53,6 @@ public function bindValue($pos, $value, $type = \PDO::PARAM_STR) return parent::bindValue($pos, $value, $type); } - /** * Executes a prepared statement. Returns a boolean value indicating success. * Overridden for query counting and logging. diff --git a/src/Propel/Runtime/Connection/StatementInterface.php b/src/Propel/Runtime/Connection/StatementInterface.php index 56d812f9c9..3b97dc1bbb 100644 --- a/src/Propel/Runtime/Connection/StatementInterface.php +++ b/src/Propel/Runtime/Connection/StatementInterface.php @@ -43,7 +43,7 @@ interface StatementInterface * PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter. * @return Boolean Returns TRUE on success or FALSE on failure. */ - function bindParam($column, &$variable, $type = null); + public function bindParam($column, &$variable, $type = null); /** * Binds a value to a parameter. @@ -60,7 +60,7 @@ function bindParam($column, &$variable, $type = null); * * @return Boolean Returns TRUE on success or FALSE on failure. */ - function bindValue($param, $value, $type = null); + public function bindValue($param, $value, $type = null); /** * Closes the cursor, enabling the statement to be executed again. @@ -76,7 +76,7 @@ function bindValue($param, $value, $type = null); * * @return Boolean Returns TRUE on success or FALSE on failure. */ - function closeCursor(); + public function closeCursor(); /** * Returns the number of columns in the result set. @@ -95,7 +95,7 @@ function closeCursor(); * by the PDOStatement object. If there is no result set, * this method should return 0. */ - function columnCount(); + public function columnCount(); /** * Executes a prepared statement. @@ -111,7 +111,7 @@ function columnCount(); * bound parameters in the SQL statement being executed. * @return Boolean Returns TRUE on success or FALSE on failure. */ - function execute($params = null); + public function execute($params = null); /** * Fetches the next row from a result set. @@ -136,7 +136,7 @@ function execute($params = null); * * @return mixed */ - function fetch($fetchStyle = 4); + public function fetch($fetchStyle = 4); /** * Returns an array containing all of the result set rows. @@ -146,7 +146,7 @@ function fetch($fetchStyle = 4); * on the value of the fetch_style parameter. * @return array */ - function fetchAll($fetchStyle = 4); + public function fetchAll($fetchStyle = 4); /** * Returns a single column from the next row of a result set. @@ -157,7 +157,7 @@ function fetchAll($fetchStyle = 4); * * @return string A single column in the next row of a result set. */ - function fetchColumn($columnIndex = 0); + public function fetchColumn($columnIndex = 0); /** * Returns the number of rows affected by the last SQL statement @@ -172,5 +172,5 @@ function fetchColumn($columnIndex = 0); * * @return integer The number of rows. */ - function rowCount(); + public function rowCount(); } diff --git a/src/Propel/Runtime/Map/ColumnMap.php b/src/Propel/Runtime/Map/ColumnMap.php index a0889e3425..d98001c56f 100644 --- a/src/Propel/Runtime/Map/ColumnMap.php +++ b/src/Propel/Runtime/Map/ColumnMap.php @@ -498,7 +498,7 @@ public function ignoreCase($str, AdapterInterface $db) * @param string $name * @return string Normalized column name. */ - static public function normalizeName($name) + public static function normalizeName($name) { if (false !== ($pos = strrpos($name, '.'))) { $name = substr($name, $pos + 1); diff --git a/src/Propel/Runtime/Map/DatabaseMap.php b/src/Propel/Runtime/Map/DatabaseMap.php index 16678ee603..b365a48bba 100644 --- a/src/Propel/Runtime/Map/DatabaseMap.php +++ b/src/Propel/Runtime/Map/DatabaseMap.php @@ -200,7 +200,7 @@ public function getTableByPhpName($phpName) /** * Convenience method to get the AdapterInterface registered with Propel for this database. - * @see Propel::getServiceContainer()->getAdapter(string). + * @see Propel::getServiceContainer()->getAdapter(string) . * * @return \Propel\Runtime\Adapter\AdapterInterface */ diff --git a/src/Propel/Runtime/Map/TableMap.php b/src/Propel/Runtime/Map/TableMap.php index 8b033ded02..80ff4a33cb 100644 --- a/src/Propel/Runtime/Map/TableMap.php +++ b/src/Propel/Runtime/Map/TableMap.php @@ -488,7 +488,6 @@ public function addForeignPrimaryKey($columnName, $phpName, $type, $fkTable, $fk return $this->addColumn($columnName, $phpName, $type, $isNotNull, $size, $defaultValue, true, $fkTable, $fkColumn); } - /** * @return Boolean true if the table is a many to many */ diff --git a/src/Propel/Runtime/Om/Persistent.php b/src/Propel/Runtime/Om/Persistent.php index c287c3e153..17738bbfb4 100644 --- a/src/Propel/Runtime/Om/Persistent.php +++ b/src/Propel/Runtime/Om/Persistent.php @@ -37,7 +37,6 @@ public function getPrimaryKey(); */ public function setPrimaryKey($primaryKey); - /** * Returns whether the object has been modified, since it was * last retrieved from storage. diff --git a/src/Propel/Runtime/Parser/AbstractParser.php b/src/Propel/Runtime/Parser/AbstractParser.php index 8477813c19..7cb8b3786a 100644 --- a/src/Propel/Runtime/Parser/AbstractParser.php +++ b/src/Propel/Runtime/Parser/AbstractParser.php @@ -92,7 +92,7 @@ public function dump($data, $path = null) * * @return AbstractParser A PropelParser subclass instance */ - static public function getParser($type = 'XML') + public static function getParser($type = 'XML') { $class = sprintf('\Propel\Runtime\Parser\%sParser', ucfirst(strtolower($type))); diff --git a/src/Propel/Runtime/Parser/XmlParser.php b/src/Propel/Runtime/Parser/XmlParser.php index 24ee7df8c4..646b92af64 100644 --- a/src/Propel/Runtime/Parser/XmlParser.php +++ b/src/Propel/Runtime/Parser/XmlParser.php @@ -88,7 +88,6 @@ public function listToXML($array, $rootElementName = 'data', $charset = null) return $this->listFromArray($array, $rootElementName, $charset); } - /** * @param array $array * @param DOMElement $rootElement diff --git a/src/Propel/Runtime/Propel.php b/src/Propel/Runtime/Propel.php index 98d5d2b6c8..eee95326c1 100644 --- a/src/Propel/Runtime/Propel.php +++ b/src/Propel/Runtime/Propel.php @@ -101,7 +101,7 @@ class Propel * @param string $configFile Path (absolute or relative to include_path) to config file. * @deprecated Why don't you just include the configuration file? */ - static public function init($configFile) + public static function init($configFile) { $serviceContainer = self::getServiceContainer(); $serviceContainer->closeConnections(); @@ -113,7 +113,7 @@ static public function init($configFile) * * @return \Propel\Runtime\ServiceContainer\ServiceContainerInterface */ - static public function getServiceContainer() + public static function getServiceContainer() { if (null === self::$serviceContainer) { self::$serviceContainer = new StandardServiceContainer(); @@ -127,7 +127,7 @@ static public function getServiceContainer() * * @param \Propel\Runtime\ServiceContainer\ServiceContainerInterface */ - static public function setServiceContainer(ServiceContainerInterface $serviceContainer) + public static function setServiceContainer(ServiceContainerInterface $serviceContainer) { self::$serviceContainer = $serviceContainer; } @@ -135,7 +135,7 @@ static public function setServiceContainer(ServiceContainerInterface $serviceCon /** * @return string */ - static public function getDefaultDatasource() + public static function getDefaultDatasource() { return self::$serviceContainer->getDefaultDatasource(); } @@ -149,7 +149,7 @@ static public function getDefaultDatasource() * * @return Propel\Runtime\Adapter\AdapterInterface */ - static public function getAdapter($name = null) + public static function getAdapter($name = null) { return self::$serviceContainer->getAdapter($name); } @@ -163,7 +163,7 @@ static public function getAdapter($name = null) * * @return \Propel\Runtime\Map\DatabaseMap */ - static public function getDatabaseMap($name = null) + public static function getDatabaseMap($name = null) { return self::$serviceContainer->getDatabaseMap($name); } @@ -173,7 +173,7 @@ static public function getDatabaseMap($name = null) * * @return \Propel\Runtime\Connection\ConnectionManagerInterface */ - static public function getConnectionManager($name) + public static function getConnectionManager($name) { return self::$serviceContainer->getConnectionManager($name); } @@ -184,7 +184,7 @@ static public function getConnectionManager($name) * This method frees any database connection handles that have been * opened by the getConnection() method. */ - static public function closeConnections() + public static function closeConnections() { return self::$serviceContainer->closeConnections(); } @@ -200,7 +200,7 @@ static public function closeConnections() * * @return \Propel\Runtime\Connection\ConnectionInterface A database connection */ - static public function getConnection($name = null, $mode = ServiceContainerInterface::CONNECTION_WRITE) + public static function getConnection($name = null, $mode = ServiceContainerInterface::CONNECTION_WRITE) { return self::$serviceContainer->getConnection($name, $mode); } @@ -218,7 +218,7 @@ static public function getConnection($name = null, $mode = ServiceContainerInter * * @throws PropelException - if connection is not properly configured */ - static public function getWriteConnection($name) + public static function getWriteConnection($name) { return self::$serviceContainer->getWriteConnection($name); } @@ -235,7 +235,7 @@ static public function getWriteConnection($name) * * @return ConnectionInterface A database connection */ - static public function getReadConnection($name) + public static function getReadConnection($name) { return self::$serviceContainer->getReadConnection($name); } @@ -245,7 +245,7 @@ static public function getReadConnection($name) * * @return \Propel\Runtime\Util\Profiler */ - static public function getProfiler() + public static function getProfiler() { return self::$serviceContainer->getProfiler(); } @@ -255,7 +255,7 @@ static public function getProfiler() * * @return Boolean True if Propel uses logging */ - static public function hasLogger() + public static function hasLogger() { return self::$serviceContainer->hasLogger(); } @@ -265,7 +265,7 @@ static public function hasLogger() * * @return \Monolog\Logger Configured log class */ - static public function getLogger() + public static function getLogger() { return self::$serviceContainer->getLogger(); } @@ -280,7 +280,7 @@ static public function getLogger() * * @return Boolean True if the message was logged successfully or no logger was used. */ - static public function log($message, $level = self::LOG_DEBUG) + public static function log($message, $level = self::LOG_DEBUG) { if (self::$serviceContainer->hasLogger()) { $logger = self::$serviceContainer->getLogger(); @@ -311,7 +311,7 @@ static public function log($message, $level = self::LOG_DEBUG) * @return Boolean true if the method changed the instance pooling state, * false if it was already disabled */ - static public function disableInstancePooling() + public static function disableInstancePooling() { if (!self::$isInstancePoolingEnabled) { return false; @@ -327,7 +327,7 @@ static public function disableInstancePooling() * @return Boolean true if the method changed the instance pooling state, * false if it was already enabled */ - static public function enableInstancePooling() + public static function enableInstancePooling() { if (self::$isInstancePoolingEnabled) { return false; @@ -342,7 +342,7 @@ static public function enableInstancePooling() * * @return Boolean Whether the pooling is enabled or not. */ - static public function isInstancePoolingEnabled() + public static function isInstancePoolingEnabled() { return self::$isInstancePoolingEnabled; } diff --git a/src/Propel/Runtime/Query/Criteria.php b/src/Propel/Runtime/Query/Criteria.php index 294e45c009..20b6028c33 100644 --- a/src/Propel/Runtime/Query/Criteria.php +++ b/src/Propel/Runtime/Query/Criteria.php @@ -970,7 +970,6 @@ public function addJoinObject(Join $join) return $this; } - /** * Get the array of Joins. * @return array Join[] diff --git a/src/Propel/Runtime/Query/ModelCriteria.php b/src/Propel/Runtime/Query/ModelCriteria.php index 77c08ebcc3..869087a87e 100644 --- a/src/Propel/Runtime/Query/ModelCriteria.php +++ b/src/Propel/Runtime/Query/ModelCriteria.php @@ -1098,7 +1098,7 @@ public function addRelationSelectColumns($relation) * * @return array list($className, $aliasName) */ - static public function getClassAndAlias($class) + public static function getClassAndAlias($class) { if (false !== strpos($class, ' ')) { list($class, $alias) = explode(' ', $class); @@ -1119,7 +1119,7 @@ static public function getClassAndAlias($class) * @param string $relation Relation to use for the join * @return string the relationName used in the join */ - static public function getRelationName($relation) + public static function getRelationName($relation) { // get the relationName list($fullName, $relationAlias) = self::getClassAndAlias($relation); @@ -2125,7 +2125,7 @@ public function getAliasedColName($colName) * * @return string The short class name */ - static public function getShortName($fullyQualifiedClassName) + public static function getShortName($fullyQualifiedClassName) { $namespaceParts = explode('\\', $fullyQualifiedClassName); diff --git a/src/Propel/Runtime/Query/ModelCriterion.php b/src/Propel/Runtime/Query/ModelCriterion.php index 5985a4fe81..63e6c318de 100644 --- a/src/Propel/Runtime/Query/ModelCriterion.php +++ b/src/Propel/Runtime/Query/ModelCriterion.php @@ -291,7 +291,7 @@ public function hashCode() * taken from http://www.php.net/manual/en/function.str-replace.php * */ - static protected function strReplaceOnce($search, $replace, $subject) + protected static function strReplaceOnce($search, $replace, $subject) { $firstChar = strpos($subject, $search); if (false !== $firstChar) { diff --git a/src/Propel/Runtime/Query/PropelQuery.php b/src/Propel/Runtime/Query/PropelQuery.php index 8b3ea3ba3c..72d8555916 100644 --- a/src/Propel/Runtime/Query/PropelQuery.php +++ b/src/Propel/Runtime/Query/PropelQuery.php @@ -19,7 +19,7 @@ */ class PropelQuery { - static public function from($queryClassAndAlias) + public static function from($queryClassAndAlias) { list($class, $alias) = ModelCriteria::getClassAndAlias($queryClassAndAlias); $queryClass = $class . 'Query'; diff --git a/src/Propel/Runtime/ServiceContainer/ServiceContainerInterface.php b/src/Propel/Runtime/ServiceContainer/ServiceContainerInterface.php index 0988175b94..7d1663fb70 100644 --- a/src/Propel/Runtime/ServiceContainer/ServiceContainerInterface.php +++ b/src/Propel/Runtime/ServiceContainer/ServiceContainerInterface.php @@ -40,7 +40,7 @@ interface ServiceContainerInterface /** * @return string */ - function getDefaultDatasource(); + public function getDefaultDatasource(); /** * Get the adapter for a given datasource. @@ -51,7 +51,7 @@ function getDefaultDatasource(); * * @return Propel\Runtime\Adapter\AdapterInterface */ - function getAdapter($name = null); + public function getAdapter($name = null); /** * Get the database map for a given datasource. @@ -62,14 +62,14 @@ function getAdapter($name = null); * * @return \Propel\Runtime\Map\DatabaseMap */ - function getDatabaseMap($name = null); + public function getDatabaseMap($name = null); /** * @param string $name The datasource name * * @return \Propel\Runtime\Connection\ConnectionManagerInterface */ - function getConnectionManager($name); + public function getConnectionManager($name); /** * Close any associated resource handles. @@ -77,7 +77,7 @@ function getConnectionManager($name); * This method frees any database connection handles that have been * opened by the getConnection() method. */ - function closeConnections(); + public function closeConnections(); /** * Get a connection for a given datasource. @@ -90,7 +90,7 @@ function closeConnections(); * * @return \Propel\Runtime\Connection\ConnectionInterface A database connection */ - function getConnection($name = null, $mode = self::CONNECTION_WRITE); + public function getConnection($name = null, $mode = self::CONNECTION_WRITE); /** * Get a write connection for a given datasource. @@ -105,7 +105,7 @@ function getConnection($name = null, $mode = self::CONNECTION_WRITE); * * @throws \Propel\Runtime\Adapter\Exception\AdapterException - if connection is not properly configured */ - function getWriteConnection($name); + public function getWriteConnection($name); /** * Get a read connection for a given datasource. @@ -119,26 +119,26 @@ function getWriteConnection($name); * * @return ConnectionInterface A database connection */ - function getReadConnection($name); + public function getReadConnection($name); /** * Get a profiler instance. * * @return \Propel\Runtime\Util\Profiler. */ - function getProfiler(); + public function getProfiler(); /** * Check if a logger is available for a given datasource. * * @return Boolean */ - function hasLogger($name = 'defaultLogger'); + public function hasLogger($name = 'defaultLogger'); /** * Get a logger for a given datasource, or the default logger. * * @return \Monolog\Logger */ - function getLogger($name = 'defaultLogger'); + public function getLogger($name = 'defaultLogger'); } diff --git a/src/Propel/Runtime/Util/BasePeer.php b/src/Propel/Runtime/Util/BasePeer.php index 9d15a33487..f913aa6bb8 100644 --- a/src/Propel/Runtime/Util/BasePeer.php +++ b/src/Propel/Runtime/Util/BasePeer.php @@ -75,7 +75,7 @@ class BasePeer */ const TYPE_NUM = 'num'; - static public function getFieldnames($classname, $type = self::TYPE_PHPNAME) + public static function getFieldnames($classname, $type = self::TYPE_PHPNAME) { $peerclass = $classname . 'Peer'; $callable = array($peerclass, 'getFieldnames'); @@ -83,7 +83,7 @@ static public function getFieldnames($classname, $type = self::TYPE_PHPNAME) return call_user_func($callable, $type); } - static public function translateFieldname($classname, $fieldname, $fromType, $toType) + public static function translateFieldname($classname, $fieldname, $fromType, $toType) { $peerclass = $classname . 'Peer'; $callable = array($peerclass, 'translateFieldname'); @@ -102,7 +102,7 @@ static public function translateFieldname($classname, $fieldname, $fromType, $to * * @throws \Propel\Runtime\Exception\RuntimeException */ - static public function doDelete(Criteria $criteria, ConnectionInterface $con) + public static function doDelete(Criteria $criteria, ConnectionInterface $con) { $db = Propel::getServiceContainer()->getAdapter($criteria->getDbName()); $dbMap = Propel::getServiceContainer()->getDatabaseMap($criteria->getDbName()); @@ -170,7 +170,7 @@ static public function doDelete(Criteria $criteria, ConnectionInterface $con) * * @throws \Propel\Runtime\Exception\RuntimeException */ - static public function doDeleteAll($tableName, ConnectionInterface $con, $databaseName = null) + public static function doDeleteAll($tableName, ConnectionInterface $con, $databaseName = null) { try { @@ -213,7 +213,7 @@ static public function doDeleteAll($tableName, ConnectionInterface $con, $databa * * @throws \Propel\Runtime\Exception\RuntimeException */ - static public function doInsert(Criteria $criteria, ConnectionInterface $con) + public static function doInsert(Criteria $criteria, ConnectionInterface $con) { // The primary key $id = null; @@ -315,14 +315,14 @@ static public function doInsert(Criteria $criteria, ConnectionInterface $con) * WHERE some_column = some value AND could_have_another_column = * another value AND so on. * - * @param $selectCriteria A Criteria object containing values used in where clause. - * @param $updateValues A Criteria object containing values used in set clause. - * @param ConnectionInterface $con The ConnectionInterface connection object to use. + * @param $selectCriteria A Criteria object containing values used in where clause. + * @param $updateValues A Criteria object containing values used in set clause. + * @param ConnectionInterface $con The ConnectionInterface connection object to use. * @return int The number of rows affected by last update statement. For most uses there is only one update statement executed, so this number will correspond to the number of rows affected by the call to this method. Note that the return value does require that this information is returned (supported) by the Propel db driver. * * @throws \Propel\Runtime\Exception\RuntimeException */ - static public function doUpdate(Criteria $selectCriteria, Criteria $updateValues, ConnectionInterface $con) + public static function doUpdate(Criteria $selectCriteria, Criteria $updateValues, ConnectionInterface $con) { $db = Propel::getServiceContainer()->getAdapter($selectCriteria->getDbName()); $dbMap = Propel::getServiceContainer()->getDatabaseMap($selectCriteria->getDbName()); @@ -458,7 +458,7 @@ static public function doUpdate(Criteria $selectCriteria, Criteria $updateValues * * @see createSelectSql() */ - static public function doSelect(Criteria $criteria, ConnectionInterface $con = null) + public static function doSelect(Criteria $criteria, ConnectionInterface $con = null) { $dbMap = Propel::getServiceContainer()->getDatabaseMap($criteria->getDbName()); $db = Propel::getServiceContainer()->getAdapter($criteria->getDbName()); @@ -500,7 +500,7 @@ static public function doSelect(Criteria $criteria, ConnectionInterface $con = n * @throws \Propel\Runtime\Exception\RuntimeException * @see createSelectSql() */ - static public function doCount(Criteria $criteria, ConnectionInterface $con = null) + public static function doCount(Criteria $criteria, ConnectionInterface $con = null) { $dbMap = Propel::getServiceContainer()->getDatabaseMap($criteria->getDbName()); $db = Propel::getServiceContainer()->getAdapter($criteria->getDbName()); @@ -561,7 +561,7 @@ static public function doCount(Criteria $criteria, ConnectionInterface $con = nu * * @throws \Propel\Runtime\Exception\RuntimeException */ - static private function getPrimaryKey(Criteria $criteria) + private static function getPrimaryKey(Criteria $criteria) { // Assume all the keys are for the same table. $keys = $criteria->keys(); @@ -587,7 +587,7 @@ static private function getPrimaryKey(Criteria $criteria) * This is implemented in a service class rather than in Criteria itself * in order to avoid doing the tests when it's not necessary (e.g. for SELECTs) */ - static public function needsSelectAliases(Criteria $criteria) + public static function needsSelectAliases(Criteria $criteria) { $columnNames = array(); foreach ($criteria->getSelectColumns() as $fullyQualifiedColumnName) { @@ -618,7 +618,7 @@ static public function needsSelectAliases(Criteria $criteria) * * @throws \Propel\Runtime\Exception\RuntimeException Trouble creating the query string. */ - static public function createSelectSql(Criteria $criteria, &$params) + public static function createSelectSql(Criteria $criteria, &$params) { $db = Propel::getServiceContainer()->getAdapter($criteria->getDbName()); $dbMap = Propel::getServiceContainer()->getDatabaseMap($criteria->getDbName()); @@ -818,12 +818,12 @@ static public function createSelectSql(Criteria $criteria, &$params) /** * Builds a params array, like the kind populated by Criterion::appendPsTo(). * This is useful for building an array even when it is not using the appendPsTo() method. - * @param array $columns - * @param Criteria $values + * @param array $columns + * @param Criteria $values * - * @return array params array('column' => ..., 'table' => ..., 'value' => ...) + * @return array params array('column' => ..., 'table' => ..., 'value' => ...) */ - static private function buildParams($columns, Criteria $values) + private static function buildParams($columns, Criteria $values) { $params = array(); foreach ($columns as $key) { diff --git a/src/Propel/Runtime/Util/Profiler.php b/src/Propel/Runtime/Util/Profiler.php index 81071b653b..da79457b9e 100644 --- a/src/Propel/Runtime/Util/Profiler.php +++ b/src/Propel/Runtime/Util/Profiler.php @@ -215,7 +215,7 @@ public function getProfileBetween($startSnapshot, $endSnapshot) * * @return array */ - static public function getSnapshot() + public static function getSnapshot() { return array( 'microtime' => microtime(true), @@ -232,7 +232,7 @@ static public function getSnapshot() * * @return string */ - static public function formatMemory($bytes, $precision = 3) + public static function formatMemory($bytes, $precision = 3) { $absBytes = abs($bytes); $sign = ($bytes == $absBytes) ? 1 : -1; @@ -254,7 +254,7 @@ static public function formatMemory($bytes, $precision = 3) * * @return string */ - static public function formatDuration($duration, $precision = 3) + public static function formatDuration($duration, $precision = 3) { if ($duration < 1) { $duration *= 1000; @@ -275,7 +275,7 @@ static public function formatDuration($duration, $precision = 3) * * @return float */ - static public function toPrecision($number, $significantFigures = 3) + public static function toPrecision($number, $significantFigures = 3) { if (0 === $number) { return 0; diff --git a/src/Propel/Runtime/Util/PropelColumnTypes.php b/src/Propel/Runtime/Util/PropelColumnTypes.php index 5deceba064..1a93eeefb0 100644 --- a/src/Propel/Runtime/Util/PropelColumnTypes.php +++ b/src/Propel/Runtime/Util/PropelColumnTypes.php @@ -84,7 +84,7 @@ class PropelColumnTypes * @param string $propelType * @return int */ - static public function getPdoType($propelType) + public static function getPdoType($propelType) { return self::$propelToPdoMap[$propelType]; } diff --git a/src/Propel/Runtime/Util/PropelDateTime.php b/src/Propel/Runtime/Util/PropelDateTime.php index ee8ab46a46..a6b7a93858 100644 --- a/src/Propel/Runtime/Util/PropelDateTime.php +++ b/src/Propel/Runtime/Util/PropelDateTime.php @@ -69,7 +69,7 @@ protected static function isTimestamp($value) * * @return mixed null, or an instance of $dateTimeClass */ - static public function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') + public static function newInstance($value, DateTimeZone $timeZone = null, $dateTimeClass = 'DateTime') { if ($value instanceof \DateTime) { return $value; @@ -106,7 +106,7 @@ static public function newInstance($value, DateTimeZone $timeZone = null, $dateT * of class that should be serialized. * @return array string[] */ - function __sleep() + public function __sleep() { // We need to use a string without a time zone, due to // PHP bug: http://bugs.php.net/bug.php?id=40743 @@ -120,7 +120,7 @@ function __sleep() * PHP "magic" function called when object is restored from serialized state. * Calls DateTime constructor with previously stored string value of date. */ - function __wakeup() + public function __wakeup() { // @TODO I don't think we can call the constructor from within this method parent::__construct($this->dateString, new \DateTimeZone($this->tzString)); diff --git a/src/Propel/Runtime/Util/PropelModelPager.php b/src/Propel/Runtime/Util/PropelModelPager.php index fc9e1b4297..476738e24f 100644 --- a/src/Propel/Runtime/Util/PropelModelPager.php +++ b/src/Propel/Runtime/Util/PropelModelPager.php @@ -91,7 +91,7 @@ public function init($con = null) if (0 === $this->getPage() || 0 === $this->getMaxPerPage()) { $this->setLastPage(0); } else { - $this->setLastPage((int)ceil($this->getNbResults() / $this->getMaxPerPage())); + $this->setLastPage((int) ceil($this->getNbResults() / $this->getMaxPerPage())); $offset = ($this->getPage() - 1) * $this->getMaxPerPage(); $q->offset($offset); diff --git a/src/Propel/Runtime/Validator/Constraints/Unique.php b/src/Propel/Runtime/Validator/Constraints/Unique.php index 8d159b2c6d..bf2462f434 100644 --- a/src/Propel/Runtime/Validator/Constraints/Unique.php +++ b/src/Propel/Runtime/Validator/Constraints/Unique.php @@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraint; - class Unique extends Constraint { public $message = 'This value is already stored in your database'; diff --git a/tests/Propel/Tests/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehaviorTest.php b/tests/Propel/Tests/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehaviorTest.php index fe841f07a9..e8e64ef231 100644 --- a/tests/Propel/Tests/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehaviorTest.php +++ b/tests/Propel/Tests/Generator/Behavior/AlternativeCodingStandards/AlternativeCodingStandardsBehaviorTest.php @@ -29,17 +29,13 @@ public function convertBracketsNewlineDataProvider() { }"), array("if (true) { -}", "if (true) -{ +}", "if (true) { }"), array("} else { -}", "} -else -{ +}", "} else { }"), array("foreach (\$i as \$j) { -}", "foreach (\$i as \$j) -{ +}", "foreach (\$i as \$j) { }"), ); } @@ -55,7 +51,8 @@ public function testConvertBracketsNewline($input, $output) } } -class TestableAlternativeCodingStandardsBehavior extends AlternativeCodingStandardsBehavior { +class TestableAlternativeCodingStandardsBehavior extends AlternativeCodingStandardsBehavior +{ public function filter(&$script) { return parent::filter($script); diff --git a/tests/Propel/Tests/Generator/Behavior/Sortable/SortableBehaviorPeerBuilderModifierTest.php b/tests/Propel/Tests/Generator/Behavior/Sortable/SortableBehaviorPeerBuilderModifierTest.php index 11959dd707..c710b4276e 100644 --- a/tests/Propel/Tests/Generator/Behavior/Sortable/SortableBehaviorPeerBuilderModifierTest.php +++ b/tests/Propel/Tests/Generator/Behavior/Sortable/SortableBehaviorPeerBuilderModifierTest.php @@ -84,5 +84,4 @@ public function testDoSelectOrderByRank() } } - } diff --git a/tests/Propel/Tests/Generator/Behavior/Validate/ValidateBehaviorTest.php b/tests/Propel/Tests/Generator/Behavior/Validate/ValidateBehaviorTest.php index 92b8b6d9b3..48cb0b4783 100755 --- a/tests/Propel/Tests/Generator/Behavior/Validate/ValidateBehaviorTest.php +++ b/tests/Propel/Tests/Generator/Behavior/Validate/ValidateBehaviorTest.php @@ -18,7 +18,6 @@ use Propel\Tests\Bookstore\Behavior\ValidateReader; use Propel\Tests\Helpers\Bookstore\BookstoreTestBase; - /** * Tests for ValidateBehavior class * @@ -32,7 +31,6 @@ class ValidateBehaviorTest extends BookstoreTestBase */ private $classes; - public function assertPreConditions() { if (!class_exists('Propel\Tests\Bookstore\Behavior\ValidateAuthor')) { diff --git a/tests/Propel/Tests/Generator/Builder/Om/AbstractOMBuilderRelatedByTest.php b/tests/Propel/Tests/Generator/Builder/Om/AbstractOMBuilderRelatedByTest.php index e65cdfe841..e9e30ff48e 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/AbstractOMBuilderRelatedByTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/AbstractOMBuilderRelatedByTest.php @@ -10,7 +10,6 @@ namespace Propel\Tests\Generator\Builder\Om; - use Propel\Generator\Model\ForeignKey; use Propel\Generator\Builder\Om\AbstractOMBuilder; use Propel\Generator\Builder\Util\SchemaReader; diff --git a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectRelTest.php b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectRelTest.php index 5b05f91b0b..af2934cc5c 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectRelTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectRelTest.php @@ -254,7 +254,6 @@ public function testManyToManyAdd() $this->assertEquals(1, $list->countBookListRels()); } - /** * Test behavior of columns that are implicated in multiple foreign keys. * @link http://propel.phpdb.org/trac/ticket/228 diff --git a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectTest.php b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectTest.php index b0fb53c57c..592a09e86a 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectTest.php @@ -361,7 +361,6 @@ public function testObjectInstances_Fkeys() . " publisher_id = " . $pub2->getId() . " WHERE id = " . $book->getId()); - $book2 = BookPeer::retrieveByPK($book->getId()); $this->assertSame($book, $book2, "Expected same book object instance"); @@ -402,8 +401,8 @@ public function testObjectInstancePoolTypecasting() $bookId = $book->getId(); $opinion = new BookOpinion(); - $opinion->setBookId((string)$bookId); - $opinion->setReaderId((string)$readerId); + $opinion->setBookId((string) $bookId); + $opinion->setReaderId((string) $readerId); $opinion->setRating(5); $opinion->setRecommendToFriend(false); $opinion->save(); @@ -703,7 +702,6 @@ public function testCopy_CompositePK() $op->setRecommendToFriend(true); $op->save(); - $br2 = $br->copy(true); $this->assertNull($br2->getId()); diff --git a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectWithFixturesTest.php b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectWithFixturesTest.php index 9a5b4d14fd..f646f8f576 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectWithFixturesTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/GeneratedObjectWithFixturesTest.php @@ -29,7 +29,6 @@ use Propel\Tests\Bookstore\Review; use Propel\Tests\Bookstore\ReviewPeer; - use Propel\Runtime\Exception\PropelException; use Propel\Runtime\Query\Criteria; use Propel\Runtime\Util\BasePeer; diff --git a/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoDeleteTest.php b/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoDeleteTest.php index 16f61a195b..a62c3bbfd1 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoDeleteTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoDeleteTest.php @@ -281,7 +281,6 @@ public function testDoDelete_ByObj() } - /** * Test the doDeleteAll() method for single table. */ diff --git a/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoSelectTest.php b/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoSelectTest.php index ac0527a924..b3de7e0b60 100644 --- a/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoSelectTest.php +++ b/tests/Propel/Tests/Generator/Builder/Om/GeneratedPeerDoSelectTest.php @@ -244,7 +244,6 @@ public function testObjectInstances() } } - // 5) test creating a new object, saving it, and then retrieving that object (should all be same instance) $b = new BookstoreEmployee(); $b->setName("Testing"); @@ -455,7 +454,6 @@ public function testMultiColJoin() $entry->save(); */ - $c = new Criteria(); $c->addJoin(array(BookstoreContestEntryPeer::BOOKSTORE_ID, BookstoreContestEntryPeer::CONTEST_ID), array(BookstoreContestPeer::BOOKSTORE_ID, BookstoreContestPeer::CONTEST_ID) ); diff --git a/tests/Propel/Tests/Generator/Platform/DefaultPlatformTest.php b/tests/Propel/Tests/Generator/Platform/DefaultPlatformTest.php index fa46be15b6..a458b7f062 100644 --- a/tests/Propel/Tests/Generator/Platform/DefaultPlatformTest.php +++ b/tests/Propel/Tests/Generator/Platform/DefaultPlatformTest.php @@ -98,7 +98,6 @@ public function testQuote() $this->assertEquals("'$unquoted'", $quoted); - $unquoted = "Naughty ' string"; $quoted = $p->quote($unquoted); $expected = "'Naughty '' string'"; diff --git a/tests/Propel/Tests/Generator/Platform/OraclePlatformTest.php b/tests/Propel/Tests/Generator/Platform/OraclePlatformTest.php index d053f3d0e5..c75d2eeb28 100644 --- a/tests/Propel/Tests/Generator/Platform/OraclePlatformTest.php +++ b/tests/Propel/Tests/Generator/Platform/OraclePlatformTest.php @@ -590,5 +590,4 @@ public function testGetOracleBlockStorageDDL() $this->assertEquals($expected, $this->getPlatform()->getAddTablesDDL($database)); } - } diff --git a/tests/Propel/Tests/Generator/Platform/PlatformTestProvider.php b/tests/Propel/Tests/Generator/Platform/PlatformTestProvider.php index ca0b21edf3..7a6ef06714 100644 --- a/tests/Propel/Tests/Generator/Platform/PlatformTestProvider.php +++ b/tests/Propel/Tests/Generator/Platform/PlatformTestProvider.php @@ -183,7 +183,6 @@ public function providerForTestGetAddTableDDLSchema() return array(array($schema)); } - public function providerForTestGetUniqueDDL() { $table = new Table('foo'); diff --git a/tests/Propel/Tests/Generator/Reverse/PgsqlSchemaParserTest.php b/tests/Propel/Tests/Generator/Reverse/PgsqlSchemaParserTest.php index 0d500df79c..2916b60bdd 100644 --- a/tests/Propel/Tests/Generator/Reverse/PgsqlSchemaParserTest.php +++ b/tests/Propel/Tests/Generator/Reverse/PgsqlSchemaParserTest.php @@ -18,7 +18,6 @@ use Propel\Runtime\Propel; use Propel\Tests\TestCase; - /** * Tests for Pgsql database schema parser. * diff --git a/tests/Propel/Tests/Runtime/Adapter/Pdo/OracleAdapterTest.php b/tests/Propel/Tests/Runtime/Adapter/Pdo/OracleAdapterTest.php index e1244cce5b..44c8bac9d6 100644 --- a/tests/Propel/Tests/Runtime/Adapter/Pdo/OracleAdapterTest.php +++ b/tests/Propel/Tests/Runtime/Adapter/Pdo/OracleAdapterTest.php @@ -81,5 +81,4 @@ public function testCreateSelectSqlPart() $this->assertEquals(array('book'), $fromClause, 'createSelectSqlPart() adds the tables from the select columns to the from clause'); } - } diff --git a/tests/Propel/Tests/Runtime/Connection/ConnectionManagerMasterSlaveTest.php b/tests/Propel/Tests/Runtime/Connection/ConnectionManagerMasterSlaveTest.php index 3158e08cd3..3837643870 100644 --- a/tests/Propel/Tests/Runtime/Connection/ConnectionManagerMasterSlaveTest.php +++ b/tests/Propel/Tests/Runtime/Connection/ConnectionManagerMasterSlaveTest.php @@ -90,7 +90,6 @@ public function testGetReadConnectionBuildsConnectionNotBasedOnWriteConfiguratio $this->assertEquals(PDO::CASE_LOWER, $pdo->getAttribute(PDO::ATTR_CASE)); } - public function testGetReadConnectionReturnsWriteConnectionIfNoReadConnectionIsSet() { $manager = new ConnectionManagerMasterSlave(); diff --git a/tests/Propel/Tests/Runtime/Formatter/ArrayFormatterTest.php b/tests/Propel/Tests/Runtime/Formatter/ArrayFormatterTest.php index c41410ea3b..6f900fa9d9 100644 --- a/tests/Propel/Tests/Runtime/Formatter/ArrayFormatterTest.php +++ b/tests/Propel/Tests/Runtime/Formatter/ArrayFormatterTest.php @@ -135,5 +135,4 @@ public function testFormatOneNoResult() $this->assertNull($book, 'ArrayFormatter::formatOne() returns null when no result'); } - } diff --git a/tests/Propel/Tests/Runtime/Formatter/SimpleArrayFormatterTest.php b/tests/Propel/Tests/Runtime/Formatter/SimpleArrayFormatterTest.php index 6fbb935799..38870c4ed3 100644 --- a/tests/Propel/Tests/Runtime/Formatter/SimpleArrayFormatterTest.php +++ b/tests/Propel/Tests/Runtime/Formatter/SimpleArrayFormatterTest.php @@ -18,7 +18,6 @@ use Propel\Runtime\Propel; use Propel\Runtime\Query\ModelCriteria; - class SimpleArrayFormatterTest extends BookstoreEmptyTestBase { protected function setUp() diff --git a/tests/Propel/Tests/Runtime/Map/ColumnMapTest.php b/tests/Propel/Tests/Runtime/Map/ColumnMapTest.php index f5dd3a9361..92b595b7c4 100644 --- a/tests/Propel/Tests/Runtime/Map/ColumnMapTest.php +++ b/tests/Propel/Tests/Runtime/Map/ColumnMapTest.php @@ -19,7 +19,6 @@ use Propel\Runtime\Map\TableMap; use Propel\Runtime\Map\Exception\ForeignKeyNotFoundException; - /** * Test class for TableMap. * diff --git a/tests/Propel/Tests/Runtime/Om/BaseObjectConvertTest.php b/tests/Propel/Tests/Runtime/Om/BaseObjectConvertTest.php index 75a1af7249..a79fc6cf03 100644 --- a/tests/Propel/Tests/Runtime/Om/BaseObjectConvertTest.php +++ b/tests/Propel/Tests/Runtime/Om/BaseObjectConvertTest.php @@ -234,5 +234,4 @@ public function testfromCSV($expected) $this->assertEquals($this->book, $book); } - } diff --git a/tests/Propel/Tests/Runtime/Query/ModelCriteriaSelectTest.php b/tests/Propel/Tests/Runtime/Query/ModelCriteriaSelectTest.php index e6b5668537..cf032681fe 100644 --- a/tests/Propel/Tests/Runtime/Query/ModelCriteriaSelectTest.php +++ b/tests/Propel/Tests/Runtime/Query/ModelCriteriaSelectTest.php @@ -201,8 +201,6 @@ public function testSelectStringWildcard() $this->assertEquals(array('Propel\Tests\Bookstore\Book.Id', 'Propel\Tests\Bookstore\Book.Title', 'Propel\Tests\Bookstore\Book.ISBN', 'Propel\Tests\Bookstore\Book.Price', 'Propel\Tests\Bookstore\Book.PublisherId', 'Propel\Tests\Bookstore\Book.AuthorId'), array_keys($book), 'select(\'*\') returns all the columns from the main object, in complete form'); } - - public function testSelectArrayFind() { BookstoreDataPopulator::depopulate($this->con); diff --git a/tests/Propel/Tests/Runtime/Query/ModelCriteriaTest.php b/tests/Propel/Tests/Runtime/Query/ModelCriteriaTest.php index ce7277de46..c25eaadd90 100644 --- a/tests/Propel/Tests/Runtime/Query/ModelCriteriaTest.php +++ b/tests/Propel/Tests/Runtime/Query/ModelCriteriaTest.php @@ -813,9 +813,6 @@ public function testOffset() $this->assertCriteriaTranslation($c, $sql, $params, 'offset() adds an OFFSET clause'); } - - - public function testAddJoin() { $c = new ModelCriteria('bookstore', 'Propel\Tests\Bookstore\Book'); diff --git a/tests/Propel/Tests/Runtime/Util/PropelConditionalProxyTest.php b/tests/Propel/Tests/Runtime/Util/PropelConditionalProxyTest.php index c28bf50c7d..5d7e45b537 100644 --- a/tests/Propel/Tests/Runtime/Util/PropelConditionalProxyTest.php +++ b/tests/Propel/Tests/Runtime/Util/PropelConditionalProxyTest.php @@ -36,7 +36,6 @@ public function testFluidInterface() $this->assertEquals($p->_else(), $p, '_else returns fluid interface'); - $criteria = new ProxyTestCriteria(); $p = new TestPropelConditionalProxy($criteria, true); diff --git a/tests/Propel/Tests/Runtime/Util/PropelDateTimeTest.php b/tests/Propel/Tests/Runtime/Util/PropelDateTimeTest.php index 48f3f7f206..4420616fac 100644 --- a/tests/Propel/Tests/Runtime/Util/PropelDateTimeTest.php +++ b/tests/Propel/Tests/Runtime/Util/PropelDateTimeTest.php @@ -32,7 +32,6 @@ protected function assertDatesIdentical(DateTime $dt1, DateTime $dt2, $msg = "Ex $this->assertEquals($dt1->format('Y-m-d H:i:s'), $dt1->format('Y-m-d H:i:s'), sprintf($msg, "Dates w/ no timezone resolution were not the same.")); $this->assertEquals($dt1->getTimeZone()->getName(), $dt2->getTimeZone()->getName(), sprintf($msg, "timezones were not the same.")); - // We do this last, because a PHP bug will make this true while the dates // may not truly be equal. // See: http://bugs.php.net/bug.php?id=40743 diff --git a/tools/generator/pear/BuildPropelGenPEARPackageTask.php b/tools/generator/pear/BuildPropelGenPEARPackageTask.php index daabae4bfe..a30b94eb21 100644 --- a/tools/generator/pear/BuildPropelGenPEARPackageTask.php +++ b/tools/generator/pear/BuildPropelGenPEARPackageTask.php @@ -108,7 +108,7 @@ private function setOptions($pkg) /** * Main entry point. - * @return void + * @return void */ public function main() { @@ -187,7 +187,7 @@ public function main() /** * Used by the PEAR_PackageFileManager_PhingFileSet lister. - * @return array FileSet[] + * @return array FileSet[] */ public function getFileSets() { @@ -201,18 +201,19 @@ public function getFileSets() /** * Nested creator, creates a FileSet for this task * - * @return FileSet The created fileset object + * @return FileSet The created fileset object */ - function createFileSet() + public function createFileSet() { $num = array_push($this->filesets, new FileSet()); + return $this->filesets[$num-1]; } /** * Set the version we are building. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setVersion($v) { @@ -221,8 +222,8 @@ public function setVersion($v) /** * Set the state we are building. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setState($v) { @@ -231,8 +232,8 @@ public function setState($v) /** * Sets release notes field. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setNotes($v) { @@ -240,8 +241,8 @@ public function setNotes($v) } /** * Sets "dir" property from XML. - * @param PhingFile $f - * @return void + * @param PhingFile $f + * @return void */ public function setDir(PhingFile $f) { diff --git a/tools/runtime/pear/BuildPropelPEARPackageTask.php b/tools/runtime/pear/BuildPropelPEARPackageTask.php index 6eb2e8b879..a76006d770 100644 --- a/tools/runtime/pear/BuildPropelPEARPackageTask.php +++ b/tools/runtime/pear/BuildPropelPEARPackageTask.php @@ -73,7 +73,7 @@ private function setOptions($pkg) /** * Main entry point. - * @return void + * @return void */ public function main() { @@ -134,7 +134,7 @@ public function main() /** * Used by the PEAR_PackageFileManager_PhingFileSet lister. - * @return array FileSet[] + * @return array FileSet[] */ public function getFileSets() { @@ -148,18 +148,19 @@ public function getFileSets() /** * Nested creator, creates a FileSet for this task * - * @return FileSet The created fileset object + * @return FileSet The created fileset object */ - function createFileSet() + public function createFileSet() { $num = array_push($this->filesets, new FileSet()); + return $this->filesets[$num-1]; } /** * Set the version we are building. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setVersion($v) { @@ -168,8 +169,8 @@ public function setVersion($v) /** * Set the state we are building. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setState($v) { @@ -178,8 +179,8 @@ public function setState($v) /** * Sets release notes field. - * @param string $v - * @return void + * @param string $v + * @return void */ public function setNotes($v) { @@ -187,8 +188,8 @@ public function setNotes($v) } /** * Sets "dir" property from XML. - * @param PhingFile $f - * @return void + * @param PhingFile $f + * @return void */ public function setDir(PhingFile $f) {