Skip to content

Commit

Permalink
Fix: api docs (#50)
Browse files Browse the repository at this point in the history
* Fix: api docs

* Fix: docs composer script

* Remove: phpdoc config file
  • Loading branch information
jordanbrauer authored Nov 12, 2017
1 parent e4ea6fe commit 728d698
Show file tree
Hide file tree
Showing 559 changed files with 43,053 additions and 33,401 deletions.
5 changes: 5 additions & 0 deletions apigen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
visibilityLevels: [public, protected]
annotationGroups: [todo, deprecated, note]
title: "Unit Converter API"
overwrite: true
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
}
],
"scripts": {
"docs": "./dev/docs.sh && phpdoc --config=./phpdoc.xml",
"docs": "./dev/docs.sh",
"test": "phpunit --configuration=./phpunit.xml --testsuite=fullspec --color=always",
"unit": "phpunit --configuration=./phpunit.xml --testsuite=unit --color=always",
"integration": "phpunit --configuration=./phpunit.xml --testsuite=integration --color=always"
},
"require": {},
"require-dev": {
"phpdocumentor/phpdocumentor": "^2.9",
"apigen/apigen": "dev-master",
"phpunit/phpunit": "^6.3",
"roave/better-reflection": "dev-master#c87d856",
"symfony/var-dumper": "^3.3"
},
"autoload": {
Expand Down
13 changes: 5 additions & 8 deletions dev/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
#
# $ chmod u+x ./dev/docs.sh

DIRECTORY=./docs
SOURCE=./src
DESTINATION=./docs

if [ -d $DIRECTORY ];
if [ -d $DESTINATION ];
then
printf "Deleting old generated documentation .. "

rm -r $DIRECTORY/*

rm -r $DESTINATION/*
echo "OK"

exit
fi

echo "No stale documentation to remove"

php -d memory_limit=-1 -f ./vendor/bin/apigen generate $SOURCE --destination $DESTINATION
exit
5 changes: 5 additions & 0 deletions docs/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
<FilesMatch \.php\.txt$>
RemoveHandler .php
ForceType text/plain
</FilesMatch>
Loading

0 comments on commit 728d698

Please sign in to comment.