Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Oct 21, 2013
1 parent 2580de6 commit 3959eb8
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 30 deletions.
5 changes: 2 additions & 3 deletions generator/lib/builder/om/PHP5ObjectBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ protected function addArrayMutator(&$script, Column $col)
$script .= "
if (\$this->$cloUnserialized !== \$v) {
\$this->$cloUnserialized = \$v;
\$this->$clo = '| ' . implode(' | ', (array)\$v) . ' |';
\$this->$clo = '| ' . implode(' | ', (array) \$v) . ' |';
\$this->modifiedColumns[] = " . $this->getColumnConstant($col) . ";
}
";
Expand Down Expand Up @@ -2456,8 +2456,7 @@ public function toArray(\$keyType = BasePeer::$defaultKeyType, \$includeLazyLoad
);";
$script .= "
\$virtualColumns = \$this->virtualColumns;
foreach(\$virtualColumns as \$key => \$virtualColumn)
{
foreach (\$virtualColumns as \$key => \$virtualColumn) {
\$result[\$key] = \$virtualColumn;
}
";
Expand Down
2 changes: 1 addition & 1 deletion runtime/lib/collection/PropelObjectCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private function getIdenticalObject(BaseObject $object)
$objectHashCode = $object->hashCode();
}

if($obj->hashCode() === $objectHashCode) {
if ($obj->hashCode() === $objectHashCode) {
return $obj;
}
}
Expand Down
1 change: 1 addition & 0 deletions runtime/lib/map/DatabaseMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public function getTableByPhpName($phpName)
$tmClass = constant($peerClass . '::TM_CLASS');

$this->addTableFromMapClass($tmClass);

return $this->tablesByPhpName[$phpName];
} else {
throw new PropelException("Cannot fetch TableMap for undefined table phpName: " . $phpName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ public function testVersionColumnNameCaseInsensitivity()
// class and one for the version class
$this->assertEquals(2, sizeof($getterMatches[0]));

// there should be two versions of the filter. one for the main query class
// there should be two versions of the filter. one for the main query class
// and one for the version query class
$this->assertEquals(2, sizeof($filterMatches[0]));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function testDeleteCascadeWithAbstractSingleTableInheritance()
$manager->delete();
}

public function testFindPkSimpleWithAbstractSingleTableInheritanceReturnCorrectClass()
public function testFindPkSimpleWithAbstractSingleTableInheritanceReturnCorrectClass()
{
Propel::disableInstancePooling();

Expand Down
2 changes: 1 addition & 1 deletion test/testsuite/generator/model/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public function testIsCrossRefAttribute()
$this->assertFalse($table3->getIsCrossRef());
}

public function testPrefixDoesntAffectPhpName ()
public function testPrefixDoesntAffectPhpName()
{
$xmlToAppData = new XmlToAppData();
$schema = <<<EOF
Expand Down
10 changes: 5 additions & 5 deletions test/testsuite/misc/FieldnameRelatedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function setUp()
/**
* Tests if fieldname type constants are defined
*/
public function testFieldNameTypeConstants ()
public function testFieldNameTypeConstants()
{
$result = defined('BasePeer::TYPE_PHPNAME');
$this->assertTrue($result);
Expand All @@ -52,7 +52,7 @@ public function testFieldNameTypeConstants ()
/**
* Tests the Base[Object]Peer::getFieldNames() method
*/
public function testGetFieldNames ()
public function testGetFieldNames()
{
$types = array(
BasePeer::TYPE_PHPNAME,
Expand Down Expand Up @@ -117,7 +117,7 @@ public function testGetFieldNames ()
/**
* Tests the Base[Object]Peer::translateFieldName() method
*/
public function testTranslateFieldName ()
public function testTranslateFieldName()
{
$types = array(
BasePeer::TYPE_PHPNAME,
Expand Down Expand Up @@ -146,7 +146,7 @@ public function testTranslateFieldName ()
/**
* Tests the BasePeer::getFieldNames() method
*/
public function testGetFieldNamesStatic ()
public function testGetFieldNamesStatic()
{
$types = array(
BasePeer::TYPE_PHPNAME,
Expand Down Expand Up @@ -212,7 +212,7 @@ public function testGetFieldNamesStatic ()
/**
* Tests the BasePeer::translateFieldName() method
*/
public function testTranslateFieldNameStatic ()
public function testTranslateFieldNameStatic()
{
$types = array(
BasePeer::TYPE_PHPNAME,
Expand Down
2 changes: 1 addition & 1 deletion test/testsuite/runtime/adapter/DBMSSQLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class DBMSSQLTest extends DBAdapterTestAbstract
{
public function testSelectJoinOrderAlias ()
public function testSelectJoinOrderAlias()
{
$adapter = new DBMSSQL();
$sql = 'SELECT Field, Related.Field AS [RelatedField] FROM Record LEFT JOIN Related ON Record.RelatedID = Related.ID ORDER BY [RelatedField] ASC';
Expand Down
11 changes: 4 additions & 7 deletions test/testsuite/runtime/connection/PropelPDOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ public function testDebugExecutedQueryStringValue()
$prepStmt->execute(array(':p1' => '%Harry%'));
$this->assertEquals($expectedQuery, $con->getLastExecutedQuery(), 'DebugPDO failed to quote prepared statement on execute properly');


// statement with named placeholder, this one won't get substituted
$expectedNotSubstitutedQuery = "SELECT book.id FROM `book` WHERE book.title LIKE :name";
$prepStmt = $con->prepare($expectedNotSubstitutedQuery);
Expand Down Expand Up @@ -528,8 +527,8 @@ public function testDebugExecutedQueryStringValue()
/**
* Testing if integer values will be quoted correctly by DebugPDOStatement::getExecutedQueryString
*/
public function testDebugExecutedQueryIntegerValue() {

public function testDebugExecutedQueryIntegerValue()
{
/**
* @var DebugPDO $con
*/
Expand Down Expand Up @@ -558,7 +557,6 @@ public function testDebugExecutedQueryIntegerValue() {
$prepStmt->execute(array(':p1' => 123));
$this->assertEquals($expectedQuery, $con->getLastExecutedQuery(), 'DebugPDO failed to quote prepared statement on execute properly');


// statement with named placeholder, this one won't get substituted
$expectedNotSubstitutedQuery = "SELECT book.title FROM `book` WHERE book.id = :name";
$prepStmt = $con->prepare($expectedNotSubstitutedQuery);
Expand Down Expand Up @@ -595,8 +593,8 @@ public function testDebugExecutedQueryIntegerValue() {
* Testing if numeric values will be quoted correctly by DebugPDOStatement::getExecutedQueryString
* Numeric values sometimes will get handled differently, since there are numeric values which are non-integer
*/
public function testDebugExecutedQueryNumericValue() {

public function testDebugExecutedQueryNumericValue()
{
/**
* @var DebugPDO $con
*/
Expand Down Expand Up @@ -625,7 +623,6 @@ public function testDebugExecutedQueryNumericValue() {
$prepStmt->execute(array(':p1' => 0002000));
$this->assertEquals($expectedQuery, $con->getLastExecutedQuery(), 'DebugPDO failed to quote prepared statement on execute properly');


// statement with named placeholder, this one won't get substituted
$expectedNotSubstitutedQuery = "SELECT book.title FROM `book` WHERE book.id = :name";
$prepStmt = $con->prepare($expectedNotSubstitutedQuery);
Expand Down
18 changes: 9 additions & 9 deletions test/testsuite/runtime/query/CriteriaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ public function testAddRaw()
$this->assertEquals($expected, $params);
}

public function testJoinObject ()
public function testJoinObject()
{
$j = new Join('TABLE_A.COL_1', 'TABLE_B.COL_2');
$this->assertEquals('INNER JOIN', $j->getJoinType());
Expand Down Expand Up @@ -559,7 +559,7 @@ public function testJoinObject ()
$this->assertEquals('TABLE_B.COL_2', $j->getRightColumn(1));
}

public function testAddStraightJoin ()
public function testAddStraightJoin()
{
$c = new Criteria();
$c->addSelectColumn("*");
Expand All @@ -576,7 +576,7 @@ public function testAddStraightJoin ()
$this->assertEquals($expect, $result);
}

public function testAddSeveralJoins ()
public function testAddSeveralJoins()
{
$c = new Criteria();
$c->addSelectColumn("*");
Expand All @@ -595,7 +595,7 @@ public function testAddSeveralJoins ()
$this->assertEquals($expect, $result);
}

public function testAddLeftJoin ()
public function testAddLeftJoin()
{
$c = new Criteria();
$c->addSelectColumn("TABLE_A.*");
Expand All @@ -613,7 +613,7 @@ public function testAddLeftJoin ()
$this->assertEquals($expect, $result);
}

public function testAddSeveralLeftJoins ()
public function testAddSeveralLeftJoins()
{
// Fails.. Suspect answer in the chunk starting at BasePeer:605
$c = new Criteria();
Expand All @@ -634,7 +634,7 @@ public function testAddSeveralLeftJoins ()
$this->assertEquals($expect, $result);
}

public function testAddRightJoin ()
public function testAddRightJoin()
{
$c = new Criteria();
$c->addSelectColumn("*");
Expand All @@ -651,7 +651,7 @@ public function testAddRightJoin ()
$this->assertEquals($expect, $result);
}

public function testAddSeveralRightJoins ()
public function testAddSeveralRightJoins()
{
// Fails.. Suspect answer in the chunk starting at BasePeer:605
$c = new Criteria();
Expand All @@ -672,7 +672,7 @@ public function testAddSeveralRightJoins ()
$this->assertEquals($expect, $result);
}

public function testAddInnerJoin ()
public function testAddInnerJoin()
{
$c = new Criteria();
$c->addSelectColumn("*");
Expand All @@ -689,7 +689,7 @@ public function testAddInnerJoin ()
$this->assertEquals($expect, $result);
}

public function testAddSeveralInnerJoin ()
public function testAddSeveralInnerJoin()
{
$c = new Criteria();
$c->addSelectColumn("*");
Expand Down
2 changes: 1 addition & 1 deletion test/tools/helpers/bookstore/validator/ISBNValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ISBNValidator implements BasicValidator
/**
* Whether the passed string matches regular expression.
*/
public function isValid (ValidatorMap $map, $str)
public function isValid(ValidatorMap $map, $str)
{
return !(preg_match(self::NOT_ISBN_REGEXP, $str));
}
Expand Down

0 comments on commit 3959eb8

Please sign in to comment.