Skip to content

Commit cb3c50a

Browse files
committed
Script rework
1 parent 649d662 commit cb3c50a

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

phpcodesniffer

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
#!/bin/sh
22

3-
cd "$( cd "$( dirname "$0" )" && pwd )"
3+
cd "$( cd "$( dirname "$0" )" && pwd )" || exit 1
4+
DIR="`pwd`"
45

5-
./vendor/bin/phpcs --report-width=100 --tab-width=4 --standard=phpcodesniffer.xml src/ -as
6+
function exit_error
7+
{
8+
echo >&2 "ERROR: $@"
9+
exit 1
10+
}
11+
12+
# Run PHP linter
13+
14+
find . -type f -iname "*.php" -not -path "./vendor/*" -print0 | while IFS= read -r -d $'\0' file; do
15+
php -lf $file > /dev/null
16+
[ $? -eq 0 ] || exit_error "$file needs to be fixed to continue"
17+
done
18+
19+
# Install/update https://github.com/wimg/PHPCompatibility
20+
21+
cd vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/ || exit_error "PHP_CodeSniffer not installed"
22+
if [ -d PHPCompatibility ]; then
23+
cd PHPCompatibility
24+
git pull
25+
else
26+
git clone http://github.com/wimg/PHPCompatibility.git
27+
fi
28+
29+
# Run PHP_CodeSniffer
30+
31+
cd "$DIR"
32+
./vendor/bin/phpcs --report-width=100 --tab-width=4 --standard=phpcodesniffer.xml,PHPCompatibility src/ -as --runtime-set testVersion 5.4
33+
34+
exit 0

src/Stolz/SchemaSpy/ServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
class ServiceProvider extends \Illuminate\Support\ServiceProvider
44
{
5-
65
/**
76
* Indicates if loading of the provider is deferred.
87
*

0 commit comments

Comments
 (0)