Skip to content

Commit

Permalink
Merge branch 'hotfix/4269' into develop
Browse files Browse the repository at this point in the history
Forward port zendframework#4269
  • Loading branch information
weierophinney committed Apr 18, 2013
2 parents 5a1bae6 + 0bf0bfb commit 9ecf517
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 28 deletions.
25 changes: 14 additions & 11 deletions bin/check-cs.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash
cd "$(dirname $(dirname "$0"))"

output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 .)
echo $output
cs=0
if [[ "$output" -ne "" ]];then
cs=2
fi
echo "Coding standards exited with status $cs"
libraryCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./library)
testsCS=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 ./tests)

if [[ "$cs" -eq "2" ]];then
echo "Exiting with status 2 due to CS";
exit 2;
if [[ "$libraryCS" || "$testsCS" ]];
then
echo -en '\E[31m'"$libraryCS
$testsCS\033[1m\033[0m";
printf "\n";
echo -en '\E[31;47m'"\033[1mCoding standards check failed!\033[0m" # Red
printf "\n";
exit 2;
fi

exit 0
echo -en '\E[32m'"\033[1mCoding standards check passed!\033[0m" # Green
printf "\n";

echo $libraryCS$testsCS;
8 changes: 2 additions & 6 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@
error="${basedir}/build/cs-results/check-cs.log"
failonerror="true"
append="true"
>
<arg value="-c" />
<arg value="${basedir}/tests/phpunit.xml.dist" />
<arg value="${basedir}/tests/ZendTest/@{component}" />
</exec>
/>
</sequential>
</macrodef>
</project>
</project>
2 changes: 1 addition & 1 deletion library/Zend/Db/Adapter/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ protected function createDriver($parameters)

/**
* @param Driver\DriverInterface $driver
* @return Platform\PlatformInterface
* @return Platform\PlatformInterface
*/
protected function createPlatform($parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Db/Sql/Platform/Oracle/SelectDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function renderTable($table, $alias = null)
return $table . ' ' . $alias;
}

/**
/**
* @param AdapterInterface $adapter
* @param StatementContainerInterface $statementContainer
*/
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Paginator/Adapter/DbSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function count()
foreach ($joins as $join) {
$select->join($join['name'], $join['on'], array(), $join['type']);
}

$select->columns(array('c' => new Expression('COUNT(1)')));

$statement = $this->sql->prepareStatementForSqlObject($select);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ public function testQuoteValueWithPdoPgsql()
$this->assertEquals('\'value\'', $value);
}

}
}
2 changes: 1 addition & 1 deletion tests/ZendTest/Db/IntegrationTestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ public function endTest(PHPUnit_Framework_Test $test, $time)
}
}
}
}
}
8 changes: 4 additions & 4 deletions tests/ZendTest/Db/Sql/SqlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TableGatewayTest extends \PHPUnit_Framework_TestCase
{

protected $mockAdapter = null;

/**
* Sql object
* @var Sql
Expand Down Expand Up @@ -115,14 +115,14 @@ public function testDelete()
$this->sql->delete('bar');

}

/**
* @covers Zend\Db\Sql\Sql::prepareStatementForSqlObject
*/
public function testPrepareStatementForSqlObject()
{
{
$insert = $this->sql->insert()->columns(array('foo'));
$stmt = $this->sql->prepareStatementForSqlObject($insert);
$stmt = $this->sql->prepareStatementForSqlObject($insert);
$this->assertInstanceOf('Zend\Db\Adapter\Driver\StatementInterface', $stmt);
}
}
2 changes: 1 addition & 1 deletion tests/ZendTest/Db/TestAsset/TrustingSql92Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public function quoteValue($value)
{
return $this->quoteTrustedValue($value);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ public function __construct()
{
}
}

0 comments on commit 9ecf517

Please sign in to comment.