Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Hotfix: cs fixer check #4269

Closed
wants to merge 3 commits into from

2 participants

@Ocramius
Collaborator

This PR fixes the CS fixer script, which was horribly borked because of wrong return values.

@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney [#4269] CS fixes
- EOF marker
0bf0bfb
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney [#4269] CS fixes
- EOF marker
82364d6
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4269'
Close #4269
8fc7f04
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/4269' into develop
Forward port #4269
77f9200
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-servicemanager
@weierophinney weierophinney Merge pull request zendframework/zf2#4269 from Ocramius/hotfix/cs-fix…
…er-check

Hotfix: cs fixer check
3d3aee3
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-servicemanager
@weierophinney weierophinney Merge branch 'hotfix/4269' acfe55c
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-servicemanager
@weierophinney weierophinney Merge branch 'hotfix/4269' into develop d9b366d
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-paginator
@weierophinney weierophinney Merge pull request zendframework/zf2#4269 from Ocramius/hotfix/cs-fix…
…er-check

Hotfix: cs fixer check
142581e
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-paginator
@weierophinney weierophinney Merge branch 'hotfix/4269' d05ccf2
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-paginator
@weierophinney weierophinney Merge branch 'hotfix/4269' into develop e4204b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
25 bin/check-cs.sh
@@ -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;
View
6 build.xml
@@ -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>
View
2  library/Zend/Db/Adapter/Adapter.php
@@ -309,7 +309,7 @@ protected function createDriver($parameters)
/**
* @param Driver\DriverInterface $driver
- * @return Platform\PlatformInterface
+ * @return Platform\PlatformInterface
*/
protected function createPlatform($parameters)
{
View
2  library/Zend/Db/Sql/Platform/Oracle/SelectDecorator.php
@@ -42,7 +42,7 @@ protected function renderTable($table, $alias = null)
return $table . ' ' . $alias;
}
- /**
+ /**
* @param AdapterInterface $adapter
* @param StatementContainerInterface $statementContainer
*/
View
2  library/Zend/Paginator/Adapter/DbSelect.php
@@ -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);
View
2  tests/ZendTest/Db/Adapter/Platform/PostgresqlIntegrationTest.php
@@ -44,4 +44,4 @@ public function testQuoteValueWithPdoPgsql()
$this->assertEquals('\'value\'', $value);
}
-}
+}
View
2  tests/ZendTest/Db/IntegrationTestListener.php
@@ -139,4 +139,4 @@ public function endTest(PHPUnit_Framework_Test $test, $time)
}
}
}
-}
+}
View
8 tests/ZendTest/Db/Sql/SqlTest.php
@@ -16,7 +16,7 @@ class TableGatewayTest extends \PHPUnit_Framework_TestCase
{
protected $mockAdapter = null;
-
+
/**
* Sql object
* @var Sql
@@ -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);
}
}
View
2  tests/ZendTest/Db/TestAsset/TrustingSql92Platform.php
@@ -10,4 +10,4 @@ public function quoteValue($value)
{
return $this->quoteTrustedValue($value);
}
-}
+}
View
1  tests/ZendTest/ServiceManager/TestAsset/GlobIteratorService.php
@@ -16,4 +16,3 @@ public function __construct()
{
}
}
-
Something went wrong with that request. Please try again.