Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions bin/php-code-validator
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash
CALLER_DIR=$(pwd)
cd $(dirname $0)
BIN_DIR=$(pwd)
cd ${CALLER_DIR}

if [[ -z "$COMPOSER_RUNTIME_BIN_DIR" ]]; then
BIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
else
BIN_DIR="$COMPOSER_RUNTIME_BIN_DIR"
fi

# used within project
if [ -f ${BIN_DIR}/phpcs ]; then
Expand Down