diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7ea169f..d8fd52e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,38 +1,21 @@ -# Composer stores all downloaded packages in the vendor/ directory. -# Do not use the following if the vendor/ directory is commited to -# your git repository. -cache: - paths: - - vendor/ - -services: - - redis:latest - test:7: + stage: test before_script: - - bash build/docker_install.sh > /dev/null + - sh build/docker_install.sh > /dev/null + - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev - image: php:7 + - php composer.phar install --ignore-platform-reqs + image: php:7-alpine script: - - phpunit -c build --coverage-text --colors=never - -test:7.1: - before_script: - - bash build/docker_install.sh > /dev/null - - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev - image: php:7.1 - script: - - phpunit -c build --coverage-text --colors=never + - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never -test:hhvm: - allow_failure: true +test:7.1: + stage: test before_script: - - /usr/local/bin/composer self-update - - curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar - - chmod +x /usr/local/bin/phpunit - - composer install --no-dev --ignore-platform-reqs - image: 51systems/docker-gitlab-ci-runner-hhvm + - sh build/docker_install.sh > /dev/null + - apk add --no-cache php7.1-phpdbg + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --ignore-platform-reqs + image: php:7.1-alpine script: - - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file + - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never diff --git a/.travis.yml b/.travis.yml index bcf84dd4..780abbcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,7 @@ php: script: - mkdir -p build/logs - - vendor/bin/phpunit -c build - -services: - - redis + - phpdbg -qrr -- vendor/bin/phpunit -c build after_script: - CODECLIMATE_REPO_TOKEN=2cbddcebcb9256b3402867282e119dbe61de0b31039325356af3c7d72ed6d058 vendor/bin/test-reporter diff --git a/README.md b/README.md index e89578bd..feec4ef7 100644 --- a/README.md +++ b/README.md @@ -58,40 +58,6 @@ or ### Server Setup -#### Caching - -Update `app/config/cache.toml` based on the instructions [here](https://git.timshomepage.net/timw4mail/banker/blob/master/README.md). - - -#### nginx -Basic nginx setup - -```nginx -server { - location / { - try_files $uri $uri/ /index.php$uri?$args; - } - - location ~ ^(.+\.php)($|/) { - fastcgi_split_path_info ^(.+\.php)(.*)$; - fastcgi_index index.php; - } - - location ^~ /vendor { - deny all; - } -} -``` - -#### Apache -Make sure to have `mod_rewrite` and `AllowOverride All` enabled in order to take -advantage of the included `.htaccess` file. If you don't wish to use an `.htaccess` file, -include the contents of the `.htaccess` file in your Apache configuration. - -#### Anime Collection Additional Installation -* Run `php /vendor/bin/phinx migrate -e development` to create the database tables -* For importing anime: - 1. Login - 2. Use the form to select your media - 3. Save & Repeat as needed +See the [wiki](https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient/wikis/home) +for more in-depth information diff --git a/RoboFile.php b/RoboFile.php index d54b3eae..e4c3b729 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -1,4 +1,7 @@ -taskPhpUnit() - ->configFile('build/phpunit.xml') - ->printed(true) - ->run(); + $this->_run(['vendor/bin/phpunit -c build']); } /** @@ -114,9 +114,7 @@ class RoboFile extends \Robo\Tasks { public function docs() { $cmd_parts = [ - 'cd build', - '../vendor/bin/phpdox', - 'cd ..' + 'phpdox', ]; $this->_run($cmd_parts, ' && '); } @@ -128,7 +126,7 @@ class RoboFile extends \Robo\Tasks { { $files = $this->getAllSourceFiles(); - $chunks = array_chunk($files, 6); + $chunks = array_chunk($files, 12); foreach($chunks as $chunk) { @@ -136,29 +134,6 @@ class RoboFile extends \Robo\Tasks { } } - - /** - * Run mutation tests with humbug - * - * @param bool $stats - if true, generates stats rather than running mutation tests - */ - public function mutate($stats = FALSE) - { - $test_parts = [ - 'vendor/bin/humbug' - ]; - - $stat_parts = [ - 'vendor/bin/humbug', - '--skip-killed=yes', - '-v', - './build/humbug.json' - ]; - - $cmd_parts = ($stats) ? $stat_parts : $test_parts; - $this->_run($cmd_parts); - } - /** * Run the phpcs tool * @@ -226,10 +201,8 @@ class RoboFile extends \Robo\Tasks { public function test() { $this->lint(); - $this->taskPHPUnit() - ->configFile('phpunit.xml') - ->printed(true) - ->run(); + + $this->_run(['phpunit']); } /** @@ -275,7 +248,9 @@ class RoboFile extends \Robo\Tasks { $files = array_merge( glob_recursive('build/*.php'), glob_recursive('src/*.php'), + glob_recursive('src/**/*.php'), glob_recursive('tests/*.php'), + glob_recursive('tests/**/*.php'), glob('*.php') ); diff --git a/app/appConf/base_config.php b/app/appConf/base_config.php index 8f7a13c2..710e9ad8 100644 --- a/app/appConf/base_config.php +++ b/app/appConf/base_config.php @@ -1,19 +1,20 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + // ---------------------------------------------------------------------------- // Lower level configuration // diff --git a/app/appConf/menus.php b/app/appConf/menus.php index 6e349eba..9b520b9e 100644 --- a/app/appConf/menus.php +++ b/app/appConf/menus.php @@ -1,19 +1,20 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + return [ 'anime_list' => [ 'route_prefix' => '/anime', diff --git a/app/appConf/minify_config.php b/app/appConf/minify_config.php index aa1073f0..22898a06 100644 --- a/app/appConf/minify_config.php +++ b/app/appConf/minify_config.php @@ -1,16 +1,16 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ diff --git a/app/appConf/minify_css_groups.php b/app/appConf/minify_css_groups.php index 1242b592..e0272ef5 100644 --- a/app/appConf/minify_css_groups.php +++ b/app/appConf/minify_css_groups.php @@ -1,19 +1,20 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + // -------------------------------------------------------------------------- /** diff --git a/app/appConf/minify_js_groups.php b/app/appConf/minify_js_groups.php index c50086d8..12d910ea 100644 --- a/app/appConf/minify_js_groups.php +++ b/app/appConf/minify_js_groups.php @@ -1,19 +1,20 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + // -------------------------------------------------------------------------- /** diff --git a/app/appConf/routes.php b/app/appConf/routes.php index 4ead95bf..22f2e66e 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -1,19 +1,20 @@ - - * @copyright 2015 - 2016 Timothy J. Warren + * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 3.1 + * @version 4.0 * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + use const Aviat\AnimeClient\{ DEFAULT_CONTROLLER_METHOD, DEFAULT_CONTROLLER_NAMESPACE @@ -53,7 +54,7 @@ return [ // --------------------------------------------------------------------- 'anime.add.get' => [ 'path' => '/anime/add', - 'action' => 'add_form', + 'action' => 'addForm', 'verb' => 'get', ], 'anime.add.post' => [ @@ -82,7 +83,7 @@ return [ ], 'manga.add.get' => [ 'path' => '/manga/add', - 'action' => 'add_form', + 'action' => 'addForm', 'verb' => 'get', ], 'manga.add.post' => [ @@ -183,7 +184,7 @@ return [ ], 'update.post' => [ 'path' => '/{controller}/update_form', - 'action' => 'form_update', + 'action' => 'formUpdate', 'verb' => 'post', 'tokens' => [ 'controller' => '[a-z_]+', diff --git a/app/bootstrap.php b/app/bootstrap.php index 599a275b..860e1b48 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -1,12 +1,12 @@ * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License diff --git a/app/config/config.toml.example b/app/config/config.toml.example index 4fe4b5d5..52e0f8ec 100644 --- a/app/config/config.toml.example +++ b/app/config/config.toml.example @@ -11,14 +11,8 @@ whose_list = "Tim" # do you wish to show the anime collection? show_anime_collection = true -# do you wish to show the manga collection? -show_manga_collection = false - # do you have a My Anime List account set up in mal.toml? use_mal_api = false -# cache driver for api calls (NullDriver, SQLDriver, RedisDriver) -cache_driver = "NullDriver" - # path to public directory on the server asset_dir = "/../../public" \ No newline at end of file diff --git a/app/config/database.toml.example b/app/config/database.toml.example index 18b1ecc9..d80fcf05 100644 --- a/app/config/database.toml.example +++ b/app/config/database.toml.example @@ -8,16 +8,5 @@ host = "" user = "" pass = "" port = "" -name = "default" database = "" file = "anime_collection.sqlite" - -[cache] -type = "sqlite" -host = "" -user = "" -pass = "" -port = "" -name = "default" -database = "" -file = "anime_collection.sqlite" \ No newline at end of file diff --git a/app/views/anime/add.php b/app/views/anime/add.php index fac82700..1c039547 100644 --- a/app/views/anime/add.php +++ b/app/views/anime/add.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Add Anime to your List

@@ -36,5 +36,5 @@
- + \ No newline at end of file diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index bd5d4bc2..4c539a11 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -10,9 +10,9 @@

html($name) ?>

- is_authenticated()) continue; ?> + isAuthenticated()) continue; ?>
- is_authenticated()): ?> + isAuthenticated()): ?> @@ -25,10 +25,16 @@
- is_authenticated()): ?> + isAuthenticated()): ?>
- ">Edit + Edit
@@ -55,10 +61,10 @@ @@ -85,6 +91,6 @@
-is_authenticated()): ?> - +isAuthenticated()): ?> + \ No newline at end of file diff --git a/app/views/anime/details.php b/app/views/anime/details.php index 6aa91b08..9d14e390 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -1,7 +1,7 @@
- +

@@ -54,21 +54,21 @@ - + - - + + diff --git a/app/views/anime/edit.php b/app/views/anime/edit.php index 75cc7578..3e70adb9 100644 --- a/app/views/anime/edit.php +++ b/app/views/anime/edit.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Edit Anime List Item

@@ -107,5 +107,5 @@
- + \ No newline at end of file diff --git a/app/views/anime/list.php b/app/views/anime/list.php index ebb473e3..a9ff92b6 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -10,7 +10,7 @@
- - - -    + + + +    - -    + +   
- is_authenticated()): ?> + isAuthenticated()): ?> @@ -26,9 +26,9 @@ - is_authenticated()) continue; ?> + isAuthenticated()) continue; ?> - is_authenticated()): ?> + isAuthenticated()): ?> @@ -64,11 +64,11 @@ @@ -86,5 +86,5 @@ -is_authenticated()) ? 'table_edit' : 'table' ?> - \ No newline at end of file +isAuthenticated()) ? 'table_edit' : 'table' ?> + \ No newline at end of file diff --git a/app/views/collection/add.php b/app/views/collection/add.php index 61c3a7e1..9970cf26 100644 --- a/app/views/collection/add.php +++ b/app/views/collection/add.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Add Anime to your Collection

@@ -39,5 +39,5 @@
  Title
">Edit - - + + - +
- + \ No newline at end of file diff --git a/app/views/collection/cover.php b/app/views/collection/cover.php index 919b2d54..996d246a 100644 --- a/app/views/collection/cover.php +++ b/app/views/collection/cover.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -19,7 +19,7 @@
- is_authenticated()): ?> + isAuthenticated()): ?>
">Edit ">Delete */ ?> diff --git a/app/views/collection/edit.php b/app/views/collection/edit.php index 0d1add75..ab0f4a53 100644 --- a/app/views/collection/edit.php +++ b/app/views/collection/edit.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Edit Anime Collection Item

@@ -62,5 +62,5 @@
- + \ No newline at end of file diff --git a/app/views/collection/list.php b/app/views/collection/list.php index 61840d5f..0bb4daee 100644 --- a/app/views/collection/list.php +++ b/app/views/collection/list.php @@ -1,6 +1,6 @@
-is_authenticated()): ?> -Add Item +isAuthenticated()): ?> +Add Item

There's nothing here!

@@ -10,7 +10,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?> @@ -24,10 +24,10 @@ - is_authenticated()): ?> + isAuthenticated()): ?>
Actions Title
- ">Edit - full_url("collection/delete/{$item['hummingbird_id']}") ?>">Delete*/ ?> + ">Edit + fullUrl("collection/delete/{$item['hummingbird_id']}") ?>">Delete*/ ?> @@ -49,4 +49,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/footer.php b/app/views/footer.php index ca4c3ba4..eee70095 100644 --- a/app/views/footer.php +++ b/app/views/footer.php @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/app/views/header.php b/app/views/header.php index e4196144..f4b29528 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,15 +6,18 @@ - - - + + +
\ No newline at end of file diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 3e0111ca..dc5d86a5 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -2,22 +2,22 @@

- + get('whose_list') ?>'s List get("show_{$url_type}_collection")): ?> [ Collection] - [ List] + [ List] get('whose_list') ?>'s Collection - [Anime List] - [Manga List] + [Anime List] + [Manga List] - is_authenticated()): ?> + isAuthenticated()): ?>   @@ -25,7 +25,7 @@   - is_authenticated()): ?> + isAuthenticated()): ?> Logout [get('whose_list') ?>'s Login] @@ -33,12 +33,12 @@

diff --git a/app/views/manga/add.php b/app/views/manga/add.php index d0a3efd3..f0e32f3e 100644 --- a/app/views/manga/add.php +++ b/app/views/manga/add.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Add Manga to your List

@@ -36,5 +36,5 @@
- + \ No newline at end of file diff --git a/app/views/manga/cover.php b/app/views/manga/cover.php index 496aa564..7f9ebdbd 100644 --- a/app/views/manga/cover.php +++ b/app/views/manga/cover.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -11,7 +11,7 @@
- is_authenticated()): ?> + isAuthenticated()): ?> @@ -26,7 +26,7 @@
- is_authenticated()): ?> + isAuthenticated()): ?>
">Edit @@ -55,6 +55,6 @@
-is_authenticated()): ?> - +isAuthenticated()): ?> + \ No newline at end of file diff --git a/app/views/manga/edit.php b/app/views/manga/edit.php index a1eef3c4..e74a1331 100644 --- a/app/views/manga/edit.php +++ b/app/views/manga/edit.php @@ -1,4 +1,4 @@ -is_authenticated()): ?> +isAuthenticated()): ?>

Edit diff --git a/app/views/manga/list.php b/app/views/manga/list.php index 7a44d851..1c28fdcb 100644 --- a/app/views/manga/list.php +++ b/app/views/manga/list.php @@ -1,7 +1,7 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item - +

There's nothing here!

@@ -10,7 +10,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?> @@ -23,7 +23,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?> @@ -47,4 +47,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/build/CodeIgniter/Sniffs/WhiteSpace/LogicalNotSpacingSniff.php b/build/CodeIgniter/Sniffs/WhiteSpace/LogicalNotSpacingSniff.php index 2e242e4d..f94774cd 100755 --- a/build/CodeIgniter/Sniffs/WhiteSpace/LogicalNotSpacingSniff.php +++ b/build/CodeIgniter/Sniffs/WhiteSpace/LogicalNotSpacingSniff.php @@ -65,7 +65,7 @@ class LogicalNotSpacingSniff implements Sniff $next_token = $tokens[$stackPtr + 1]; if (T_WHITESPACE !== $previous_token['code'] || T_WHITESPACE !== $next_token['code']) { $error = 'Logical operator ! should always be preceded and followed with a whitespace.'; - $phpcsFile->addError($error, $stackPtr); + $phpcsFile->addError($error, $stackPtr, 'badNot'); } }//end process() diff --git a/build/docker_install.sh b/build/docker_install.sh index e8785741..8599377c 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -3,27 +3,10 @@ # We need to install dependencies only for Docker [[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0 -# Where am I? -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - set -xe # Install git (the php image doesn't have it) which is required by composer -apt-get update -yqq -apt-get install \ - git \ - libxslt1-dev \ - libxslt1.1 \ - zlib1g-dev \ - unzip \ - -yqq - -# Install phpunit, the tool that we will use for testing -curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar -chmod +x /usr/local/bin/phpunit - -# Install extensions -pecl install xdebug -echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini -docker-php-ext-install xsl -docker-php-ext-install zip \ No newline at end of file +echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories +apk upgrade --update && apk add --no-cache \ + curl \ + git \ No newline at end of file diff --git a/build/header_comment.txt b/build/header_comment.txt index 91b15c5d..b074261d 100644 --- a/build/header_comment.txt +++ b/build/header_comment.txt @@ -1,11 +1,11 @@ /** - * Anime List Client + * Hummingbird Anime List Client * * An API client for Kitsu and MyAnimeList to manage anime and manga watch lists * * PHP version 7 * - * @package AnimeListClient + * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License diff --git a/build/update_header_comments.php b/build/update_header_comments.php index 1f6cdaa2..18562f53 100644 --- a/build/update_header_comments.php +++ b/build/update_header_comments.php @@ -5,7 +5,9 @@ $file_patterns = [ 'app/bootstrap.php', 'migrations/*.php', 'src/**/*.php', + 'src/*.php', 'tests/**/*.php', + 'tests/*.php' ]; if ( ! function_exists('glob_recursive')) @@ -60,6 +62,7 @@ function get_tokens($source) function replace_files(array $files, $template) { + print_r($files); foreach ($files as $file) { $source = file_get_contents($file); diff --git a/composer.json b/composer.json index 4b91d3b0..0c8adaf8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "timw4mail/hummingbird-anime-client", + "name": "aviat/hummingbird-anime-client", "description": "A self-hosted anime/manga client for Kitsu.", "license":"MIT", "autoload": { @@ -21,7 +21,7 @@ "aura/router": "^3.0", "aura/session": "^2.0", "aviat/banker": "^1.0.0", - "aviat/ion": "1.0.*", + "aviat/ion": "dev-master", "filp/whoops": "^2.1.5", "monolog/monolog": "^1.0", "psr/http-message": "~1.0", @@ -34,18 +34,23 @@ "require-dev": { "pdepend/pdepend": "^2.2", "sebastian/phpcpd": "^3.0", - "theseer/phpdox": "^0.9.0", + "theseer/phpdox": "0.9.0", "phploc/phploc": "^3.0", "phpmd/phpmd": "^2.4", "phpunit/phpunit": "^6.0", - "robmorgan/phinx": "^0.6.4", + "robmorgan/phinx": "~0.6.4", "consolidation/robo": "~1.0", "henrikbjorn/lurker": "^1.1.0", "symfony/var-dumper": "^3.1", - "squizlabs/php_codesniffer": "^3.0.0@beta" + "squizlabs/php_codesniffer": "^3.0.0@beta", + "phpstan/phpstan": "^0.6.4" }, "scripts": { "build:css": "cd public && npm run build && cd ..", - "watch:css": "cd public && npm run watch" + "coverage": "phpdbg -qrr -- vendor/bin/phpunit -c build", + "docs": "vendor/bin/phpdox", + "phpstan": "phpstan analyse src tests", + "watch:css": "cd public && npm run watch", + "test": "vendor/bin/phpunit" } -} \ No newline at end of file +} diff --git a/index.php b/index.php index 14eda8dc..e780cc78 100644 --- a/index.php +++ b/index.php @@ -28,25 +28,14 @@ if ($timezone === '' || $timezone === FALSE) ini_set('date.timezone', 'GMT'); } -/** - * Joins paths together. Variadic to take an - * arbitrary number of arguments - * - * @return string - */ -function _dir() -{ - return implode(DIRECTORY_SEPARATOR, func_get_args()); -} +// Load composer autoloader +require __DIR__ . '/vendor/autoload.php'; // Define base directories $APP_DIR = _dir(__DIR__, 'app'); $APPCONF_DIR = _dir($APP_DIR, 'appConf'); $CONF_DIR = _dir($APP_DIR, 'config'); -// Load composer autoloader -require _dir(__DIR__, 'vendor/autoload.php'); - // ------------------------------------------------------------------------- // Setup error handling // ------------------------------------------------------------------------- diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml index 662d583a..c909515f 100644 --- a/phpdoc.dist.xml +++ b/phpdoc.dist.xml @@ -8,11 +8,11 @@ phpdoc -
  Title
">Edit