diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100644 index b4c7ba2..0000000 --- a/scripts/build.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -BASE_PATH="./scripts" -LINT_PATH="$BASE_PATH/lint.sh" -METRICS_PATH="$BASE_PATH/metrics.sh" -PHPDOX_PATH="$BASE_PATH/phpdox.sh" - -. "$LINT_PATH" "$@" -. "$METRICS_PATH" -. "$PHPDOX_PATH" diff --git a/scripts/doc.sh b/scripts/doc.sh deleted file mode 100644 index f43fcee..0000000 --- a/scripts/doc.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -BASE_PATH="./scripts" -PHPCS_PATH="$BASE_PATH/phpcs.sh" -PHPMD_PATH="$BASE_PATH/phpmd.sh" -PHPUNIT_PATH="$BASE_PATH/phpunit.sh" -PHPLOC_PATH="$BASE_PATH/phploc.sh" -PHPDOX_PATH="$BASE_PATH/phpdox.sh" - -. "$PHPCS_PATH" -. "$PHPMD_PATH" -. "$PHPLOC_PATH" -. "$PHPUNIT_PATH" -. "$PHPDOX_PATH" diff --git a/scripts/infection.sh b/scripts/infection.sh deleted file mode 100644 index 7e3d529..0000000 --- a/scripts/infection.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running infection ..." -infection --coverage=./build/coverage --threads=$(nproc) --configuration=./infection.json diff --git a/scripts/lint.sh b/scripts/lint.sh deleted file mode 100644 index 7b91ef2..0000000 --- a/scripts/lint.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -BASE_PATH="./scripts" -PHPCS_PATH="$BASE_PATH/phpcs.sh" -PHPMD_PATH="$BASE_PATH/phpmd.sh" -PHPCPD_PATH="$BASE_PATH/phpcpd.sh" -PHPMND_PATH="$BASE_PATH/phpmnd.sh" -PHPSTAN_PATH="$BASE_PATH/phpstan.sh" -PHAN_PATH="$BASE_PATH/phan.sh" - -with_phan=1 - -while [ "$1" != "" ]; do - case $1 in - -no-phan ) with_phan=0 - ;; - -h | --help ) usage - exit - ;; - * ) usage - exit 1 - esac - shift -done - -. "$PHPCS_PATH" -. "$PHPMD_PATH" -. "$PHPCPD_PATH" -. "$PHPMND_PATH" -. "$PHPSTAN_PATH" -if [ "$with_phan" = "1" ]; then - . "$PHAN_PATH" -fi diff --git a/scripts/metrics.sh b/scripts/metrics.sh deleted file mode 100644 index 6f05336..0000000 --- a/scripts/metrics.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -BASE_PATH="./scripts" -PHPUNIT_PATH="$BASE_PATH/phpunit.sh" -INFECTION_PATH="$BASE_PATH/infection.sh" -PHPMETRICS_PATH="$BASE_PATH/phpmetrics.sh" -PHPLOC_PATH="$BASE_PATH/phploc.sh" - -. "$PHPUNIT_PATH" -. "$INFECTION_PATH" -. "$PHPMETRICS_PATH" -. "$PHPLOC_PATH" diff --git a/scripts/phan.sh b/scripts/phan.sh deleted file mode 100644 index 833e7ed..0000000 --- a/scripts/phan.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "Running phan..." -# ./build/scripts/php-no-xdebug.sh phan -m text -o ./build/phan/phan.txt -phan -m text -o ./build/phan/phan.txt diff --git a/scripts/php-no-xdebug.sh b/scripts/php-no-xdebug.sh deleted file mode 100644 index 0ccf28d..0000000 --- a/scripts/php-no-xdebug.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -php=$(which php) - -# get the xdebug config -xdebugConfig=$(php -i | grep xdebug | while read line; do echo $line; exit; done) - -# no xdebug? Nothing to do! -if [ "$xdebugConfig" == "" ]; then - $php "$@" - exit -fi - -# get the configfile (which should be the first value) -# so strip off everything after the first space of the xdebug-config -xdebugConfigFile=$(php -i | grep xdebug | while read line; do echo $line; exit; done) - -# test whether we got it right -if [ ! -f "$xdebugConfigFile" ]; then - echo "No XDebug configfile found!" - exit 1 -fi - -# disable xdebug by renaming the relevant .ini file -mv ${xdebugConfigFile}{,.temporarily-disabled} - -# dissect the argument to extract the first one (which should be a script or an application in $PATH) from the rest -index=0 -for arg in $(echo $@ | tr ' ' "\n") -do - if [ "$index" == "0" ]; then - firstArg=$arg - else - restArg="$restArg $arg" - fi - - ((index++)) -done - -# check whether the command to be executed is a local PHP file or something in the $PATH like composer or php-cs-fixer -fullPath="$(which $firstArg)" -if [ "$fullPath" == "" ]; then - # check whether it's a local file - if [ ! -f $firstArg ]; then - echo "Could not find $firstArg. No such file or directory" - exit 1 - else - # just run the commands - $php $@ - fi -else - # run the command with the fullpath followed by the rest of the arguments provided - $php $fullPath $restArg -fi - -# execute the command -$php "$@" - -# re-enable xdebug -mv ${xdebugConfigFile}{.temporarily-disabled,} - -# test whether the conf file is restored correctly -if [ ! -f "$xdebugConfigFile" ]; then - echo "Something went wrong with restoring the configfile for xdebug!" - exit 1 -fi diff --git a/scripts/phpcpd.sh b/scripts/phpcpd.sh deleted file mode 100644 index 0b540fb..0000000 --- a/scripts/phpcpd.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpcpd..." -phpcpd ./src diff --git a/scripts/phpcs.sh b/scripts/phpcs.sh deleted file mode 100644 index a24c9cc..0000000 --- a/scripts/phpcs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpcs..." -phpcs --encoding=utf-8 --report-full=./build/phpcs/phpcs.txt --report-xml=./build/phpcs/phpcs.xml diff --git a/scripts/phpdox.sh b/scripts/phpdox.sh deleted file mode 100644 index a7cb70e..0000000 --- a/scripts/phpdox.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpDox..." -phpdox diff --git a/scripts/phploc.sh b/scripts/phploc.sh deleted file mode 100644 index ca29a64..0000000 --- a/scripts/phploc.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phploc..." -phploc --log-xml="./build/phploc/phploc.xml" -vvv ./src diff --git a/scripts/phpmd.sh b/scripts/phpmd.sh deleted file mode 100644 index 5b33757..0000000 --- a/scripts/phpmd.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -echo "Running phpmd..." -phpmd ./src text ./phpmd-src.xml --reportfile ./build/phpmd/phpmd_src.txt --ignore-violations-on-exit -phpmd ./src xml ./phpmd-src.xml --reportfile ./build/phpmd/phpmd_src.xml --ignore-violations-on-exit -phpmd ./tests text ./phpmd-tests.xml --reportfile ./build/phpmd/phpmd_tests.txt --ignore-violations-on-exit diff --git a/scripts/phpmetrics.sh b/scripts/phpmetrics.sh deleted file mode 100644 index 2637f51..0000000 --- a/scripts/phpmetrics.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpmetrics..." -phpmetrics --report-html=./build/phpmetrics --junit=./build/coverage/phpunit.junit.xml ./src,./tests diff --git a/scripts/phpmnd.sh b/scripts/phpmnd.sh deleted file mode 100644 index 43e1151..0000000 --- a/scripts/phpmnd.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpmnd..." -phpmnd ./src/ --extensions=all --strings --include-numeric-string --allow-array-mapping --xml-output=./build/phpmnd/phpmnd.xml --progress | tee ./build/phpmnd/phpmnd.txt diff --git a/scripts/phpstan.sh b/scripts/phpstan.sh deleted file mode 100644 index d4fe352..0000000 --- a/scripts/phpstan.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "Running phpstan..." -phpstan analyse ./src --level=7 | tee ./build/phpstan/phpstan.txt diff --git a/scripts/phpunit.sh b/scripts/phpunit.sh deleted file mode 100644 index ee58f7a..0000000 --- a/scripts/phpunit.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "Running phpunit..." -# phpunit ./tests --coverage-html=./build/coverage/html --coverage-xml=build/coverage/xml --log-junit=build/coverage/phpunit.junit.xml -phpunit ./tests diff --git a/src/Generator.php b/src/Generator.php index 74793a1..75dcd6c 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -22,8 +22,7 @@ public function __construct() { parent::__construct(); - $this->setFactory('collection', null) - ->setFactory('ri-collection', RiCollectionFactory::class) + $this->setFactory('ri-collection', RiCollectionFactory::class) ->setFactory('ro-collection', RoCollectionFactory::class) ->setFactory('relationship', RelationshipFactory::class) ->setFactory('resource-identifier', ResourceIdentifierFactory::class)