forked from zendframework/zendframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/4269' into develop
Forward port zendframework#4269
- Loading branch information
Showing
10 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,4 @@ public function testQuoteValueWithPdoPgsql() | |
$this->assertEquals('\'value\'', $value); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,4 +139,4 @@ public function endTest(PHPUnit_Framework_Test $test, $time) | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ public function quoteValue($value) | |
{ | ||
return $this->quoteTrustedValue($value); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,3 @@ public function __construct() | |
{ | ||
} | ||
} | ||
|