From 79153ae43360b3e25ce3bed4ba108d58e15aca21 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 08:55:51 -0500 Subject: [PATCH 01/56] Attempt testing hhvm with a different docker image --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7ea169f..3bdf9763 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,7 @@ test:hhvm: - 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 + #image: 51systems/docker-gitlab-ci-runner-hhvm + image: 2ndkauboy/gitlab-ci-runner-hhvm script: - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file From d1f0ab0c739c9506c6d302b2cccf411cbfc93d46 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:21:08 -0500 Subject: [PATCH 02/56] Attempt to use alpine php image --- .gitlab-ci.yml | 4 ++-- build/docker_install.sh | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bdf9763..7db72120 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ test:7: - bash build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - php composer.phar install --no-dev - image: php:7 + image: php:7-alpine script: - phpunit -c build --coverage-text --colors=never @@ -22,7 +22,7 @@ test:7.1: - bash build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - php composer.phar install --no-dev - image: php:7.1 + image: php:7.1-alpine script: - phpunit -c build --coverage-text --colors=never diff --git a/build/docker_install.sh b/build/docker_install.sh index e8785741..af69587e 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -9,14 +9,13 @@ 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 \ +apk upgrade --update && apk add \ + curl \ git \ libxslt1-dev \ libxslt1.1 \ zlib1g-dev \ - unzip \ - -yqq + unzip # Install phpunit, the tool that we will use for testing curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar From 9e4956664184e1b7554f3ad796e6a5ec0155b329 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:26:49 -0500 Subject: [PATCH 03/56] Maybe stages will help? --- .gitlab-ci.yml | 66 ++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7db72120..8898e40a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,39 +1,43 @@ # 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: - 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-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-alpine - script: - - phpunit -c build --coverage-text --colors=never +stages: + - test -test:hhvm: - allow_failure: true - 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 - image: 2ndkauboy/gitlab-ci-runner-hhvm - script: - - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file +test: + test:7: + stage: test + before_script: + - sh build/docker_install.sh > /dev/null + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --no-dev + image: php:7-alpine + script: + - phpunit -c build --coverage-text --colors=never + + test:7.1: + stage: test + before_script: + - sh build/docker_install.sh > /dev/null + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --no-dev + image: php:7.1-alpine + script: + - phpunit -c build --coverage-text --colors=never + + test:hhvm: + stage: test + allow_failure: true + 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 + image: 2ndkauboy/gitlab-ci-runner-hhvm + script: + - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file From 455adf4b1155db397d629025b7ba817c5eea0237 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:30:27 -0500 Subject: [PATCH 04/56] Maybe this will work better? --- .gitlab-ci.yml | 62 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8898e40a..65415e8b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,36 +8,36 @@ services: stages: - test -test: - test:7: - stage: test - before_script: - - sh build/docker_install.sh > /dev/null - - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev - image: php:7-alpine - script: - - phpunit -c build --coverage-text --colors=never - test:7.1: - stage: test - before_script: - - sh build/docker_install.sh > /dev/null - - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev - image: php:7.1-alpine - script: - - phpunit -c build --coverage-text --colors=never +test:7: + stage: test + before_script: + - sh build/docker_install.sh > /dev/null + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --no-dev + image: php:7-alpine + script: + - phpunit -c build --coverage-text --colors=never - test:hhvm: - stage: test - allow_failure: true - 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 - image: 2ndkauboy/gitlab-ci-runner-hhvm - script: - - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file +test:7.1: + stage: test + before_script: + - sh build/docker_install.sh > /dev/null + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --no-dev + image: php:7.1-alpine + script: + - phpunit -c build --coverage-text --colors=never + +test:hhvm: + stage: test + allow_failure: true + 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 + image: 2ndkauboy/gitlab-ci-runner-hhvm + script: + - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file From 2bdf4be682ff0aaf7de71c8e60e0a0820f192160 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:32:31 -0500 Subject: [PATCH 05/56] Remove unneeded bashism --- build/docker_install.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index af69587e..d205f29d 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -3,9 +3,6 @@ # 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 From 85a6fafd4f4739e6828e470e665552baa512c9fb Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:36:51 -0500 Subject: [PATCH 06/56] Make sure to try to install the correct packages --- .gitlab-ci.yml | 24 ++++++++++++------------ build/docker_install.sh | 6 ++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 65415e8b..87eeedc3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,15 +29,15 @@ test:7.1: script: - phpunit -c build --coverage-text --colors=never -test:hhvm: - stage: test - allow_failure: true - 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 - image: 2ndkauboy/gitlab-ci-runner-hhvm - script: - - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file +#test:hhvm: +# stage: test +# allow_failure: true +# 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 +# image: 2ndkauboy/gitlab-ci-runner-hhvm +# script: +# - hhvm -d hhvm.php7.all=true /usr/local/bin/phpunit -c build --coverage-text --colors=never \ No newline at end of file diff --git a/build/docker_install.sh b/build/docker_install.sh index d205f29d..d44cc683 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -9,10 +9,8 @@ set -xe apk upgrade --update && apk add \ curl \ git \ - libxslt1-dev \ - libxslt1.1 \ - zlib1g-dev \ - unzip + libxslt-dev \ + zlib-dev # Install phpunit, the tool that we will use for testing curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar From 90f1b39db58186f5fa1703e9e5f9ff9fd70d4c79 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:42:20 -0500 Subject: [PATCH 07/56] Try to use xdebug another way --- build/docker_install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index d44cc683..69d31f64 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -11,13 +11,15 @@ apk upgrade --update && apk add \ git \ libxslt-dev \ zlib-dev + +apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ # 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 +#pecl install xdebug +echo "zend_extension=/usr/lib/php7/modules/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 From 6ee319b78c22dd4aa4afff993da35acfb594a15d Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:47:52 -0500 Subject: [PATCH 08/56] xdebug try again --- build/docker_install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 69d31f64..3d1240e2 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -12,7 +12,12 @@ apk upgrade --update && apk add \ libxslt-dev \ zlib-dev -apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ +pecl install xdebug + +echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)\n" >> /usr/local/etc/php/conf.d/xdebug.ini +#echo "xdebug.remote_enable=on\n" >> /usr/local/etc/php/conf.d/xdebug.ini +#echo "xdebug.remote_autostart=off\n" >> /usr/local/etc/php/conf.d/xdebug.ini +#echo "xdebug.remote_port=9000\n" >> /usr/local/etc/php/conf.d/xdebug.ini # Install phpunit, the tool that we will use for testing curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar @@ -20,6 +25,6 @@ chmod +x /usr/local/bin/phpunit # Install extensions #pecl install xdebug -echo "zend_extension=/usr/lib/php7/modules/xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini +#echo "zend_extension=/usr/lib/php7/modules/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 From 9bf362e08e99b0153b928c33fb62addbed63727a Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:50:13 -0500 Subject: [PATCH 09/56] Will xdebug work? --- build/docker_install.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 3d1240e2..37261762 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -12,12 +12,11 @@ apk upgrade --update && apk add \ libxslt-dev \ zlib-dev +# Install xdebug for coverage report +docker-php-source extract pecl install xdebug - -echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)\n" >> /usr/local/etc/php/conf.d/xdebug.ini -#echo "xdebug.remote_enable=on\n" >> /usr/local/etc/php/conf.d/xdebug.ini -#echo "xdebug.remote_autostart=off\n" >> /usr/local/etc/php/conf.d/xdebug.ini -#echo "xdebug.remote_port=9000\n" >> /usr/local/etc/php/conf.d/xdebug.ini +docker-php-ext-enable xdebug +docker-php-source delete # Install phpunit, the tool that we will use for testing curl -Lo /usr/local/bin/phpunit https://phar.phpunit.de/phpunit.phar From da8b34a8672dbd844b09ec12561f27061993af03 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:53:46 -0500 Subject: [PATCH 10/56] Will xdebug work? --- build/docker_install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 37261762..4c17eabb 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -6,7 +6,10 @@ set -xe # Install git (the php image doesn't have it) which is required by composer -apk upgrade --update && apk add \ +apk upgrade --update && apk add --no-cache \ + g++ \ + make \ + autoconf \ curl \ git \ libxslt-dev \ From 79413039874bde9c60a4c45d1a167a129a39b9e5 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 09:57:08 -0500 Subject: [PATCH 11/56] Install xsl because of the stupid dev dependency --- build/docker_install.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 4c17eabb..83344ee0 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -26,7 +26,5 @@ 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=/usr/lib/php7/modules/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 +docker-php-ext-install xsl +docker-php-ext-install zip \ No newline at end of file From 34d0aaa8e549d23774afdfe192c7b834def4d722 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 10:05:06 -0500 Subject: [PATCH 12/56] Ignore stupid xsl requirement --- .gitlab-ci.yml | 4 ++-- build/docker_install.sh | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 87eeedc3..4e6c2ebe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ test:7: before_script: - sh build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev + - php composer.phar install --no-dev --ignore-platform-reqs image: php:7-alpine script: - phpunit -c build --coverage-text --colors=never @@ -24,7 +24,7 @@ test:7.1: before_script: - sh build/docker_install.sh > /dev/null - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --no-dev + - php composer.phar install --no-dev --ignore-platform-reqs image: php:7.1-alpine script: - phpunit -c build --coverage-text --colors=never diff --git a/build/docker_install.sh b/build/docker_install.sh index 83344ee0..abcd62bd 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -15,16 +15,14 @@ apk upgrade --update && apk add --no-cache \ libxslt-dev \ zlib-dev +# 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 # Install xdebug for coverage report docker-php-source extract pecl install xdebug docker-php-ext-enable xdebug docker-php-source delete - -# 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 -docker-php-ext-install xsl docker-php-ext-install zip \ No newline at end of file From acbae86a6b8aa54f243b1ac4a825418a193360ca Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 10:12:18 -0500 Subject: [PATCH 13/56] Slim build config --- .gitlab-ci.yml | 11 ++--------- build/docker_install.sh | 7 +------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e6c2ebe..dc25856f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,3 @@ -# Composer stores all downloaded packages in the vendor/ directory. -# Do not use the following if the vendor/ directory is commited to -# your git repository. - -services: - - redis:latest - stages: - test @@ -17,7 +10,7 @@ test:7: - php composer.phar install --no-dev --ignore-platform-reqs image: php:7-alpine script: - - phpunit -c build --coverage-text --colors=never + - ./vendor/bin/phpunit -c build --coverage-text --colors=never test:7.1: stage: test @@ -27,7 +20,7 @@ test:7.1: - php composer.phar install --no-dev --ignore-platform-reqs image: php:7.1-alpine script: - - phpunit -c build --coverage-text --colors=never + - ./vendor/bin/phpunit -c build --coverage-text --colors=never #test:hhvm: # stage: test diff --git a/build/docker_install.sh b/build/docker_install.sh index abcd62bd..4cd9bd1a 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -12,12 +12,7 @@ apk upgrade --update && apk add --no-cache \ autoconf \ curl \ git \ - libxslt-dev \ zlib-dev - -# 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 # Install xdebug for coverage report @@ -25,4 +20,4 @@ docker-php-source extract pecl install xdebug docker-php-ext-enable xdebug docker-php-source delete -docker-php-ext-install zip \ No newline at end of file +# docker-php-ext-install zip \ No newline at end of file From 3caad13577c590fe1f461608cd529276af718340 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 10:23:07 -0500 Subject: [PATCH 14/56] Try, try again --- .gitlab-ci.yml | 4 ++-- build/docker_install.sh | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dc25856f..f515ebaa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ test:7: - php composer.phar install --no-dev --ignore-platform-reqs image: php:7-alpine script: - - ./vendor/bin/phpunit -c build --coverage-text --colors=never + - phpunit -c build --coverage-text --colors=never test:7.1: stage: test @@ -20,7 +20,7 @@ test:7.1: - php composer.phar install --no-dev --ignore-platform-reqs image: php:7.1-alpine script: - - ./vendor/bin/phpunit -c build --coverage-text --colors=never + - phpunit -c build --coverage-text --colors=never #test:hhvm: # stage: test diff --git a/build/docker_install.sh b/build/docker_install.sh index 4cd9bd1a..58ada2f8 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -11,8 +11,11 @@ apk upgrade --update && apk add --no-cache \ make \ autoconf \ curl \ - git \ - zlib-dev + git + +# 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 # Install xdebug for coverage report @@ -20,4 +23,3 @@ docker-php-source extract pecl install xdebug docker-php-ext-enable xdebug docker-php-source delete -# docker-php-ext-install zip \ No newline at end of file From 941a15c4f44ec1ef115a37f7879f7f8a1731a9bd Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 11:05:03 -0500 Subject: [PATCH 15/56] Add yarn lock file --- public/yarn.lock | 1979 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1979 insertions(+) create mode 100644 public/yarn.lock diff --git a/public/yarn.lock b/public/yarn.lock new file mode 100644 index 00000000..567005de --- /dev/null +++ b/public/yarn.lock @@ -0,0 +1,1979 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + +ansi-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +any-promise@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-0.1.0.tgz#830b680aa7e56f33451d4b049f3bd8044498ee27" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-filter@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec" + +array-map@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-map/-/array-map-0.0.0.tgz#88a2bab73d1cf7bcd5c1b118a003f66f665fa662" + +array-reduce@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +autoprefixer@^6.0.2, autoprefixer@^6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.6.1.tgz#11a4077abb4b313253ec2f6e1adb91ad84253519" + dependencies: + browserslist "~1.5.1" + caniuse-db "^1.0.30000604" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.8" + postcss-value-parser "^3.2.3" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" + +balanced-match@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.2.1.tgz#7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7" + +balanced-match@^0.4.1, balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +balanced-match@~0.1.0, balanced-match@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.1.0.tgz#b504bd05869b39259dd0c5efc35d843176dccc4a" + +bcrypt-pbkdf@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browserslist@^1.0.0, browserslist@^1.0.1, browserslist@~1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.5.1.tgz#67c3f2a1a6ad174cd01d25d2362e6e6083b26986" + dependencies: + caniuse-db "^1.0.30000601" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caniuse-api@^1.3.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.5.2.tgz#8f393c682f661c0a997b77bba6e826483fb3600e" + dependencies: + browserslist "^1.0.1" + caniuse-db "^1.0.30000346" + lodash.memoize "^4.1.0" + lodash.uniq "^4.3.0" + shelljs "^0.7.0" + +caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000601, caniuse-db@^1.0.30000604: + version "1.0.30000604" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000604.tgz#bc139270a777564d19c0aadcd832b491d093bda5" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chokidar@^1.5.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" + +color-convert@^1.3.0: + version "1.8.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.8.2.tgz#be868184d7c8631766d54e7078e2672d7c7e3339" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/color/-/color-0.10.1.tgz#c04188df82a209ddebccecdacd3ec320f193739f" + dependencies: + color-convert "^0.5.3" + color-string "^0.3.0" + +color@^0.11.0, color@^0.11.3, color@^0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +connect-cachify-static@^1.3.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/connect-cachify-static/-/connect-cachify-static-1.4.2.tgz#48b993583fb7d5fb0f7f34197708e1dfd402a19a" + dependencies: + debug "~2" + find "~0" + minimatch "^3.0.0" + on-headers "^1.0.0" + parseurl "~1" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.0.1.tgz#a3bbb302db2297cbea3c04edf36941f4613aa399" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +css-color-function@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/css-color-function/-/css-color-function-1.3.0.tgz#72c767baf978f01b8a8a94f42f17ba5d22a776fc" + dependencies: + balanced-match "0.1.0" + color "^0.11.0" + debug "~0.7.4" + rgb "~0.1.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug@^2.1.2, debug@~2: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + +debug@~0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +define-properties@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + dependencies: + foreach "^2.0.5" + object-keys "^1.0.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +duplexer@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.4.3: + version "1.6.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99" + dependencies: + es-to-primitive "^1.1.1" + function-bind "^1.1.0" + is-callable "^1.1.3" + is-regex "^1.0.3" + +es-to-primitive@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + dependencies: + is-callable "^1.1.1" + is-date-object "^1.0.1" + is-symbol "^1.0.1" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +event-stream@~3.3.0: + version "3.3.4" + resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" + dependencies: + duplexer "~0.1.1" + from "~0" + map-stream "~0.1.0" + pause-stream "0.0.11" + split "0.3" + stream-combiner "~0.0.4" + through "~2.3.1" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find@~0: + version "0.2.7" + resolved "https://registry.yarnpkg.com/find/-/find-0.2.7.tgz#7afbd00f8f08c5b622f97cda6f714173d547bb3f" + dependencies: + traverse-chain "~0.1.0" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^0.1.5: + version "0.1.6" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.6.tgz#c9f96e89bfad18a545af5ec3ed352a1d9e5b4dc8" + +for-own@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.4.tgz#0149b41a39088c7515f51ebe1c1386d45f935072" + dependencies: + for-in "^0.1.5" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +from@~0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.0.15" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.0.15.tgz#fa63f590f3c2ad91275e4972a6cea545fb0aae44" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +function-bind@^1.0.2, function-bind@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +gather-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b" + +gauge@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + supports-color "^0.2.0" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-4.1.0.tgz#080f54549ec1b82a6c60e631fc82e1211dbe95f8" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^6.0.1" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.0.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-callable@^1.1.1, is-callable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + +is-date-object@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.12.4: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-regex@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" + +is-symbol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@~1.0.0, isarray@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isnumeric@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isnumeric/-/isnumeric-0.2.0.tgz#a2347ba360de19e33d0ffd590fddf7755cbf2e64" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +jsbn@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" + dependencies: + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +kind-of@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + dependencies: + is-buffer "^1.0.2" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.indexof@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/lodash.indexof/-/lodash.indexof-4.0.5.tgz#53714adc2cddd6ed87638f893aa9b6c24e31ef3c" + +lodash.memoize@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.template@^4.2.4: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + dependencies: + lodash._reinterpolate "~3.0.0" + +lodash.uniq@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +lru-cache@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +map-stream@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" + +math-expression-evaluator@^1.2.14: + version "1.2.14" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.14.tgz#39511771ed9602405fba9affff17eb4d2a3843ab" + dependencies: + lodash.indexof "^4.0.5" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.25.0: + version "1.25.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.13" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" + dependencies: + mime-db "~1.25.0" + +minimatch@^3.0.0, minimatch@^3.0.2, "minimatch@2 || 3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +nan@^2.3.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8" + +neo-async@^1.0.0: + version "1.8.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-1.8.2.tgz#31795888b79dd04357a7c52113a65183e93b6735" + +node-pre-gyp@^0.6.29: + version "0.6.32" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.1" + rc "~1.1.6" + request "^2.79.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +npm-run-all@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.0.0.tgz#6c729dc9fb46b610b435039568bc7469ae7356fe" + dependencies: + chalk "^1.1.3" + cross-spawn "^5.0.1" + minimatch "^3.0.2" + ps-tree "^1.0.1" + read-pkg "^2.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + +npmlog@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-keys@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +on-headers@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onecolor@~2.4.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/onecolor/-/onecolor-2.4.2.tgz#a53ec3ff171c3446016dd5210d1a1b544bf7d874" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parseurl@~1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + +pause-stream@0.0.11: + version "0.0.11" + resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" + dependencies: + through "~2.3" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pixrem@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/pixrem/-/pixrem-3.0.2.tgz#30d1bafb4c3bdce8e9bb4bd56a13985619320c34" + dependencies: + browserslist "^1.0.0" + postcss "^5.0.0" + reduce-css-calc "^1.2.7" + +pleeease-filters@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pleeease-filters/-/pleeease-filters-3.0.0.tgz#35a4d4c2086413eabc2ce17aaa2ec29054e3075c" + dependencies: + onecolor "~2.4.0" + postcss "^5.0.4" + +postcss-apply@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/postcss-apply/-/postcss-apply-0.3.0.tgz#a2f37c5bdfa881e4c15f4f245ec0cd96dd2e70d5" + dependencies: + balanced-match "^0.4.1" + postcss "^5.0.21" + +postcss-attribute-case-insensitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-1.0.1.tgz#ceb73777e106167eb233f1938c9bd9f2e697308d" + dependencies: + postcss "^5.1.1" + postcss-selector-parser "^2.2.0" + +postcss-cachify@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/postcss-cachify/-/postcss-cachify-1.3.1.tgz#0e84b0aec037362add05fba4c561ed78c6eacd56" + dependencies: + connect-cachify-static "^1.3.0" + debug "^2.1.2" + postcss "^5.0.0" + +postcss-calc@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-cli@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/postcss-cli/-/postcss-cli-2.6.0.tgz#f0de393caa026fcfc1b1479822989af508ed515d" + dependencies: + globby "^4.1.0" + mkdirp "^0.5.1" + neo-async "^1.0.0" + postcss "^5.0.0" + read-file-stdin "^0.2.0" + resolve "^1.1.6" + yargs "^4.7.1" + optionalDependencies: + chokidar "^1.5.1" + +postcss-color-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-function/-/postcss-color-function-2.0.1.tgz#9ad226f550e8a7c7f8b8a77860545b6dd7f55241" + dependencies: + css-color-function "^1.2.0" + postcss "^5.0.4" + postcss-message-helpers "^2.0.0" + postcss-value-parser "^3.3.0" + +postcss-color-gray@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-gray/-/postcss-color-gray-3.0.1.tgz#74432ede66dd83b1d1363565c68b376e18ff6770" + dependencies: + color "^0.11.3" + postcss "^5.0.4" + postcss-message-helpers "^2.0.0" + reduce-function-call "^1.0.1" + +postcss-color-hex-alpha@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-2.0.0.tgz#44fd6ecade66028648c881cb6504cdcbfdc6cd09" + dependencies: + color "^0.10.1" + postcss "^5.0.4" + postcss-message-helpers "^2.0.0" + +postcss-color-hsl@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-color-hsl/-/postcss-color-hsl-1.0.5.tgz#f53bb1c348310ce307ad89e3181a864738b5e687" + dependencies: + postcss "^5.2.0" + postcss-value-parser "^3.3.0" + units-css "^0.4.0" + +postcss-color-hwb@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-hwb/-/postcss-color-hwb-2.0.1.tgz#d63afaf9b70cb595f900a29c9fe57bf2a32fabec" + dependencies: + color "^0.11.4" + postcss "^5.0.4" + postcss-message-helpers "^2.0.0" + reduce-function-call "^1.0.1" + +postcss-color-rebeccapurple@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-2.0.1.tgz#74c6444e7cbb7d85613b5f7286df7a491608451c" + dependencies: + color "^0.11.4" + postcss "^5.0.4" + +postcss-color-rgb@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/postcss-color-rgb/-/postcss-color-rgb-1.1.4.tgz#f29243e22e8e8c13434474092372d4ce605be8bc" + dependencies: + postcss "^5.2.0" + postcss-value-parser "^3.3.0" + +postcss-color-rgba-fallback@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-color-rgba-fallback/-/postcss-color-rgba-fallback-2.2.0.tgz#6d29491be5990a93173d47e7c76f5810b09402ba" + dependencies: + postcss "^5.0.0" + postcss-value-parser "^3.0.2" + rgb-hex "^1.0.0" + +postcss-cssnext@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/postcss-cssnext/-/postcss-cssnext-2.9.0.tgz#064df2a8c21fd2ebb88825df372cf20fca882868" + dependencies: + autoprefixer "^6.0.2" + caniuse-api "^1.3.2" + chalk "^1.1.1" + pixrem "^3.0.0" + pleeease-filters "^3.0.0" + postcss "^5.0.4" + postcss-apply "^0.3.0" + postcss-attribute-case-insensitive "^1.0.1" + postcss-calc "^5.0.0" + postcss-color-function "^2.0.0" + postcss-color-gray "^3.0.0" + postcss-color-hex-alpha "^2.0.0" + postcss-color-hsl "^1.0.5" + postcss-color-hwb "^2.0.0" + postcss-color-rebeccapurple "^2.0.0" + postcss-color-rgb "^1.1.4" + postcss-color-rgba-fallback "^2.0.0" + postcss-custom-media "^5.0.0" + postcss-custom-properties "^5.0.0" + postcss-custom-selectors "^3.0.0" + postcss-font-variant "^2.0.0" + postcss-initial "^1.3.1" + postcss-media-minmax "^2.1.0" + postcss-nesting "^2.0.5" + postcss-pseudo-class-any-link "^1.0.0" + postcss-pseudoelements "^3.0.0" + postcss-replace-overflow-wrap "^1.0.0" + postcss-selector-matches "^2.0.0" + postcss-selector-not "^2.0.0" + +postcss-custom-media@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz#138d25a184bf2eb54de12d55a6c01c30a9d8bd81" + dependencies: + postcss "^5.0.0" + +postcss-custom-properties@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-5.0.1.tgz#e07d4f6c78e547cf04274f120f490d236e33ea19" + dependencies: + balanced-match "~0.1.0" + postcss "^5.0.0" + +postcss-custom-selectors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-3.0.0.tgz#8f81249f5ed07a8d0917cf6a39fe5b056b7f96ac" + dependencies: + balanced-match "^0.2.0" + postcss "^5.0.0" + postcss-selector-matches "^2.0.0" + +postcss-font-variant@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-2.0.1.tgz#7ca29103f59fa02ca3ace2ca22b2f756853d4ef8" + dependencies: + postcss "^5.0.4" + +postcss-import: + version "9.0.0" + resolved "https://registry.yarnpkg.com/postcss-import/-/postcss-import-9.0.0.tgz#751fcd21c53eec6eb468890384ce3c114968b391" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + promise-each "^2.2.0" + read-cache "^1.0.0" + resolve "^1.1.7" + +postcss-initial@^1.3.1: + version "1.5.3" + resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-1.5.3.tgz#20c3e91c96822ddb1bed49508db96d56bac377d0" + dependencies: + lodash.template "^4.2.4" + postcss "^5.0.19" + +postcss-media-minmax@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-2.1.2.tgz#444c5cf8926ab5e4fd8a2509e9297e751649cdf8" + dependencies: + postcss "^5.0.4" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-nesting@^2.0.5: + version "2.3.1" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-2.3.1.tgz#94a6b6a4ef707fbec20a87fee5c957759b4e01cf" + dependencies: + postcss "^5.0.19" + +postcss-pseudo-class-any-link@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-1.0.0.tgz#903239196401d335fe73ac756186fa62e693af26" + dependencies: + postcss "^5.0.3" + postcss-selector-parser "^1.1.4" + +postcss-pseudoelements@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-pseudoelements/-/postcss-pseudoelements-3.0.0.tgz#6c682177c7900ba053b6df17f8c590284c7b8bbc" + dependencies: + postcss "^5.0.4" + +postcss-replace-overflow-wrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-1.0.0.tgz#f0a03b31eab9636a6936bfd210e2aef1b434a643" + dependencies: + postcss "^5.0.16" + +postcss-selector-matches@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/postcss-selector-matches/-/postcss-selector-matches-2.0.5.tgz#fa0f43be57b68e77aa4cd11807023492a131027f" + dependencies: + balanced-match "^0.4.2" + postcss "^5.0.0" + +postcss-selector-not@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-2.0.0.tgz#c73ad21a3f75234bee7fee269e154fd6a869798d" + dependencies: + balanced-match "^0.2.0" + postcss "^5.0.0" + +postcss-selector-parser@^1.1.4: + version "1.3.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-1.3.3.tgz#d2ee19df7a64f8ef21c1a71c86f7d4835c88c281" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-selector-parser@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.2.tgz#3d70f5adda130da51c7c0c2fc023f56b1374fe08" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-value-parser@^3.0.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss@^5.0.0, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.19, postcss@^5.0.2, postcss@^5.0.21, postcss@^5.0.3, postcss@^5.0.4, postcss@^5.1.1, postcss@^5.2.0, postcss@^5.2.8: + version "5.2.8" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.8.tgz#05720c49df23c79bda51fd01daeb1e9222e94390" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.1.2" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +promise-each@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/promise-each/-/promise-each-2.2.0.tgz#3353174eff2694481037e04e01f77aa0fb6d1b60" + dependencies: + any-promise "^0.1.0" + +ps-tree@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.1.0.tgz#b421b24140d6203f1ed3c76996b4427b08e8c014" + dependencies: + event-stream "~3.3.0" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +read-cache@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774" + dependencies: + pify "^2.3.0" + +read-file-stdin@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/read-file-stdin/-/read-file-stdin-0.2.1.tgz#25eccff3a153b6809afacb23ee15387db9e0ee61" + dependencies: + gather-stream "^1.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +reduce-css-calc@^1.2.6, reduce-css-calc@^1.2.7: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +request@^2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.2.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" + +rgb-hex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rgb-hex/-/rgb-hex-1.0.0.tgz#bfaf8cd9cd9164b5a26d71eb4f15a0965324b3c1" + +rgb@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/rgb/-/rgb-0.1.0.tgz#be27b291e8feffeac1bd99729721bfa40fc037b5" + +rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +semver@~5.3.0, "semver@2 || 3 || 4 || 5": + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + +shell-quote@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767" + dependencies: + array-filter "~0.0.0" + array-map "~0.0.0" + array-reduce "~0.0.0" + jsonify "~0.0.0" + +shelljs@^0.7.0: + version "0.7.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.5.tgz#2eef7a50a21e1ccf37da00df767ec69e30ad0675" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +split@0.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" + dependencies: + through "2" + +sshpk@^1.7.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stream-combiner@~0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" + dependencies: + duplexer "~0.1.1" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string.prototype.padend@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.4.3" + function-bind "^1.0.2" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +through@~2.3, through@~2.3.1, through@2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +traverse-chain@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +units-css@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/units-css/-/units-css-0.4.0.tgz#d6228653a51983d7c16ff28f8b9dc3b1ffed3a07" + dependencies: + isnumeric "^0.2.0" + viewport-dimensions "^0.2.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +viewport-dimensions@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/viewport-dimensions/-/viewport-dimensions-0.2.0.tgz#de740747db5387fd1725f5175e91bac76afdf36c" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.2.9: + version "1.2.12" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" + dependencies: + isexe "^1.1.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + From 470c39cf795362718ffe17974c4b63e500b8f74c Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 11:18:55 -0500 Subject: [PATCH 16/56] Remove some unused code --- src/Model/AnimeCollection.php | 18 ------------------ tests/DispatcherTest.php | 1 - 2 files changed, 19 deletions(-) diff --git a/src/Model/AnimeCollection.php b/src/Model/AnimeCollection.php index da8e989a..42312ad3 100644 --- a/src/Model/AnimeCollection.php +++ b/src/Model/AnimeCollection.php @@ -120,8 +120,6 @@ class AnimeCollection extends Collection { public function add($data) { $anime = (object)$this->anime_model->getAnimeById($data['id']); - $util = $this->container->get('util'); - $this->db->set([ 'hummingbird_id' => $data['id'], 'slug' => $anime->slug, @@ -285,21 +283,5 @@ class AnimeCollection extends Collection { 'links' => $links ]; } - - /** - * Update genre information for the entire collection - * - * @return void - */ - private function update_genres() - { - // Get the anime collection - $collection = $this->_get_collection(); - foreach ($collection as $anime) - { - // Get api information - $this->update_genre($anime['hummingbird_id']); - } - } } // End of AnimeCollectionModel.php \ No newline at end of file diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 4b9202f9..5f0e0792 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -132,7 +132,6 @@ class DispatcherTest extends AnimeClient_TestCase { $request = $this->container->get('request'); $aura_router = $this->container->get('aura-router'); - $matcher = $aura_router->getMatcher(); // Check route setup From d94a2804374730bf3d6c7dd2e207559eaeb4d6db Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 11:30:16 -0500 Subject: [PATCH 17/56] Snake case to camel case --- src/Command/ClearCache.php | 4 +--- src/Controller.php | 22 ++++++++++----------- src/Controller/Anime.php | 12 ++++++------ src/Controller/Collection.php | 36 +++++++++++++++++------------------ src/Controller/Manga.php | 6 +++--- src/Helper/Menu.php | 6 +++--- 6 files changed, 42 insertions(+), 44 deletions(-) diff --git a/src/Command/ClearCache.php b/src/Command/ClearCache.php index 9c893aab..8d8dbe06 100644 --- a/src/Command/ClearCache.php +++ b/src/Command/ClearCache.php @@ -21,10 +21,8 @@ namespace Aviat\AnimeClient\Command; */ class ClearCache extends BaseCommand { /** - * Run the image conversion script + * Clear the API cache * - * @param array $args - * @param array $options * @return void * @throws \ConsoleKit\ConsoleException */ diff --git a/src/Controller.php b/src/Controller.php index e83d71cd..a2a60be3 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -77,7 +77,7 @@ class Controller { * Common data to be sent to views * @var array */ - protected $base_data = [ + protected $baseData = [ 'url_type' => 'anime', 'other_type' => 'manga', 'menu_name' => '' @@ -97,10 +97,10 @@ class Controller { $this->config = $container->get('config'); $this->request = $container->get('request'); $this->response = $container->get('response'); - $this->base_data['url'] = $auraUrlGenerator; - $this->base_data['urlGenerator'] = $urlGenerator; - $this->base_data['auth'] = $container->get('auth'); - $this->base_data['config'] = $this->config; + $this->baseData['url'] = $auraUrlGenerator; + $this->baseData['urlGenerator'] = $urlGenerator; + $this->baseData['auth'] = $container->get('auth'); + $this->baseData['config'] = $this->config; $this->urlGenerator = $urlGenerator; $session = $container->get('session'); @@ -114,7 +114,7 @@ class Controller { } // Set a message box if available - $this->base_data['message'] = $this->session->getFlash('message'); + $this->baseData['message'] = $this->session->getFlash('message'); } /** @@ -225,9 +225,9 @@ class Controller { { $router = $this->container->get('dispatcher'); - if (isset($this->base_data)) + if (isset($this->baseData)) { - $data = array_merge($this->base_data, $data); + $data = array_merge($this->baseData, $data); } $route = $router->getRoute(); @@ -338,19 +338,19 @@ class Controller { /** * Display a generic error page * - * @param int $http_code + * @param int $httpCode * @param string $title * @param string $message * @param string $long_message * @return void */ - public function errorPage($http_code, $title, $message, $long_message = "") + public function errorPage($httpCode, $title, $message, $long_message = "") { $this->outputHTML('error', [ 'title' => $title, 'message' => $message, 'long_message' => $long_message - ], NULL, $http_code); + ], NULL, $httpCode); } /** diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index d06d2a76..e525e143 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -39,9 +39,9 @@ class Anime extends BaseController { /** * Data to be sent to all routes in this controller - * @var array $base_data + * @var array $baseData */ - protected $base_data; + protected $baseData; /** * Data cache @@ -60,7 +60,7 @@ class Anime extends BaseController { $this->model = $container->get('anime-model'); - $this->base_data = array_merge($this->base_data, [ + $this->baseData = array_merge($this->baseData, [ 'menu_name' => 'anime_list', 'url_type' => 'anime', 'other_type' => 'manga', @@ -179,13 +179,13 @@ class Anime extends BaseController { public function edit($id, $status = "all") { $item = $this->model->getLibraryItem($id, $status); - $raw_status_list = AnimeWatchingStatus::getConstList(); + $rawStatusList = AnimeWatchingStatus::getConstList(); $statuses = []; - foreach ($raw_status_list as $status_item) + foreach ($rawStatusList as $statusItem) { - $statuses[$status_item] = (string) $this->string($status_item) + $statuses[$statusItem] = (string) $this->string($statusItem) ->underscored() ->humanize() ->titleize(); diff --git a/src/Controller/Collection.php b/src/Controller/Collection.php index de6a5a7a..eee00bc4 100644 --- a/src/Controller/Collection.php +++ b/src/Controller/Collection.php @@ -29,21 +29,21 @@ class Collection extends BaseController { /** * The anime collection model - * @var AnimeCollectionModel $anime_collection_model + * @var AnimeCollectionModel $animeCollectionModel */ - private $anime_collection_model; + private $animeCollectionModel; /** * The anime API model - * @var AnimeModel $anime_model + * @var AnimeModel $animeModel */ - private $anime_model; + private $animeModel; /** - * Data to ve sent to all routes in this controller - * @var array $base_data + * Data to be sent to all routes in this controller + * @var array $baseData */ - protected $base_data; + protected $baseData; /** * Url Generator class @@ -61,9 +61,9 @@ class Collection extends BaseController { parent::__construct($container); $this->urlGenerator = $container->get('url-generator'); - $this->anime_model = $container->get('anime-model'); - $this->anime_collection_model = $container->get('anime-collection-model'); - $this->base_data = array_merge($this->base_data, [ + $this->animeModel = $container->get('anime-model'); + $this->animeCollectionModel = $container->get('anime-collection-model'); + $this->baseData = array_merge($this->baseData, [ 'menu_name' => 'collection', 'url_type' => 'anime', 'other_type' => 'manga', @@ -80,7 +80,7 @@ class Collection extends BaseController { { $queryParams = $this->request->getQueryParams(); $query = $queryParams['query']; - $this->outputJSON($this->anime_model->search($query)); + $this->outputJSON($this->animeModel->search($query)); } /** @@ -96,12 +96,12 @@ class Collection extends BaseController { 'list' => 'list' ]; - $data = $this->anime_collection_model->get_collection(); + $data = $this->animeCollectionModel->get_collection(); $this->outputHTML('collection/' . $view_map[$view], [ 'title' => $this->config->get('whose_list') . "'s Anime Collection", 'sections' => $data, - 'genres' => $this->anime_collection_model->get_genre_list() + 'genres' => $this->animeCollectionModel->get_genre_list() ]); } @@ -121,8 +121,8 @@ class Collection extends BaseController { 'action' => $action, 'action_url' => $this->urlGenerator->full_url('collection/' . strtolower($action)), 'title' => $this->config->get('whose_list') . " Anime Collection · {$action}", - 'media_items' => $this->anime_collection_model->get_media_type_list(), - 'item' => ($action === "Edit") ? $this->anime_collection_model->get($id) : [] + 'media_items' => $this->animeCollectionModel->get_media_type_list(), + 'item' => ($action === "Edit") ? $this->animeCollectionModel->get($id) : [] ]); } @@ -136,7 +136,7 @@ class Collection extends BaseController { $data = $this->request->getParsedBody(); if (array_key_exists('hummingbird_id', $data)) { - $this->anime_collection_model->update($data); + $this->animeCollectionModel->update($data); $this->set_flash_message('Successfully updated collection item.', 'success'); } else @@ -157,7 +157,7 @@ class Collection extends BaseController { $data = $this->request->getParsedBody(); if (array_key_exists('id', $data)) { - $this->anime_collection_model->add($data); + $this->animeCollectionModel->add($data); $this->set_flash_message('Successfully added collection item', 'success'); } else @@ -181,7 +181,7 @@ class Collection extends BaseController { $this->redirect("/collection/view", 303); } - $this->anime_collection_model->delete($data); + $this->animeCollectionModel->delete($data); $this->set_flash_message("Successfully removed anime from collection.", 'success'); $this->redirect("/collection/view", 303); diff --git a/src/Controller/Manga.php b/src/Controller/Manga.php index 08d93c87..f493522b 100644 --- a/src/Controller/Manga.php +++ b/src/Controller/Manga.php @@ -39,9 +39,9 @@ class Manga extends Controller { /** * Data to ve sent to all routes in this controller - * @var array $base_data + * @var array $baseData */ - protected $base_data; + protected $baseData; /** * Constructor @@ -53,7 +53,7 @@ class Manga extends Controller { parent::__construct($container); $this->model = $container->get('manga-model'); - $this->base_data = array_merge($this->base_data, [ + $this->baseData = array_merge($this->baseData, [ 'menu_name' => 'manga_list', 'config' => $this->config, 'url_type' => 'manga', diff --git a/src/Helper/Menu.php b/src/Helper/Menu.php index 76cbf3e3..c3045436 100644 --- a/src/Helper/Menu.php +++ b/src/Helper/Menu.php @@ -28,13 +28,13 @@ class Menu { /** * Create the html for the selected menu * - * @param string $menu_name + * @param string $menuName * @return string */ - public function __invoke($menu_name) + public function __invoke($menuName) { $generator = new MenuGenerator($this->container); - return $generator->generate($menu_name); + return $generator->generate($menuName); } } From 36874cbe55d957f16d059f0e634cdb74722f8098 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 11:49:38 -0500 Subject: [PATCH 18/56] Properly namespace all the tests --- tests/API/CacheTraitTest.php | 3 ++- .../Transformer/AnimeListTransformerTest.php | 2 +- .../Transformer/AnimeTransformerTest.php | 2 +- .../Transformer/MangaListTransformerTest.php | 2 +- .../Transformer/MangaTransformerTest.php | 2 +- tests/AnimeClientTest.php | 4 ++-- tests/AnimeClient_TestCase.php | 2 ++ tests/Command/BaseCommandTest.php | 3 +++ tests/ControllerTest.php | 3 +++ tests/DispatcherTest.php | 22 ++++++++++--------- tests/Helper/MenuHelperTest.php | 2 ++ tests/MenuGeneratorTest.php | 3 +++ tests/RequirementsTest.php | 4 ++++ tests/RoutingBaseTest.php | 2 ++ tests/TestSessionHandler.php | 4 +++- tests/UrlGeneratorTest.php | 2 ++ tests/UtilTest.php | 2 +- tests/bootstrap.php | 4 ++-- 18 files changed, 47 insertions(+), 21 deletions(-) diff --git a/tests/API/CacheTraitTest.php b/tests/API/CacheTraitTest.php index a221e4e4..596d3032 100644 --- a/tests/API/CacheTraitTest.php +++ b/tests/API/CacheTraitTest.php @@ -17,8 +17,9 @@ namespace Aviat\AnimeClient\Tests\API; use Aviat\AnimeClient\API\CacheTrait; +use Aviat\AnimeClient\Tests\AnimeClient_TestCase; -class CacheTraitTest extends \AnimeClient_TestCase { +class CacheTraitTest extends AnimeClient_TestCase { public function setUp() { parent::setUp(); diff --git a/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php index a18ace95..357c57d2 100644 --- a/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php @@ -16,8 +16,8 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; -use AnimeClient_TestCase; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer; +use Aviat\AnimeClient\Tests\AnimeClient_TestCase; use Aviat\Ion\Friend; use Aviat\Ion\Json; diff --git a/tests/API/Kitsu/Transformer/AnimeTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeTransformerTest.php index a0adae93..9aa74952 100644 --- a/tests/API/Kitsu/Transformer/AnimeTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeTransformerTest.php @@ -16,8 +16,8 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; -use AnimeClient_TestCase; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer; +use Aviat\AnimeClient\Tests\AnimeClient_TestCase; use Aviat\Ion\Friend; use Aviat\Ion\Json; diff --git a/tests/API/Kitsu/Transformer/MangaListTransformerTest.php b/tests/API/Kitsu/Transformer/MangaListTransformerTest.php index 9c229a7a..cb05de12 100644 --- a/tests/API/Kitsu/Transformer/MangaListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaListTransformerTest.php @@ -16,9 +16,9 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; -use AnimeClient_TestCase; use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer; +use Aviat\AnimeClient\Tests\AnimeClient_TestCase; use Aviat\Ion\Json; class MangaListTransformerTest extends AnimeClient_TestCase { diff --git a/tests/API/Kitsu/Transformer/MangaTransformerTest.php b/tests/API/Kitsu/Transformer/MangaTransformerTest.php index 1f2df8cd..7be8e844 100644 --- a/tests/API/Kitsu/Transformer/MangaTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaTransformerTest.php @@ -16,9 +16,9 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; -use AnimeClient_TestCase; use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer; +use Aviat\AnimeClient\Tests\AnimeClient_TestCase; use Aviat\Ion\Json; class MangaTransformerTest extends AnimeClient_TestCase { diff --git a/tests/AnimeClientTest.php b/tests/AnimeClientTest.php index 0d75a480..a62c1791 100644 --- a/tests/AnimeClientTest.php +++ b/tests/AnimeClientTest.php @@ -1,13 +1,13 @@ assertEquals('foo' . DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar')); + $this->assertEquals('foo' . \DIRECTORY_SEPARATOR . 'bar', \_dir('foo', 'bar')); } } diff --git a/tests/AnimeClient_TestCase.php b/tests/AnimeClient_TestCase.php index 90733e39..3bd39053 100644 --- a/tests/AnimeClient_TestCase.php +++ b/tests/AnimeClient_TestCase.php @@ -1,5 +1,7 @@ [ 'routes' => [ 'login_form' => [ @@ -88,33 +90,33 @@ class DispatcherTest extends AnimeClient_TestCase { 'default_list' => 'anime' ] ], - ); + ]; $data = [ - 'anime_default_routing_manga' => array( + 'anime_default_routing_manga' => [ 'config' => $default_config, 'controller' => 'manga', 'host' => "localhost", 'uri' => "/manga/plan_to_read", - ), - 'manga_default_routing_anime' => array( + ], + 'manga_default_routing_anime' => [ 'config' => $default_config, 'controller' => 'anime', 'host' => "localhost", 'uri' => "/anime/watching", - ), - 'anime_default_routing_anime' => array( + ], + 'anime_default_routing_anime' => [ 'config' => $default_config, 'controller' => 'anime', 'host' => 'localhost', 'uri' => '/anime/watching', - ), - 'manga_default_routing_manga' => array( + ], + 'manga_default_routing_manga' => [ 'config' => $default_config, 'controller' => 'manga', 'host' => 'localhost', 'uri' => '/manga/plan_to_read' - ) + ] ]; $data['manga_default_routing_anime']['config']['routes']['route_config']['default_list'] = 'manga'; diff --git a/tests/Helper/MenuHelperTest.php b/tests/Helper/MenuHelperTest.php index 38740428..bf5c37d0 100644 --- a/tests/Helper/MenuHelperTest.php +++ b/tests/Helper/MenuHelperTest.php @@ -1,5 +1,7 @@ Date: Wed, 15 Feb 2017 11:57:29 -0500 Subject: [PATCH 19/56] Fix more code style issues --- public/css.php | 6 +++--- public/js.php | 2 +- src/API/MAL/Transformer/AnimeListTransformer.php | 8 ++++---- tests/DispatcherTest.php | 12 +++++------- tests/RoutingBaseTest.php | 8 ++++---- tests/TestSessionHandler.php | 14 +++++++------- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/public/css.php b/public/css.php index 3253765b..f9e81280 100644 --- a/public/css.php +++ b/public/css.php @@ -74,7 +74,7 @@ class CSSMin extends BaseMin { //Remove tabs, spaces, newlines, etc. $buffer = preg_replace('`\s+`', ' ', $buffer); - $replace = array( + $replace = [ ' )' => ')', ') ' => ')', ' }' => '}', @@ -84,7 +84,7 @@ class CSSMin extends BaseMin { ', ' => ',', ': ' => ':', '; ' => ';', - ); + ]; //Eradicate every last space! $buffer = trim(strtr($buffer, $replace)); @@ -101,7 +101,7 @@ class CSSMin extends BaseMin { */ protected function get_last_modified() { - $modified = array(); + $modified = []; // Get all the css files, and concatenate them together if(isset($this->group)) diff --git a/public/js.php b/public/js.php index e8f50232..8fa87bb5 100644 --- a/public/js.php +++ b/public/js.php @@ -168,7 +168,7 @@ class JSMin extends BaseMin { */ protected function get_last_modified() { - $modified = array(); + $modified = []; foreach($this->js_group as $file) { diff --git a/src/API/MAL/Transformer/AnimeListTransformer.php b/src/API/MAL/Transformer/AnimeListTransformer.php index 16f59d8a..6cabf5fe 100644 --- a/src/API/MAL/Transformer/AnimeListTransformer.php +++ b/src/API/MAL/Transformer/AnimeListTransformer.php @@ -24,7 +24,7 @@ use Aviat\Ion\Transformer\AbstractTransformer; */ class AnimeListTransformer extends AbstractTransformer { - const statusMap = [ + const STATUS_MAP = [ AnimeWatchingStatus::WATCHING => '1', AnimeWatchingStatus::COMPLETED => '2', AnimeWatchingStatus::ON_HOLD => '3', @@ -45,7 +45,7 @@ class AnimeListTransformer extends AbstractTransformer { return [ 'id' => $item['mal_id'], 'data' => [ - 'status' => self::statusMap[$item['watching_status']], + 'status' => self::STATUS_MAP[$item['watching_status']], 'rating' => $item['user_rating'], 'rewatch_value' => (int) $rewatching, 'times_rewatched' => $item['rewatched'], @@ -58,7 +58,7 @@ class AnimeListTransformer extends AbstractTransformer { /** * Transform Kitsu episode data to MAL episode data * - * @param array $item + * @param array $item * @return array */ public function untransform(array $item): array @@ -93,7 +93,7 @@ class AnimeListTransformer extends AbstractTransformer { break; case 'status': - $map['data']['status'] = self::statusMap[$value]; + $map['data']['status'] = self::STATUS_MAP[$value]; break; default: diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 74b74fca..05ad50c2 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -15,7 +15,7 @@ class DispatcherTest extends AnimeClient_TestCase { protected $router; protected $config; - protected function _set_up($config, $uri, $host) + protected function doSetUp($config, $uri, $host) { // Set up the environment $_SERVER = array_merge($_SERVER, [ @@ -49,7 +49,7 @@ class DispatcherTest extends AnimeClient_TestCase { public function testRouterSanity() { - $this->_set_up([], '/', 'localhost'); + $this->doSetUp([], '/', 'localhost'); $this->assertTrue(is_object($this->router)); } @@ -130,11 +130,9 @@ class DispatcherTest extends AnimeClient_TestCase { */ public function testRoute($config, $controller, $host, $uri) { - $this->_set_up($config, $uri, $host); + $this->doSetUp($config, $uri, $host); $request = $this->container->get('request'); - $aura_router = $this->container->get('aura-router'); - // Check route setup $this->assertEquals($config['routes'], $this->config->get('routes'), "Incorrect route path"); @@ -191,7 +189,7 @@ class DispatcherTest extends AnimeClient_TestCase { ] ]; - $this->_set_up($config, "/", "localhost"); + $this->doSetUp($config, "/", "localhost"); $this->assertEquals('//localhost/manga/all', $this->urlGenerator->default_url('manga'), "Incorrect default url"); $this->assertEquals('//localhost/anime/watching', $this->urlGenerator->default_url('anime'), "Incorrect default url"); @@ -252,7 +250,7 @@ class DispatcherTest extends AnimeClient_TestCase { */ public function testGetControllerList($config, $expected) { - $this->_set_up($config, '/', 'localhost'); + $this->doSetUp($config, '/', 'localhost'); $this->assertEquals($expected, $this->router->getControllerList()); } } \ No newline at end of file diff --git a/tests/RoutingBaseTest.php b/tests/RoutingBaseTest.php index 6c6c9e66..f514972a 100644 --- a/tests/RoutingBaseTest.php +++ b/tests/RoutingBaseTest.php @@ -16,13 +16,13 @@ class RoutingBaseTest extends AnimeClient_TestCase { { return [ 'empty_segment' => [ - 'request_uri' => ' // ', + 'requestUri' => ' // ', 'path' => '/', 'segments' => ['', ''], 'last_segment' => NULL ], 'three_segments' => [ - 'request_uri' => '/anime/watching/list ', + 'requestUri' => '/anime/watching/list ', 'path' => '/anime/watching/list', 'segments' => ['', 'anime', 'watching', 'list'], 'last_segment' => 'list' @@ -33,11 +33,11 @@ class RoutingBaseTest extends AnimeClient_TestCase { /** * @dataProvider dataSegments */ - public function testSegments($request_uri, $path, $segments, $last_segment) + public function testSegments($requestUri, $path, $segments, $last_segment) { $this->setSuperGlobals([ '_SERVER' => [ - 'REQUEST_URI' => $request_uri + 'REQUEST_URI' => $requestUri ] ]); diff --git a/tests/TestSessionHandler.php b/tests/TestSessionHandler.php index 1c439cbd..487b01fa 100644 --- a/tests/TestSessionHandler.php +++ b/tests/TestSessionHandler.php @@ -5,7 +5,7 @@ namespace Aviat\AnimeClient\Tests; class TestSessionHandler implements \SessionHandlerInterface { public $data = []; - public $save_path = './test_data/sessions'; + public $savePath = './test_data/sessions'; public function close() { @@ -14,7 +14,7 @@ class TestSessionHandler implements \SessionHandlerInterface { public function destroy($id) { - $file = "$this->save_path/$id"; + $file = "$this->savePath/$id"; if (file_exists($file)) { @unlink($file); @@ -28,11 +28,11 @@ class TestSessionHandler implements \SessionHandlerInterface { return TRUE; } - public function open($save_path, $name) + public function open($savePath, $name) { - /*if ( ! array_key_exists($save_path, $this->data)) + /*if ( ! array_key_exists($savePath, $this->data)) { - $this->save_path = $save_path; + $this->savePath = $savePath; $this->data = []; }*/ return TRUE; @@ -40,12 +40,12 @@ class TestSessionHandler implements \SessionHandlerInterface { public function read($id) { - return json_decode(@file_get_contents("$this->save_path/$id"), TRUE); + return json_decode(@file_get_contents("$this->savePath/$id"), TRUE); } public function write($id, $data) { - $file = "$this->save_path/$id"; + $file = "$this->savePath/$id"; file_put_contents($file, json_encode($data)); return TRUE; From da9ebe8867e3ebbae76c10e4cfde30ec6c46addc Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 13:07:36 -0500 Subject: [PATCH 20/56] More style fixes --- src/API/Kitsu.php | 2 +- src/API/Kitsu/Transformer/MangaListTransformer.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/API/Kitsu.php b/src/API/Kitsu.php index 117f7bdd..11f947c5 100644 --- a/src/API/Kitsu.php +++ b/src/API/Kitsu.php @@ -235,7 +235,7 @@ class Kitsu { * @param array $existingTitles * @return bool */ - private static function titleIsUnique(string $title = null, array $existingTitles): bool + private static function titleIsUnique(string $title = null, array $existingTitles = []): bool { if (empty($title)) { diff --git a/src/API/Kitsu/Transformer/MangaListTransformer.php b/src/API/Kitsu/Transformer/MangaListTransformer.php index cd41809a..81d7bcf4 100644 --- a/src/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/API/Kitsu/Transformer/MangaListTransformer.php @@ -42,11 +42,11 @@ class MangaListTransformer extends AbstractTransformer { ? intval(2 * $item['attributes']['rating']) : '-'; - $total_chapters = ($manga['attributes']['chapterCount'] > 0) + $totalChapters = ($manga['attributes']['chapterCount'] > 0) ? $manga['attributes']['chapterCount'] : '-'; - $total_volumes = ($manga['attributes']['volumeCount'] > 0) + $totalVolumes = ($manga['attributes']['volumeCount'] > 0) ? $manga['attributes']['volumeCount'] : '-'; @@ -54,11 +54,11 @@ class MangaListTransformer extends AbstractTransformer { 'id' => $item['id'], 'chapters' => [ 'read' => $item['attributes']['progress'], - 'total' => $total_chapters + 'total' => $totalChapters ], 'volumes' => [ 'read' => '-', //$item['attributes']['volumes_read'], - 'total' => $total_volumes + 'total' => $totalVolumes ], 'manga' => [ 'titles' => Kitsu::filterTitles($manga['attributes']), From ae42fafe84ef4abf8988f0c4c9b4d3ecc5ac3fe2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 13:08:17 -0500 Subject: [PATCH 21/56] Update headers --- tests/Command/BaseCommandTest.php | 16 +++++++++++++++- tests/Helper/MenuHelperTest.php | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/tests/Command/BaseCommandTest.php b/tests/Command/BaseCommandTest.php index 317a5a11..cb07840e 100644 --- a/tests/Command/BaseCommandTest.php +++ b/tests/Command/BaseCommandTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests\Command; diff --git a/tests/Helper/MenuHelperTest.php b/tests/Helper/MenuHelperTest.php index bf5c37d0..7ad23f8b 100644 --- a/tests/Helper/MenuHelperTest.php +++ b/tests/Helper/MenuHelperTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; From df8b64cff9550e80c794e93add4147940aa66e93 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 14:07:22 -0500 Subject: [PATCH 22/56] Snake case to camel case --- public/css.php | 40 +++++++++++----------- public/js.php | 92 +++++++++++++++++++++++++------------------------- public/min.php | 32 +++++++++--------- 3 files changed, 82 insertions(+), 82 deletions(-) diff --git a/public/css.php b/public/css.php index f9e81280..0faee554 100644 --- a/public/css.php +++ b/public/css.php @@ -23,21 +23,21 @@ require_once('./min.php'); */ class CSSMin extends BaseMin { - protected $css_root; - protected $path_from; - protected $path_to; + protected $cssRoot; + protected $pathFrom; + protected $pathTo; protected $group; - protected $last_modified; - protected $requested_time; + protected $lastModified; + protected $requestedTime; public function __construct(array $config, array $groups) { $group = $_GET['g']; - $this->css_root = $config['css_root']; - $this->path_from = $config['path_from']; - $this->path_to = $config['path_to']; + $this->cssRoot = $config['css_root']; + $this->pathFrom = $config['path_from']; + $this->pathTo = $config['path_to']; $this->group = $groups[$group]; - $this->last_modified = $this->get_last_modified(); + $this->lastModified = $this->getLastModified(); $this->send(); } @@ -49,14 +49,14 @@ class CSSMin extends BaseMin { */ protected function send() { - if($this->last_modified >= $this->get_if_modified() && $this->is_not_debug()) + if($this->lastModified >= $this->getIfModified() && $this->isNotDebug()) { throw new FileNotChangedException(); } $css = ( ! array_key_exists('debug', $_GET)) - ? $this->compress($this->get_css()) - : $this->get_css(); + ? $this->compress($this->getCss()) + : $this->getCss(); $this->output($css); } @@ -99,7 +99,7 @@ class CSSMin extends BaseMin { * * @return int */ - protected function get_last_modified() + protected function getLastModified() { $modified = []; @@ -108,8 +108,8 @@ class CSSMin extends BaseMin { { foreach($this->group as $file) { - $new_file = realpath("{$this->css_root}{$file}"); - $modified[] = filemtime($new_file); + $newFile = realpath("{$this->cssRoot}{$file}"); + $modified[] = filemtime($newFile); } } @@ -127,19 +127,19 @@ class CSSMin extends BaseMin { * * @return string */ - protected function get_css() + protected function getCss() { $css = ''; foreach($this->group as $file) { - $new_file = realpath("{$this->css_root}{$file}"); - $css .= file_get_contents($new_file); + $newFile = realpath("{$this->cssRoot}{$file}"); + $css .= file_get_contents($newFile); } // Correct paths that have changed due to concatenation // based on rules in the config file - $css = str_replace($this->path_from, $this->path_to, $css); + $css = str_replace($this->pathFrom, $this->pathTo, $css); return $css; } @@ -151,7 +151,7 @@ class CSSMin extends BaseMin { */ protected function output($css) { - $this->send_final_output($css, 'text/css', $this->last_modified); + $this->sendFinalOutput($css, 'text/css', $this->lastModified); } } diff --git a/public/js.php b/public/js.php index 8fa87bb5..ca97b19b 100644 --- a/public/js.php +++ b/public/js.php @@ -29,27 +29,27 @@ require_once('./min.php'); */ class JSMin extends BaseMin { - protected $js_root; - protected $js_group; - protected $js_groups_file; - protected $cache_file; + protected $jsRoot; + protected $jsGroup; + protected $jsGroupsFile; + protected $cacheFile; - protected $last_modified; - protected $requested_time; - protected $cache_modified; + protected $lastModified; + protected $requestedTime; + protected $cacheModified; public function __construct(array $config, array $groups) { $group = $_GET['g']; - $this->js_root = $config['js_root']; - $this->js_group = $groups[$group]; - $this->js_groups_file = $config['js_groups_file']; - $this->cache_file = "{$this->js_root}cache/{$group}"; - $this->last_modified = $this->get_last_modified(); + $this->jsRoot = $config['js_root']; + $this->jsGroup = $groups[$group]; + $this->jsGroupsFile = $config['js_groups_file']; + $this->cacheFile = "{$this->jsRoot}cache/{$group}"; + $this->lastModified = $this->getLastModified(); - $this->cache_modified = (is_file($this->cache_file)) - ? filemtime($this->cache_file) + $this->cacheModified = (is_file($this->cacheFile)) + ? filemtime($this->cacheFile) : 0; // Output some JS! @@ -59,24 +59,24 @@ class JSMin extends BaseMin { protected function send() { // Override caching if debug key is set - if($this->is_debug_call()) + if($this->isDebugCall()) { - return $this->output($this->get_files()); + return $this->output($this->getFiles()); } // If the browser's cached version is up to date, // don't resend the file - if($this->last_modified == $this->get_if_modified() && $this->is_not_debug()) + if($this->lastModified == $this->getIfModified() && $this->isNotDebug()) { throw new FileNotChangedException(); } - if($this->cache_modified < $this->last_modified) + if($this->cacheModified < $this->lastModified) { - $js = $this->minify($this->get_files()); + $js = $this->minify($this->getFiles()); //Make sure cache file gets created/updated - if (file_put_contents($this->cache_file, $js) === FALSE) + if (file_put_contents($this->cacheFile, $js) === FALSE) { echo 'Cache file was not created. Make sure you have the correct folder permissions.'; return; @@ -86,7 +86,7 @@ class JSMin extends BaseMin { } else { - return $this->output(file_get_contents($this->cache_file)); + return $this->output(file_get_contents($this->cacheFile)); } } @@ -96,7 +96,7 @@ class JSMin extends BaseMin { * @param array $options - Form parameters * @return object */ - protected function closure_call(array $options) + protected function closureCall(array $options) { $formFields = http_build_query($options); @@ -123,19 +123,19 @@ class JSMin extends BaseMin { * @param array $options * @return void */ - protected function check_minify_errors($options) + protected function checkMinifyErrors($options) { - $error_res = $this->closure_call($options); - $error_json = $error_res->getBody(); - $error_obj = Json::decode($error_json) ?: (object)[]; + $errorRes = $this->closureCall($options); + $errorJson = $errorRes->getBody(); + $errorObj = Json::decode($errorJson) ?: (object)[]; // Show error if exists - if ( ! empty($error_obj->errors) || ! empty($error_obj->serverErrors)) + if ( ! empty($errorObj->errors) || ! empty($errorObj->serverErrors)) { - $error_json = Json::encode($error_obj, JSON_PRETTY_PRINT); + $errorJson = Json::encode($errorObj, JSON_PRETTY_PRINT); header('Content-type: application/javascript'); - echo "console.error(${error_json});"; + echo "console.error(${errorJson});"; die(); } } @@ -148,14 +148,14 @@ class JSMin extends BaseMin { * * @return string */ - protected function get_files() + protected function getFiles() { $js = ''; - foreach($this->js_group as $file) + foreach($this->jsGroup as $file) { - $new_file = realpath("{$this->js_root}{$file}"); - $js .= file_get_contents($new_file) . "\n\n"; + $newFile = realpath("{$this->jsRoot}{$file}"); + $js .= file_get_contents($newFile) . "\n\n"; } return $js; @@ -166,24 +166,24 @@ class JSMin extends BaseMin { * * @return int */ - protected function get_last_modified() + protected function getLastModified() { $modified = []; - foreach($this->js_group as $file) + foreach($this->jsGroup as $file) { - $new_file = realpath("{$this->js_root}{$file}"); - $modified[] = filemtime($new_file); + $newFile = realpath("{$this->jsRoot}{$file}"); + $modified[] = filemtime($newFile); } //Add this page too, as well as the groups file $modified[] = filemtime(__FILE__); - $modified[] = filemtime($this->js_groups_file); + $modified[] = filemtime($this->jsGroupsFile); rsort($modified); - $last_modified = $modified[0]; + $lastModified = $modified[0]; - return $last_modified; + return $lastModified; } /** @@ -205,11 +205,11 @@ class JSMin extends BaseMin { ]; // Check for errors - $this->check_minify_errors($options); + $this->checkMinifyErrors($options); // Now actually retrieve the compiled code $options['output_info'] = 'compiled_code'; - $res = $this->closure_call($options); + $res = $this->closureCall($options); $json = $res->getBody(); $obj = Json::decode($json); @@ -225,7 +225,7 @@ class JSMin extends BaseMin { */ protected function output($js) { - $this->send_final_output($js, 'application/javascript', $this->last_modified); + $this->sendFinalOutput($js, 'application/javascript', $this->lastModified); } } @@ -235,11 +235,11 @@ class JSMin extends BaseMin { $config = require_once('../app/appConf/minify_config.php'); $groups = require_once($config['js_groups_file']); -$cache_dir = "{$config['js_root']}cache"; +$cacheDir = "{$config['js_root']}cache"; -if ( ! is_dir($cache_dir)) +if ( ! is_dir($cacheDir)) { - mkdir($cache_dir); + mkdir($cacheDir); } if ( ! array_key_exists($_GET['g'], $groups)) diff --git a/public/min.php b/public/min.php index c0ef92a4..77542046 100644 --- a/public/min.php +++ b/public/min.php @@ -17,10 +17,10 @@ namespace Aviat\EasyMin; $pi = $_SERVER['PATH_INFO']; $pia = explode('/', $pi); -$pia_len = count($pia); +$piaLen = count($pia); $i = 1; -while($i < $pia_len) +while($i < $piaLen) { $j = $i+1; $j = (isset($pia[$j])) ? $j : $i; @@ -38,7 +38,7 @@ class BaseMin { * * @return int - timestamp to compare for cache control */ - protected function get_if_modified() + protected function getIfModified() { return (array_key_exists('HTTP_IF_MODIFIED_SINCE', $_SERVER)) ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) @@ -50,7 +50,7 @@ class BaseMin { * * @return string - the etag to compare */ - protected function get_if_none_match() + protected function getIfNoneMatch() { return (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER)) ? $_SERVER['HTTP_IF_NONE_MATCH'] @@ -62,9 +62,9 @@ class BaseMin { * * @return boolean */ - protected function is_not_debug() + protected function isNotDebug() { - return ! $this->is_debug_call(); + return ! $this->isDebugCall(); } /** @@ -72,7 +72,7 @@ class BaseMin { * * @return boolean */ - protected function is_debug_call() + protected function isDebugCall() { return array_key_exists('debug', $_GET); } @@ -81,24 +81,24 @@ class BaseMin { * Send actual output to browser * * @param string $content - the body of the response - * @param string $mime_type - the content type - * @param int $last_modified - the last modified date + * @param string $mimeType - the content type + * @param int $lastModified - the last modified date * @return void */ - protected function send_final_output($content, $mime_type, $last_modified) + protected function sendFinalOutput($content, $mimeType, $lastModified) { //This GZIPs the CSS for transmission to the user //making file size smaller and transfer rate quicker ob_start("ob_gzhandler"); - $expires = $last_modified + 691200; - $last_modified_date = gmdate('D, d M Y H:i:s', $last_modified); - $expires_date = gmdate('D, d M Y H:i:s', $expires); + $expires = $lastModified + 691200; + $lastModifiedDate = gmdate('D, d M Y H:i:s', $lastModified); + $expiresDate = gmdate('D, d M Y H:i:s', $expires); - header("Content-Type: {$mime_type}; charset=utf8"); + header("Content-Type: {$mimeType}; charset=utf8"); header("Cache-control: public, max-age=691200, must-revalidate"); - header("Last-Modified: {$last_modified_date} GMT"); - header("Expires: {$expires_date} GMT"); + header("Last-Modified: {$lastModifiedDate} GMT"); + header("Expires: {$expiresDate} GMT"); echo $content; From 1224882092313d7b6b31f80aeb941df052b80735 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 14:08:15 -0500 Subject: [PATCH 23/56] Javascript style fixes --- public/js/anime_edit.js | 23 +++++++++++------------ public/js/base/AnimeClient.js | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/public/js/anime_edit.js b/public/js/anime_edit.js index 37bb5a68..57cc24ad 100644 --- a/public/js/anime_edit.js +++ b/public/js/anime_edit.js @@ -7,28 +7,28 @@ // Action to increment episode count _.on('body.anime.list', 'click', '.plus_one', e => { - let parent_sel = _.closestParent(e.target, 'article'); - let watched_count = parseInt(_.$('.completed_number', parent_sel)[0].textContent, 10); - let total_count = parseInt(_.$('.total_number', parent_sel)[0].textContent, 10); - let title = _.$('.name a', parent_sel)[0].textContent; + let parentSel = _.closestParent(e.target, 'article'); + let watchedCount = parseInt(_.$('.completed_number', parentSel)[0].textContent, 10); + let totalCount = parseInt(_.$('.total_number', parentSel)[0].textContent, 10); + let title = _.$('.name a', parentSel)[0].textContent; // Setup the update data let data = { - id: parent_sel.dataset.kitsuId, - mal_id: parent_sel.dataset.malId, + id: parentSel.dataset.kitsuId, + mal_id: parentSel.dataset.malId, data: { - progress: watched_count + 1 + progress: watchedCount + 1 } }; // If the episode count is 0, and incremented, // change status to currently watching - if (isNaN(watched_count) || watched_count === 0) { + if (isNaN(watchedCount) || watchedCount === 0) { data.data.status = 'current'; } // If you increment at the last episode, mark as completed - if (( ! isNaN(watched_count)) && (watched_count + 1) == total_count) { + if (( ! isNaN(watchedCount)) && (watchedCount + 1) == totalCount) { data.data.status = 'completed'; } @@ -39,15 +39,14 @@ type: 'POST', success: () => { if (data.data.status == 'completed') { - _.hide(parent_sel); + _.hide(parentSel); } _.showMessage('success', `Successfully updated ${title}`); - _.$('.completed_number', parent_sel)[0].textContent = ++watched_count; + _.$('.completed_number', parentSel)[0].textContent = ++watchedCount; _.scrollToTop(); }, error: (xhr, errorType, error) => { - console.error(error); _.showMessage('error', `Failed to update ${title}. `); _.scrollToTop(); } diff --git a/public/js/base/AnimeClient.js b/public/js/base/AnimeClient.js index e07ea9cb..92614baf 100644 --- a/public/js/base/AnimeClient.js +++ b/public/js/base/AnimeClient.js @@ -26,7 +26,7 @@ var AnimeClient = (function(w) { * @return {array} - array of dom elements */ $(selector, context) { - if (typeof selector != "string" || selector === undefined) { + if (typeof selector !== "string") { return selector; } @@ -200,7 +200,7 @@ var AnimeClient = (function(w) { delegateEvent(el, target, event, listener); }); } - } + }; // ------------------------------------------------------------------------- // ! Ajax From 29c04e62be78ac7e228315c7dbc893771b815923 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 15:35:41 -0500 Subject: [PATCH 24/56] More code styles fixes --- src/Controller/Anime.php | 16 +++++++------- src/Controller/Collection.php | 8 +++---- src/Controller/Manga.php | 4 ++-- src/Model/AnimeCollection.php | 24 ++++++++++----------- src/Model/Collection.php | 40 ++++++++++++++++------------------- src/Model/DB.php | 10 ++++----- tests/DispatcherTest.php | 4 ++-- 7 files changed, 51 insertions(+), 55 deletions(-) diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index e525e143..baac5d8d 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -122,7 +122,7 @@ class Anime extends BaseController { * * @return void */ - public function add_form() + public function addForm() { $statuses = [ AnimeWatchingStatus::WATCHING => 'Currently Watching', @@ -220,17 +220,17 @@ class Anime extends BaseController { * * @return void */ - public function form_update() + public function formUpdate() { $data = $this->request->getParsedBody(); // Do some minor data manipulation for // large form-based updates $transformer = new AnimeListTransformer(); - $post_data = $transformer->untransform($data); - $full_result = $this->model->updateLibraryItem($post_data); + $postData = $transformer->untransform($data); + $fullResult = $this->model->updateLibraryItem($postData); - if ($full_result['statusCode'] === 200) + if ($fullResult['statusCode'] === 200) { $this->set_flash_message("Successfully updated.", 'success'); $this->cache->clear(); @@ -291,12 +291,12 @@ class Anime extends BaseController { /** * View details of an anime * - * @param string $anime_id + * @param string $animeId * @return void */ - public function details($anime_id) + public function details($animeId) { - $data = $this->model->getAnime($anime_id); + $data = $this->model->getAnime($animeId); $this->outputHTML('anime/details', [ 'title' => 'Anime · ' . $data['titles'][0], diff --git a/src/Controller/Collection.php b/src/Controller/Collection.php index eee00bc4..88352c53 100644 --- a/src/Controller/Collection.php +++ b/src/Controller/Collection.php @@ -91,17 +91,17 @@ class Collection extends BaseController { */ public function index($view) { - $view_map = [ + $viewMap = [ '' => 'cover', 'list' => 'list' ]; - $data = $this->animeCollectionModel->get_collection(); + $data = $this->animeCollectionModel->getCollection(); - $this->outputHTML('collection/' . $view_map[$view], [ + $this->outputHTML('collection/' . $viewMap[$view], [ 'title' => $this->config->get('whose_list') . "'s Anime Collection", 'sections' => $data, - 'genres' => $this->animeCollectionModel->get_genre_list() + 'genres' => $this->animeCollectionModel->getGenreList() ]); } diff --git a/src/Controller/Manga.php b/src/Controller/Manga.php index f493522b..6cfd1e2a 100644 --- a/src/Controller/Manga.php +++ b/src/Controller/Manga.php @@ -101,7 +101,7 @@ class Manga extends Controller { * * @return void */ - public function add_form() + public function addForm() { $raw_status_list = MangaReadingStatus::getConstList(); @@ -190,7 +190,7 @@ class Manga extends Controller { * * @return void */ - public function form_update() + public function formUpdate() { $data = $this->request->getParsedBody(); diff --git a/src/Model/AnimeCollection.php b/src/Model/AnimeCollection.php index 42312ad3..99a47fc1 100644 --- a/src/Model/AnimeCollection.php +++ b/src/Model/AnimeCollection.php @@ -31,9 +31,9 @@ class AnimeCollection extends Collection { * * @return array */ - public function get_collection() + public function getCollection() { - $raw_collection = $this->_get_collection(); + $raw_collection = $this->_getCollection(); $collection = []; @@ -57,7 +57,7 @@ class AnimeCollection extends Collection { * * @return array */ - public function get_media_type_list() + public function getMediaTypeList() { $output = []; @@ -79,7 +79,7 @@ class AnimeCollection extends Collection { * @param int $id * @return array */ - public function get_collection_entry($id) + public function getCollectionEntry($id) { $query = $this->db->from('anime_set') ->where('hummingbird_id', (int)$id) @@ -93,9 +93,9 @@ class AnimeCollection extends Collection { * * @return array */ - private function _get_collection() + private function _getCollection() { - if ( ! $this->valid_database) + if ( ! $this->validDatabase) { return []; } @@ -119,7 +119,7 @@ class AnimeCollection extends Collection { */ public function add($data) { - $anime = (object)$this->anime_model->getAnimeById($data['id']); + $anime = (object)$this->animeModel->getAnimeById($data['id']); $this->db->set([ 'hummingbird_id' => $data['id'], 'slug' => $anime->slug, @@ -134,7 +134,7 @@ class AnimeCollection extends Collection { 'notes' => $data['notes'] ])->insert('anime_set'); - $this->update_genre($data['id']); + $this->updateGenre($data['id']); } /** @@ -201,13 +201,13 @@ class AnimeCollection extends Collection { * @param int $anime_id The current anime * @return void */ - private function update_genre($anime_id) + private function updateGenre($anime_id) { - $genre_info = $this->get_genre_data(); + $genre_info = $this->getGenreData(); extract($genre_info); // Get api information - $anime = $this->anime_model->getAnimeById($anime_id); + $anime = $this->animeModel->getAnimeById($anime_id); foreach ($anime['genres'] as $genre) { @@ -248,7 +248,7 @@ class AnimeCollection extends Collection { * * @return array */ - private function get_genre_data() + private function getGenreData() { $genres = []; $links = []; diff --git a/src/Model/Collection.php b/src/Model/Collection.php index e3ff607c..80c4822c 100644 --- a/src/Model/Collection.php +++ b/src/Model/Collection.php @@ -16,10 +16,8 @@ namespace Aviat\AnimeClient\Model; - -use Aviat\Ion\Di\ContainerAware; -use Aviat\Ion\Di\ContainerInterface; -use Aviat\Ion\Model\DB; +use Aviat\AnimeClient\Model\DB; +use Aviat\Ion\Di\{ContainerAware, ContainerInterface}; use PDO; use PDOException; @@ -32,15 +30,15 @@ class Collection extends DB { /** * Anime API Model - * @var object $anime_model + * @var object $animeModel */ - protected $anime_model; + protected $animeModel; /** * Whether the database is valid for querying * @var boolean */ - protected $valid_database = FALSE; + protected $validDatabase = FALSE; /** * Create a new collection object @@ -48,41 +46,39 @@ class Collection extends DB { * @param ContainerInterface $container */ public function __construct(ContainerInterface $container) - { - $this->container = $container; - - parent::__construct($container->get('config')); + { + parent::__construct($container); try { - $this->db = \Query($this->db_config['collection']); + $this->db = \Query($this->dbConfig['collection']); } catch (PDOException $e) { - //$this->valid_database = FALSE; + //$this->validDatabase = FALSE; //return FALSE; } - $this->anime_model = $container->get('anime-model'); + $this->animeModel = $container->get('anime-model'); // Is database valid? If not, set a flag so the // app can be run without a valid database - if ($this->db_config['collection']['type'] === 'sqlite') + if ($this->dbConfig['collection']['type'] === 'sqlite') { - $db_file_name = $this->db_config['collection']['file']; + $dbFileName = $this->dbConfig['collection']['file']; - if ($db_file_name !== ':memory:' && file_exists($db_file_name)) + if ($dbFileName !== ':memory:' && file_exists($dbFileName)) { - $db_file = file_get_contents($db_file_name); - $this->valid_database = (strpos($db_file, 'SQLite format 3') === 0); + $dbFile = file_get_contents($dbFileName); + $this->validDatabase = (strpos($dbFile, 'SQLite format 3') === 0); } else { - $this->valid_database = FALSE; + $this->validDatabase = FALSE; } } else { - $this->valid_database = TRUE; + $this->validDatabase = TRUE; } } @@ -92,7 +88,7 @@ class Collection extends DB { * @param array $filter * @return array */ - public function get_genre_list($filter = []) + public function getGenreList($filter = []) { $this->db->select('hummingbird_id, genre') ->from('genre_anime_set_link gl') diff --git a/src/Model/DB.php b/src/Model/DB.php index dcacd4d6..c63dc771 100644 --- a/src/Model/DB.php +++ b/src/Model/DB.php @@ -16,14 +16,14 @@ namespace Aviat\AnimeClient\Model; -use Aviat\Ion\Di\ContainerInterface; +use Aviat\Ion\Di\{ContainerAware, ContainerInterface}; use Aviat\Ion\Model; /** * Base model for database interaction */ class DB extends Model { - use \Aviat\Ion\Di\ContainerAware; + use ContainerAware; /** * The query builder object @@ -33,9 +33,9 @@ class DB extends Model { /** * The database connection information array - * @var array $db_config + * @var array $dbConfig */ - protected $db_config; + protected $dbConfig = []; /** * Constructor @@ -44,7 +44,7 @@ class DB extends Model { */ public function __construct(ContainerInterface $container) { - $this->db_config = $container->get('config')->get('database'); + $this->dbConfig = $container->get('config')->get('database'); $this->setContainer($container); } } diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 05ad50c2..e62b7e1f 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -199,7 +199,7 @@ class DispatcherTest extends AnimeClient_TestCase { public function dataGetControllerList() { - return array( + return [ 'controller_list_sanity_check' => [ 'config' => [ 'routes' => [ @@ -242,7 +242,7 @@ class DispatcherTest extends AnimeClient_TestCase { 'collection' => 'Aviat\AnimeClient\Controller\Collection', ] ] - ); + ]; } /** From 8cbfaf3646d015b440aed0a9c6eb5e3e8b384502 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 15:56:10 -0500 Subject: [PATCH 25/56] More snake case to camel case --- app/appConf/routes.php | 6 ++--- app/views/anime/add.php | 2 +- app/views/anime/cover.php | 2 +- app/views/anime/edit.php | 2 +- app/views/anime/list.php | 2 +- app/views/collection/add.php | 2 +- app/views/collection/edit.php | 2 +- app/views/collection/list.php | 8 +++--- app/views/footer.php | 2 +- app/views/header.php | 4 +-- app/views/main-menu.php | 8 +++--- app/views/manga/add.php | 2 +- app/views/manga/cover.php | 2 +- app/views/manga/list.php | 6 ++--- src/Controller.php | 2 +- src/Controller/Collection.php | 8 +++--- src/UrlGenerator.php | 40 +++++++++------------------- tests/DispatcherTest.php | 6 ++--- tests/UrlGeneratorTest.php | 49 ++--------------------------------- 19 files changed, 48 insertions(+), 107 deletions(-) diff --git a/app/appConf/routes.php b/app/appConf/routes.php index 4ead95bf..cb5f2fa1 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -53,7 +53,7 @@ return [ // --------------------------------------------------------------------- 'anime.add.get' => [ 'path' => '/anime/add', - 'action' => 'add_form', + 'action' => 'addForm', 'verb' => 'get', ], 'anime.add.post' => [ @@ -82,7 +82,7 @@ return [ ], 'manga.add.get' => [ 'path' => '/manga/add', - 'action' => 'add_form', + 'action' => 'addForm', 'verb' => 'get', ], 'manga.add.post' => [ @@ -183,7 +183,7 @@ return [ ], 'update.post' => [ 'path' => '/{controller}/update_form', - 'action' => 'form_update', + 'action' => 'formUpdate', 'verb' => 'post', 'tokens' => [ 'controller' => '[a-z_]+', diff --git a/app/views/anime/add.php b/app/views/anime/add.php index fac82700..1818fa02 100644 --- a/app/views/anime/add.php +++ b/app/views/anime/add.php @@ -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..61a1b9b2 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -86,5 +86,5 @@ is_authenticated()): ?> - + \ No newline at end of file diff --git a/app/views/anime/edit.php b/app/views/anime/edit.php index 75cc7578..e01d90f9 100644 --- a/app/views/anime/edit.php +++ b/app/views/anime/edit.php @@ -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..4f08e588 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -87,4 +87,4 @@ is_authenticated()) ? 'table_edit' : 'table' ?> - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/collection/add.php b/app/views/collection/add.php index 61c3a7e1..64f472c0 100644 --- a/app/views/collection/add.php +++ b/app/views/collection/add.php @@ -39,5 +39,5 @@ - + \ No newline at end of file diff --git a/app/views/collection/edit.php b/app/views/collection/edit.php index 0d1add75..67bb7bec 100644 --- a/app/views/collection/edit.php +++ b/app/views/collection/edit.php @@ -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..71b48d51 100644 --- a/app/views/collection/list.php +++ b/app/views/collection/list.php @@ -1,6 +1,6 @@
is_authenticated()): ?> -Add Item +Add Item

There's nothing here!

@@ -26,8 +26,8 @@ is_authenticated()): ?> - ">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..e49e45f2 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -7,8 +7,8 @@ - - + +
diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 3e0111ca..e7c5c67d 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -2,19 +2,19 @@

- + 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()): ?> diff --git a/app/views/manga/add.php b/app/views/manga/add.php index d0a3efd3..fcda2f2b 100644 --- a/app/views/manga/add.php +++ b/app/views/manga/add.php @@ -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..4f0e65d2 100644 --- a/app/views/manga/cover.php +++ b/app/views/manga/cover.php @@ -56,5 +56,5 @@ is_authenticated()): ?> - + \ No newline at end of file diff --git a/app/views/manga/list.php b/app/views/manga/list.php index 7a44d851..506397e6 100644 --- a/app/views/manga/list.php +++ b/app/views/manga/list.php @@ -1,7 +1,7 @@
-is_authenticated()): ?> +is_authenticated()): ?> Add Item - +

There's nothing here!

@@ -47,4 +47,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/Controller.php b/src/Controller.php index a2a60be3..284673e3 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -125,7 +125,7 @@ class Controller { public function redirectToDefaultRoute() { $default_type = $this->config->get(['routes', 'route_config', 'default_list']); - $this->redirect($this->urlGenerator->default_url($default_type), 303); + $this->redirect($this->urlGenerator->defaultUrl($default_type), 303); } /** diff --git a/src/Controller/Collection.php b/src/Controller/Collection.php index 88352c53..25f667b8 100644 --- a/src/Controller/Collection.php +++ b/src/Controller/Collection.php @@ -17,8 +17,10 @@ namespace Aviat\AnimeClient\Controller; use Aviat\AnimeClient\Controller as BaseController; -use Aviat\AnimeClient\Model\Anime as AnimeModel; -use Aviat\AnimeClient\Model\AnimeCollection as AnimeCollectionModel; +use Aviat\AnimeClient\Model\{ + Anime as AnimeModel, + AnimeCollection as AnimeCollectionModel +}; use Aviat\AnimeClient\UrlGenerator; use Aviat\Ion\Di\ContainerInterface; @@ -119,7 +121,7 @@ class Collection extends BaseController { $this->outputHTML('collection/' . strtolower($action), [ 'action' => $action, - 'action_url' => $this->urlGenerator->full_url('collection/' . strtolower($action)), + 'action_url' => $this->urlGenerator->fullUrl('collection/' . strtolower($action)), 'title' => $this->config->get('whose_list') . " Anime Collection · {$action}", 'media_items' => $this->animeCollectionModel->get_media_type_list(), 'item' => ($action === "Edit") ? $this->animeCollectionModel->get($id) : [] diff --git a/src/UrlGenerator.php b/src/UrlGenerator.php index 88970b08..95df8f5c 100644 --- a/src/UrlGenerator.php +++ b/src/UrlGenerator.php @@ -17,6 +17,7 @@ namespace Aviat\AnimeClient; use Aviat\Ion\Di\ContainerInterface; +use InvalidArgumentException; /** * UrlGenerator class. @@ -45,33 +46,16 @@ class UrlGenerator extends RoutingBase { * * @return string */ - public function asset_url() + public function assetUrl(...$args) { - $args = func_get_args(); - $base_url = rtrim($this->url(""), '/'); + $baseUrl = rtrim($this->url(""), '/'); + $baseUrl = "{$baseUrl}" . $this->__get("asset_path"); - $base_url = "{$base_url}" . $this->__get("asset_path"); - - array_unshift($args, $base_url); + array_unshift($args, $baseUrl); return implode("/", $args); } - /** - * Get the base url from the config - * - * @param string $type - (optional) The controller - * @return string - */ - public function base_url($type = "anime") - { - $config_path = trim($this->__get("{$type}_path"), "/"); - - $path = ($config_path !== '') ? $config_path : ""; - - return implode("/", ['/', $this->host, $path]); - } - /** * Generate a proper url from the path * @@ -108,20 +92,20 @@ class UrlGenerator extends RoutingBase { * Full default path for the list pages * * @param string $type - * @throws \InvalidArgumentException + * @throws InvalidArgumentException * @return string */ - public function default_url($type) + public function defaultUrl($type) { $type = trim($type); - $default_path = $this->__get("default_{$type}_list_path"); + $defaultPath = $this->__get("default_{$type}_list_path"); - if ( ! is_null($default_path)) + if ( ! is_null($defaultPath)) { - return $this->url("{$type}/{$default_path}"); + return $this->url("{$type}/{$defaultPath}"); } - throw new \InvalidArgumentException("Invalid default type: '{$type}'"); + throw new InvalidArgumentException("Invalid default type: '{$type}'"); } /** @@ -131,7 +115,7 @@ class UrlGenerator extends RoutingBase { * @param string $type - (optional) The controller (anime or manga), defaults to anime * @return string */ - public function full_url($path = "", $type = "anime") + public function fullUrl($path = "", $type = "anime") { $config_default_route = $this->__get("default_{$type}_path"); diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index e62b7e1f..63f85465 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -190,11 +190,11 @@ class DispatcherTest extends AnimeClient_TestCase { ]; $this->doSetUp($config, "/", "localhost"); - $this->assertEquals('//localhost/manga/all', $this->urlGenerator->default_url('manga'), "Incorrect default url"); - $this->assertEquals('//localhost/anime/watching', $this->urlGenerator->default_url('anime'), "Incorrect default url"); + $this->assertEquals('//localhost/manga/all', $this->urlGenerator->defaultUrl('manga'), "Incorrect default url"); + $this->assertEquals('//localhost/anime/watching', $this->urlGenerator->defaultUrl('anime'), "Incorrect default url"); $this->expectException(\InvalidArgumentException::class); - $this->urlGenerator->default_url('foo'); + $this->urlGenerator->defaultUrl('foo'); } public function dataGetControllerList() diff --git a/tests/UrlGeneratorTest.php b/tests/UrlGeneratorTest.php index 6faca7c9..4a77a096 100644 --- a/tests/UrlGeneratorTest.php +++ b/tests/UrlGeneratorTest.php @@ -32,8 +32,7 @@ class UrlGeneratorTest extends AnimeClient_TestCase { { $urlGenerator = new UrlGenerator($this->container); - $result = call_user_func_array([$urlGenerator, 'asset_url'], $args); - + $result = $urlGenerator->assetUrl(...$args); $this->assertEquals($expected, $result); } @@ -88,51 +87,7 @@ class UrlGeneratorTest extends AnimeClient_TestCase { $this->container->setInstance('config', $config); $urlGenerator = new UrlGenerator($this->container); - $result = $urlGenerator->full_url($path, $type); - - $this->assertEquals($expected, $result); - } - - public function dataBaseUrl() - { - $config = [ - 'routes' => [ - 'routes' => [], - 'route_config' => [ - 'anime_path' => 'anime', - 'manga_path' => 'manga', - 'default_list' => 'manga', - 'default_anime_path' => '/watching', - 'default_manga_path' => '/all', - 'default_to_list_view' => TRUE, - ], - ] - ]; - - return [ - 'path_based_routing_anime' => [ - 'config' => $config, - 'type' => 'anime', - 'expected' => '//localhost/anime' - ], - 'path_based_routing_manga' => [ - 'config' => $config, - 'type' => 'manga', - 'expected' => '//localhost/manga' - ] - ]; - } - - /** - * @dataProvider dataBaseUrl - */ - public function testBaseUrl($config, $type, $expected) - { - $config = new Config($config); - $this->container->setInstance('config', $config); - $urlGenerator = new UrlGenerator($this->container); - - $result = $urlGenerator->base_url($type); + $result = $urlGenerator->fullUrl($path, $type); $this->assertEquals($expected, $result); } From c96a3bbd508dc06d966ba80b67edc1698a8de467 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 16:11:52 -0500 Subject: [PATCH 26/56] Snake case to camel case --- tests/DispatcherTest.php | 10 +++++----- tests/RoutingBaseTest.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 63f85465..54884117 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -55,7 +55,7 @@ class DispatcherTest extends AnimeClient_TestCase { public function dataRoute() { - $default_config = [ + $defaultConfig = [ 'routes' => [ 'routes' => [ 'login_form' => [ @@ -94,25 +94,25 @@ class DispatcherTest extends AnimeClient_TestCase { $data = [ 'anime_default_routing_manga' => [ - 'config' => $default_config, + 'config' => $defaultConfig, 'controller' => 'manga', 'host' => "localhost", 'uri' => "/manga/plan_to_read", ], 'manga_default_routing_anime' => [ - 'config' => $default_config, + 'config' => $defaultConfig, 'controller' => 'anime', 'host' => "localhost", 'uri' => "/anime/watching", ], 'anime_default_routing_anime' => [ - 'config' => $default_config, + 'config' => $defaultConfig, 'controller' => 'anime', 'host' => 'localhost', 'uri' => '/anime/watching', ], 'manga_default_routing_manga' => [ - 'config' => $default_config, + 'config' => $defaultConfig, 'controller' => 'manga', 'host' => 'localhost', 'uri' => '/manga/plan_to_read' diff --git a/tests/RoutingBaseTest.php b/tests/RoutingBaseTest.php index f514972a..77ed9965 100644 --- a/tests/RoutingBaseTest.php +++ b/tests/RoutingBaseTest.php @@ -33,7 +33,7 @@ class RoutingBaseTest extends AnimeClient_TestCase { /** * @dataProvider dataSegments */ - public function testSegments($requestUri, $path, $segments, $last_segment) + public function testSegments($requestUri, $path, $segments, $lastSegment) { $this->setSuperGlobals([ '_SERVER' => [ @@ -43,7 +43,7 @@ class RoutingBaseTest extends AnimeClient_TestCase { $this->assertEquals($path, $this->routingBase->path(), "Path is invalid"); $this->assertEquals($segments, $this->routingBase->segments(), "Segments array is invalid"); - $this->assertEquals($last_segment, $this->routingBase->last_segment(), "Last segment is invalid"); + $this->assertEquals($lastSegment, $this->routingBase->last_segment(), "Last segment is invalid"); foreach($segments as $i => $value) { From db07976403436726af3cb0cf7d9fd8f57a3a4c7c Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 16:13:32 -0500 Subject: [PATCH 27/56] Update header comments --- app/appConf/base_config.php | 13 ++++++------ app/appConf/menus.php | 13 ++++++------ app/appConf/minify_config.php | 12 +++++------ app/appConf/minify_css_groups.php | 13 ++++++------ app/appConf/minify_js_groups.php | 13 ++++++------ app/appConf/routes.php | 13 ++++++------ app/bootstrap.php | 4 ++-- build/header_comment.txt | 4 ++-- public/css.php | 9 +++++---- public/js.php | 8 ++++---- public/js/base/events.js | 6 +++--- public/min.php | 20 +++++++++++-------- src/API/APIRequestBuilder.php | 4 ++-- src/API/AbstractListItem.php | 4 ++-- src/API/CacheTrait.php | 4 ++-- src/API/FailedResponseException.php | 4 ++-- src/API/JsonAPI.php | 4 ++-- src/API/Kitsu.php | 4 ++-- src/API/Kitsu/Auth.php | 4 ++-- src/API/Kitsu/Enum/AnimeAiringStatus.php | 4 ++-- src/API/Kitsu/Enum/AnimeWatchingStatus.php | 4 ++-- src/API/Kitsu/Enum/MangaReadingStatus.php | 4 ++-- src/API/Kitsu/KitsuRequestBuilder.php | 4 ++-- src/API/Kitsu/KitsuTrait.php | 4 ++-- src/API/Kitsu/ListItem.php | 4 ++-- src/API/Kitsu/Model.php | 4 ++-- .../Transformer/AnimeListTransformer.php | 4 ++-- .../Kitsu/Transformer/AnimeTransformer.php | 4 ++-- .../Transformer/MangaListTransformer.php | 4 ++-- .../Kitsu/Transformer/MangaTransformer.php | 4 ++-- src/API/ListItemInterface.php | 4 ++-- src/API/MAL.php | 4 ++-- src/API/MAL/Enum/AnimeWatchingStatus.php | 4 ++-- src/API/MAL/Enum/MangaReadingStatus.php | 4 ++-- src/API/MAL/ListItem.php | 4 ++-- src/API/MAL/MALRequestBuilder.php | 4 ++-- src/API/MAL/MALTrait.php | 4 ++-- src/API/MAL/Model.php | 4 ++-- .../MAL/Transformer/AnimeListTransformer.php | 4 ++-- src/API/XML.php | 4 ++-- src/Command/BaseCommand.php | 4 ++-- src/Command/ClearCache.php | 4 ++-- src/Command/SyncKitsuWithMal.php | 4 ++-- src/Controller/Anime.php | 4 ++-- src/Controller/Collection.php | 4 ++-- src/Controller/Manga.php | 4 ++-- src/Helper/Menu.php | 4 ++-- src/Model/API.php | 4 ++-- src/Model/Anime.php | 4 ++-- src/Model/AnimeCollection.php | 4 ++-- src/Model/Collection.php | 4 ++-- src/Model/DB.php | 4 ++-- src/Model/Manga.php | 4 ++-- tests/API/APIRequestBuilderTest.php | 4 ++-- tests/API/CacheTraitTest.php | 4 ++-- tests/API/JsonAPITest.php | 4 ++-- .../Transformer/AnimeListTransformerTest.php | 4 ++-- .../Transformer/AnimeTransformerTest.php | 4 ++-- .../Transformer/MangaListTransformerTest.php | 4 ++-- .../Transformer/MangaTransformerTest.php | 4 ++-- tests/API/KitsuTest.php | 4 ++-- tests/API/XMLTest.php | 4 ++-- tests/Command/BaseCommandTest.php | 4 ++-- tests/Helper/MenuHelperTest.php | 4 ++-- 64 files changed, 173 insertions(+), 163 deletions(-) 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 cb5f2fa1..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 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/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/public/css.php b/public/css.php index 0faee554..72870935 100644 --- a/public/css.php +++ b/public/css.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 */ + namespace Aviat\EasyMin; require_once('./min.php'); diff --git a/public/js.php b/public/js.php index ca97b19b..36e0e206 100644 --- a/public/js.php +++ b/public/js.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/public/js/base/events.js b/public/js/base/events.js index 9ec6e1ab..a59ce1c0 100644 --- a/public/js/base/events.js +++ b/public/js/base/events.js @@ -11,7 +11,7 @@ }); // Confirm deleting of list or library items - ac.on('form.js-delete', 'submit', function (event) { + ac.on('form.js-delete', 'submit', event => { let proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?"); if (proceed === false) { @@ -21,9 +21,9 @@ }); // Clear the api cache - ac.on('.js-clear-cache', 'click', function () { + ac.on('.js-clear-cache', 'click', () => { ac.get('/cache_purge', () => { - ac.showMessage('success', `Sucessfully purged api cache`); + ac.showMessage('success', `Successfully purged api cache`); }); }); diff --git a/public/min.php b/public/min.php index 77542046..200443ff 100644 --- a/public/min.php +++ b/public/min.php @@ -1,16 +1,20 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient */ + namespace Aviat\EasyMin; //Creative rewriting of /g/groupname to ?g=groupname diff --git a/src/API/APIRequestBuilder.php b/src/API/APIRequestBuilder.php index 4a96f63b..0c7a309a 100644 --- a/src/API/APIRequestBuilder.php +++ b/src/API/APIRequestBuilder.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/src/API/AbstractListItem.php b/src/API/AbstractListItem.php index 716f65f4..11f1f821 100644 --- a/src/API/AbstractListItem.php +++ b/src/API/AbstractListItem.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/src/API/CacheTrait.php b/src/API/CacheTrait.php index 211c3977..4e32926c 100644 --- a/src/API/CacheTrait.php +++ b/src/API/CacheTrait.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/src/API/FailedResponseException.php b/src/API/FailedResponseException.php index 648bb83d..3952a13e 100644 --- a/src/API/FailedResponseException.php +++ b/src/API/FailedResponseException.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/src/API/JsonAPI.php b/src/API/JsonAPI.php index c351373f..a7545770 100644 --- a/src/API/JsonAPI.php +++ b/src/API/JsonAPI.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/src/API/Kitsu.php b/src/API/Kitsu.php index 11f947c5..cc79be83 100644 --- a/src/API/Kitsu.php +++ b/src/API/Kitsu.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/src/API/Kitsu/Auth.php b/src/API/Kitsu/Auth.php index ecee237b..13039009 100644 --- a/src/API/Kitsu/Auth.php +++ b/src/API/Kitsu/Auth.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/src/API/Kitsu/Enum/AnimeAiringStatus.php b/src/API/Kitsu/Enum/AnimeAiringStatus.php index 606d07c6..bd6a69f6 100644 --- a/src/API/Kitsu/Enum/AnimeAiringStatus.php +++ b/src/API/Kitsu/Enum/AnimeAiringStatus.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/src/API/Kitsu/Enum/AnimeWatchingStatus.php b/src/API/Kitsu/Enum/AnimeWatchingStatus.php index be86960a..66aa0b05 100644 --- a/src/API/Kitsu/Enum/AnimeWatchingStatus.php +++ b/src/API/Kitsu/Enum/AnimeWatchingStatus.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/src/API/Kitsu/Enum/MangaReadingStatus.php b/src/API/Kitsu/Enum/MangaReadingStatus.php index 5b1de9c7..ea5f1759 100644 --- a/src/API/Kitsu/Enum/MangaReadingStatus.php +++ b/src/API/Kitsu/Enum/MangaReadingStatus.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/src/API/Kitsu/KitsuRequestBuilder.php b/src/API/Kitsu/KitsuRequestBuilder.php index 7a3cab02..f26ac4d1 100644 --- a/src/API/Kitsu/KitsuRequestBuilder.php +++ b/src/API/Kitsu/KitsuRequestBuilder.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/src/API/Kitsu/KitsuTrait.php b/src/API/Kitsu/KitsuTrait.php index 84bcf42c..065b2ab7 100644 --- a/src/API/Kitsu/KitsuTrait.php +++ b/src/API/Kitsu/KitsuTrait.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/src/API/Kitsu/ListItem.php b/src/API/Kitsu/ListItem.php index 509fab80..6af8284f 100644 --- a/src/API/Kitsu/ListItem.php +++ b/src/API/Kitsu/ListItem.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/src/API/Kitsu/Model.php b/src/API/Kitsu/Model.php index 96fd54c5..b276477d 100644 --- a/src/API/Kitsu/Model.php +++ b/src/API/Kitsu/Model.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/src/API/Kitsu/Transformer/AnimeListTransformer.php b/src/API/Kitsu/Transformer/AnimeListTransformer.php index cd87707b..2bb0a261 100644 --- a/src/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/API/Kitsu/Transformer/AnimeListTransformer.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/src/API/Kitsu/Transformer/AnimeTransformer.php b/src/API/Kitsu/Transformer/AnimeTransformer.php index a72a0779..8f626931 100644 --- a/src/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/API/Kitsu/Transformer/AnimeTransformer.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/src/API/Kitsu/Transformer/MangaListTransformer.php b/src/API/Kitsu/Transformer/MangaListTransformer.php index 81d7bcf4..bdf67040 100644 --- a/src/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/API/Kitsu/Transformer/MangaListTransformer.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/src/API/Kitsu/Transformer/MangaTransformer.php b/src/API/Kitsu/Transformer/MangaTransformer.php index 13de6d26..fde227c0 100644 --- a/src/API/Kitsu/Transformer/MangaTransformer.php +++ b/src/API/Kitsu/Transformer/MangaTransformer.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/src/API/ListItemInterface.php b/src/API/ListItemInterface.php index 17f0cad8..73bc1c60 100644 --- a/src/API/ListItemInterface.php +++ b/src/API/ListItemInterface.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/src/API/MAL.php b/src/API/MAL.php index 972b4534..6efc83e2 100644 --- a/src/API/MAL.php +++ b/src/API/MAL.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/src/API/MAL/Enum/AnimeWatchingStatus.php b/src/API/MAL/Enum/AnimeWatchingStatus.php index e6eb0097..7af37b47 100644 --- a/src/API/MAL/Enum/AnimeWatchingStatus.php +++ b/src/API/MAL/Enum/AnimeWatchingStatus.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/src/API/MAL/Enum/MangaReadingStatus.php b/src/API/MAL/Enum/MangaReadingStatus.php index edf82ddd..9f7433cc 100644 --- a/src/API/MAL/Enum/MangaReadingStatus.php +++ b/src/API/MAL/Enum/MangaReadingStatus.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/src/API/MAL/ListItem.php b/src/API/MAL/ListItem.php index 686c3455..e040f6ee 100644 --- a/src/API/MAL/ListItem.php +++ b/src/API/MAL/ListItem.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/src/API/MAL/MALRequestBuilder.php b/src/API/MAL/MALRequestBuilder.php index 326ad44a..248bccd6 100644 --- a/src/API/MAL/MALRequestBuilder.php +++ b/src/API/MAL/MALRequestBuilder.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/src/API/MAL/MALTrait.php b/src/API/MAL/MALTrait.php index ba69da6e..65aa580d 100644 --- a/src/API/MAL/MALTrait.php +++ b/src/API/MAL/MALTrait.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/src/API/MAL/Model.php b/src/API/MAL/Model.php index 46355b27..fa98b110 100644 --- a/src/API/MAL/Model.php +++ b/src/API/MAL/Model.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/src/API/MAL/Transformer/AnimeListTransformer.php b/src/API/MAL/Transformer/AnimeListTransformer.php index 6cabf5fe..19714c18 100644 --- a/src/API/MAL/Transformer/AnimeListTransformer.php +++ b/src/API/MAL/Transformer/AnimeListTransformer.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/src/API/XML.php b/src/API/XML.php index 86c27e1d..a0ba615c 100644 --- a/src/API/XML.php +++ b/src/API/XML.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/src/Command/BaseCommand.php b/src/Command/BaseCommand.php index cff2621c..2e2f36e1 100644 --- a/src/Command/BaseCommand.php +++ b/src/Command/BaseCommand.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/src/Command/ClearCache.php b/src/Command/ClearCache.php index 8d8dbe06..31dced60 100644 --- a/src/Command/ClearCache.php +++ b/src/Command/ClearCache.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/src/Command/SyncKitsuWithMal.php b/src/Command/SyncKitsuWithMal.php index c219bfff..40f5575d 100644 --- a/src/Command/SyncKitsuWithMal.php +++ b/src/Command/SyncKitsuWithMal.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/src/Controller/Anime.php b/src/Controller/Anime.php index baac5d8d..a452f65b 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.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/src/Controller/Collection.php b/src/Controller/Collection.php index 25f667b8..e8955c5e 100644 --- a/src/Controller/Collection.php +++ b/src/Controller/Collection.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/src/Controller/Manga.php b/src/Controller/Manga.php index 6cfd1e2a..fc273abe 100644 --- a/src/Controller/Manga.php +++ b/src/Controller/Manga.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/src/Helper/Menu.php b/src/Helper/Menu.php index c3045436..0e892f29 100644 --- a/src/Helper/Menu.php +++ b/src/Helper/Menu.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/src/Model/API.php b/src/Model/API.php index 24879073..8f07adfb 100644 --- a/src/Model/API.php +++ b/src/Model/API.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/src/Model/Anime.php b/src/Model/Anime.php index 4064bbb3..a4fc70d2 100644 --- a/src/Model/Anime.php +++ b/src/Model/Anime.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/src/Model/AnimeCollection.php b/src/Model/AnimeCollection.php index 99a47fc1..22fdc8d0 100644 --- a/src/Model/AnimeCollection.php +++ b/src/Model/AnimeCollection.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/src/Model/Collection.php b/src/Model/Collection.php index 80c4822c..be16e4e8 100644 --- a/src/Model/Collection.php +++ b/src/Model/Collection.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/src/Model/DB.php b/src/Model/DB.php index c63dc771..647076fc 100644 --- a/src/Model/DB.php +++ b/src/Model/DB.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/src/Model/Manga.php b/src/Model/Manga.php index 38ea4c5c..86f949e5 100644 --- a/src/Model/Manga.php +++ b/src/Model/Manga.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/tests/API/APIRequestBuilderTest.php b/tests/API/APIRequestBuilderTest.php index f2050e86..1b51bdff 100644 --- a/tests/API/APIRequestBuilderTest.php +++ b/tests/API/APIRequestBuilderTest.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/tests/API/CacheTraitTest.php b/tests/API/CacheTraitTest.php index 596d3032..ca247442 100644 --- a/tests/API/CacheTraitTest.php +++ b/tests/API/CacheTraitTest.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/tests/API/JsonAPITest.php b/tests/API/JsonAPITest.php index 396d1ade..d7f5f2f4 100644 --- a/tests/API/JsonAPITest.php +++ b/tests/API/JsonAPITest.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/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php index 357c57d2..65bb5f1e 100644 --- a/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.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/tests/API/Kitsu/Transformer/AnimeTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeTransformerTest.php index 9aa74952..be90d345 100644 --- a/tests/API/Kitsu/Transformer/AnimeTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeTransformerTest.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/tests/API/Kitsu/Transformer/MangaListTransformerTest.php b/tests/API/Kitsu/Transformer/MangaListTransformerTest.php index cb05de12..da7847ac 100644 --- a/tests/API/Kitsu/Transformer/MangaListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaListTransformerTest.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/tests/API/Kitsu/Transformer/MangaTransformerTest.php b/tests/API/Kitsu/Transformer/MangaTransformerTest.php index 7be8e844..7ddcadea 100644 --- a/tests/API/Kitsu/Transformer/MangaTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaTransformerTest.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/tests/API/KitsuTest.php b/tests/API/KitsuTest.php index 6364fcc6..a26c70c4 100644 --- a/tests/API/KitsuTest.php +++ b/tests/API/KitsuTest.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/tests/API/XMLTest.php b/tests/API/XMLTest.php index 67cb861b..1e0ae2b0 100644 --- a/tests/API/XMLTest.php +++ b/tests/API/XMLTest.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/tests/Command/BaseCommandTest.php b/tests/Command/BaseCommandTest.php index cb07840e..e6cc9d0e 100644 --- a/tests/Command/BaseCommandTest.php +++ b/tests/Command/BaseCommandTest.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/tests/Helper/MenuHelperTest.php b/tests/Helper/MenuHelperTest.php index 7ad23f8b..578746c6 100644 --- a/tests/Helper/MenuHelperTest.php +++ b/tests/Helper/MenuHelperTest.php @@ -1,12 +1,12 @@ * @copyright 2015 - 2017 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License From 84cb1cb520cb8b1b901263ee820387a83b34e0d7 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 16:30:14 -0500 Subject: [PATCH 28/56] And more snake case to camel case --- app/views/anime/add.php | 2 +- app/views/anime/cover.php | 10 ++++----- app/views/anime/edit.php | 2 +- app/views/anime/list.php | 10 ++++----- app/views/collection/add.php | 2 +- app/views/collection/cover.php | 4 ++-- app/views/collection/edit.php | 2 +- app/views/collection/list.php | 6 +++--- app/views/main-menu.php | 8 +++---- app/views/manga/add.php | 2 +- app/views/manga/cover.php | 8 +++---- app/views/manga/edit.php | 2 +- app/views/manga/list.php | 6 +++--- src/API/Kitsu/Auth.php | 2 +- src/Controller/Anime.php | 14 ++++++------- src/Model/AnimeCollection.php | 38 +++++++++++++++++----------------- src/RoutingBase.php | 25 +++++++++++----------- tests/RoutingBaseTest.php | 8 +++---- 18 files changed, 76 insertions(+), 75 deletions(-) diff --git a/app/views/anime/add.php b/app/views/anime/add.php index 1818fa02..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

diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index 61a1b9b2..51cffb84 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,7 +25,7 @@
- is_authenticated()): ?> + isAuthenticated()): ?>
">Edit @@ -85,6 +85,6 @@
-is_authenticated()): ?> +isAuthenticated()): ?> \ No newline at end of file diff --git a/app/views/anime/edit.php b/app/views/anime/edit.php index e01d90f9..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

diff --git a/app/views/anime/list.php b/app/views/anime/list.php index 4f08e588..f2857e26 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()): ?> @@ -86,5 +86,5 @@ -is_authenticated()) ? 'table_edit' : 'table' ?> +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 64f472c0..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

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 67bb7bec..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

diff --git a/app/views/collection/list.php b/app/views/collection/list.php index 71b48d51..0bb4daee 100644 --- a/app/views/collection/list.php +++ b/app/views/collection/list.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -10,7 +10,7 @@
  Title
">Edit
- is_authenticated()): ?> + isAuthenticated()): ?> @@ -24,7 +24,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?>
Actions Title
">Edit fullUrl("collection/delete/{$item['hummingbird_id']}") ?>">Delete*/ ?> diff --git a/app/views/main-menu.php b/app/views/main-menu.php index e7c5c67d..9542d7eb 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -17,7 +17,7 @@ [Manga List] - is_authenticated()): ?> + isAuthenticated()): ?>   @@ -25,7 +25,7 @@   - is_authenticated()): ?> + isAuthenticated()): ?> Logout [get('whose_list') ?>'s Login] @@ -37,8 +37,8 @@ menu($menu_name) ?>
diff --git a/app/views/manga/add.php b/app/views/manga/add.php index fcda2f2b..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

diff --git a/app/views/manga/cover.php b/app/views/manga/cover.php index 4f0e65d2..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 506397e6..1c28fdcb 100644 --- a/app/views/manga/list.php +++ b/app/views/manga/list.php @@ -1,5 +1,5 @@
-is_authenticated()): ?> +isAuthenticated()): ?> Add Item @@ -10,7 +10,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?> @@ -23,7 +23,7 @@ - is_authenticated()): ?> + isAuthenticated()): ?> diff --git a/src/API/Kitsu/Auth.php b/src/API/Kitsu/Auth.php index 13039009..c2c3789a 100644 --- a/src/API/Kitsu/Auth.php +++ b/src/API/Kitsu/Auth.php @@ -102,7 +102,7 @@ class Auth { * * @return boolean */ - public function is_authenticated() + public function isAuthenticated() { return ($this->get_auth_token() !== FALSE); } diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index a452f65b..bda57451 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -79,7 +79,7 @@ class Anime extends BaseController { */ public function index($type = AnimeWatchingStatus::WATCHING, string $view = NULL) { - $type_title_map = [ + $typeTitleMap = [ 'all' => 'All', AnimeWatchingStatus::WATCHING => 'Currently Watching', AnimeWatchingStatus::PLAN_TO_WATCH => 'Plan to Watch', @@ -88,7 +88,7 @@ class Anime extends BaseController { AnimeWatchingStatus::COMPLETED => 'Completed' ]; - $model_map = [ + $modelMap = [ 'watching' => AnimeWatchingStatus::WATCHING, 'plan_to_watch' => AnimeWatchingStatus::PLAN_TO_WATCH, 'on_hold' => AnimeWatchingStatus::ON_HOLD, @@ -97,21 +97,21 @@ class Anime extends BaseController { 'completed' => AnimeWatchingStatus::COMPLETED ]; - $title = (array_key_exists($type, $type_title_map)) + $title = (array_key_exists($type, $typeTitleMap)) ? $this->config->get('whose_list') . - "'s Anime List · {$type_title_map[$type]}" + "'s Anime List · {$typeTitleMap[$type]}" : ''; - $view_map = [ + $viewMap = [ '' => 'cover', 'list' => 'list' ]; $data = ($type !== 'all') - ? $this->model->getList($model_map[$type]) + ? $this->model->getList($modelMap[$type]) : $this->model->get_all_lists(); - $this->outputHTML('anime/' . $view_map[$view], [ + $this->outputHTML('anime/' . $viewMap[$view], [ 'title' => $title, 'sections' => $data ]); diff --git a/src/Model/AnimeCollection.php b/src/Model/AnimeCollection.php index 22fdc8d0..9ae62974 100644 --- a/src/Model/AnimeCollection.php +++ b/src/Model/AnimeCollection.php @@ -33,11 +33,11 @@ class AnimeCollection extends Collection { */ public function getCollection() { - $raw_collection = $this->_getCollection(); + $rawCollection = $this->getCollectionFromDatabase(); $collection = []; - foreach ($raw_collection as $row) + foreach ($rawCollection as $row) { if (array_key_exists($row['media'], $collection)) { @@ -93,7 +93,7 @@ class AnimeCollection extends Collection { * * @return array */ - private function _getCollection() + private function getCollectionFromDatabase() { if ( ! $this->validDatabase) { @@ -183,13 +183,13 @@ class AnimeCollection extends Collection { /** * Get the details of a collection item * - * @param int $hummingbird_id + * @param int $kitsuId * @return array */ - public function get($hummingbird_id) + public function get($kitsuId) { $query = $this->db->from('anime_set') - ->where('hummingbird_id', $hummingbird_id) + ->where('hummingbird_id', $kitsuId) ->get(); return $query->fetch(PDO::FETCH_ASSOC); @@ -198,16 +198,16 @@ class AnimeCollection extends Collection { /** * Update genre information for selected anime * - * @param int $anime_id The current anime + * @param int $animeId The current anime * @return void */ - private function updateGenre($anime_id) + private function updateGenre($animeId) { - $genre_info = $this->getGenreData(); - extract($genre_info); + $genreInfo = $this->getGenreData(); + extract($genreInfo); // Get api information - $anime = $this->animeModel->getAnimeById($anime_id); + $anime = $this->animeModel->getAnimeById($animeId); foreach ($anime['genres'] as $genre) { @@ -222,23 +222,23 @@ class AnimeCollection extends Collection { // Update link table // Get id of genre to put in link table - $flipped_genres = array_flip($genres); + $flippedGenres = array_flip($genres); - $insert_array = [ - 'hummingbird_id' => $anime_id, - 'genre_id' => $flipped_genres[$genre] + $insertArray = [ + 'hummingbird_id' => $animeId, + 'genre_id' => $flippedGenres[$genre] ]; - if (array_key_exists($anime_id, $links)) + if (array_key_exists($animeId, $links)) { - if ( ! in_array($flipped_genres[$genre], $links[$anime_id])) + if ( ! in_array($flippedGenres[$genre], $links[$animeId])) { - $this->db->set($insert_array)->insert('genre_anime_set_link'); + $this->db->set($insertArray)->insert('genre_anime_set_link'); } } else { - $this->db->set($insert_array)->insert('genre_anime_set_link'); + $this->db->set($insertArray)->insert('genre_anime_set_link'); } } } diff --git a/src/RoutingBase.php b/src/RoutingBase.php index 2a1f479a..79cde788 100644 --- a/src/RoutingBase.php +++ b/src/RoutingBase.php @@ -17,13 +17,14 @@ namespace Aviat\AnimeClient; use Aviat\Ion\Di\ContainerInterface; +use Aviat\Ion\StringWrapper; /** * Base for routing/url classes */ class RoutingBase { - use \Aviat\Ion\StringWrapper; + use StringWrapper; /** * Injection Container @@ -47,7 +48,7 @@ class RoutingBase { * Route configuration options * @var array */ - protected $route_config; + protected $routeConfig; /** * Constructor @@ -58,9 +59,9 @@ class RoutingBase { { $this->container = $container; $this->config = $container->get('config'); - $base_routes = $this->config->get('routes'); - $this->routes = $base_routes['routes']; - $this->route_config = $base_routes['route_config']; + $baseRoutes = $this->config->get('routes'); + $this->routes = $baseRoutes['routes']; + $this->routeConfig = $baseRoutes['route_config']; } /** @@ -71,11 +72,11 @@ class RoutingBase { */ public function __get($key) { - $routing_config =& $this->route_config; + $routingConfig =& $this->routeConfig; - if (array_key_exists($key, $routing_config)) + if (array_key_exists($key, $routingConfig)) { - return $routing_config[$key]; + return $routingConfig[$key]; } } @@ -88,13 +89,13 @@ class RoutingBase { { $request = $this->container->get('request'); $path = $request->getUri()->getPath(); - $cleaned_path = $this->string($path) + $cleanedPath = $this->string($path) ->replace('%20', '') ->trim() ->trimRight('/') ->ensureLeft('/'); - return (string)$cleaned_path; + return (string)$cleanedPath; } /** @@ -114,7 +115,7 @@ class RoutingBase { * @param int $num * @return string|null */ - public function get_segment($num) + public function getSegment($num) { $segments = $this->segments(); return (array_key_exists($num, $segments)) ? $segments[$num] : NULL; @@ -125,7 +126,7 @@ class RoutingBase { * * @return string */ - public function last_segment() + public function lastSegment() { $segments = $this->segments(); return end($segments); diff --git a/tests/RoutingBaseTest.php b/tests/RoutingBaseTest.php index 77ed9965..0ebd85aa 100644 --- a/tests/RoutingBaseTest.php +++ b/tests/RoutingBaseTest.php @@ -19,13 +19,13 @@ class RoutingBaseTest extends AnimeClient_TestCase { 'requestUri' => ' // ', 'path' => '/', 'segments' => ['', ''], - 'last_segment' => NULL + 'lastSegment' => NULL ], 'three_segments' => [ 'requestUri' => '/anime/watching/list ', 'path' => '/anime/watching/list', 'segments' => ['', 'anime', 'watching', 'list'], - 'last_segment' => 'list' + 'lastSegment' => 'list' ] ]; } @@ -43,11 +43,11 @@ class RoutingBaseTest extends AnimeClient_TestCase { $this->assertEquals($path, $this->routingBase->path(), "Path is invalid"); $this->assertEquals($segments, $this->routingBase->segments(), "Segments array is invalid"); - $this->assertEquals($lastSegment, $this->routingBase->last_segment(), "Last segment is invalid"); + $this->assertEquals($lastSegment, $this->routingBase->lastSegment(), "Last segment is invalid"); foreach($segments as $i => $value) { - $this->assertEquals($value, $this->routingBase->get_segment($i), "Segment {$i} is invalid"); + $this->assertEquals($value, $this->routingBase->getSegment($i), "Segment {$i} is invalid"); } } } \ No newline at end of file From ee2760b2b5b25f8273b58de476061f6eacc58528 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 16:40:18 -0500 Subject: [PATCH 29/56] Rename test base class --- tests/API/CacheTraitTest.php | 4 ++-- .../Transformer/AnimeListTransformerTest.php | 6 +++--- .../Kitsu/Transformer/AnimeTransformerTest.php | 6 +++--- .../Transformer/MangaListTransformerTest.php | 6 +++--- .../Kitsu/Transformer/MangaTransformerTest.php | 6 +++--- tests/AnimeClientTest.php | 2 +- ...ent_TestCase.php => AnimeClientTestCase.php} | 4 ++-- tests/Command/BaseCommandTest.php | 4 ++-- tests/ControllerTest.php | 2 +- tests/DispatcherTest.php | 2 +- tests/Helper/MenuHelperTest.php | 2 +- tests/MenuGeneratorTest.php | 2 +- tests/RequirementsTest.php | 2 +- tests/RoutingBaseTest.php | 2 +- tests/UrlGeneratorTest.php | 2 +- tests/UtilTest.php | 2 +- tests/bootstrap.php | 2 +- tests/mocks.php | 17 +++++++---------- 18 files changed, 35 insertions(+), 38 deletions(-) rename tests/{AnimeClient_TestCase.php => AnimeClientTestCase.php} (97%) diff --git a/tests/API/CacheTraitTest.php b/tests/API/CacheTraitTest.php index ca247442..5e953413 100644 --- a/tests/API/CacheTraitTest.php +++ b/tests/API/CacheTraitTest.php @@ -17,9 +17,9 @@ namespace Aviat\AnimeClient\Tests\API; use Aviat\AnimeClient\API\CacheTrait; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; -class CacheTraitTest extends AnimeClient_TestCase { +class CacheTraitTest extends AnimeClientTestCase { public function setUp() { parent::setUp(); diff --git a/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php index 65bb5f1e..712ccc74 100644 --- a/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeListTransformerTest.php @@ -17,16 +17,16 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\Ion\Friend; use Aviat\Ion\Json; -class AnimeListTransformerTest extends AnimeClient_TestCase { +class AnimeListTransformerTest extends AnimeClientTestCase { public function setUp() { parent::setUp(); - $this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu'; + $this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu'; $this->beforeTransform = Json::decodeFile("{$this->dir}/animeListItemBeforeTransform.json"); $this->afterTransform = Json::decodeFile("{$this->dir}/animeListItemAfterTransform.json"); diff --git a/tests/API/Kitsu/Transformer/AnimeTransformerTest.php b/tests/API/Kitsu/Transformer/AnimeTransformerTest.php index be90d345..d3ab1cf1 100644 --- a/tests/API/Kitsu/Transformer/AnimeTransformerTest.php +++ b/tests/API/Kitsu/Transformer/AnimeTransformerTest.php @@ -17,16 +17,16 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeTransformer; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\Ion\Friend; use Aviat\Ion\Json; -class AnimeTransformerTest extends AnimeClient_TestCase { +class AnimeTransformerTest extends AnimeClientTestCase { public function setUp() { parent::setUp(); - $this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu'; + $this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu'; $this->beforeTransform = Json::decodeFile("{$this->dir}/animeBeforeTransform.json"); $this->afterTransform = Json::decodeFile("{$this->dir}/animeAfterTransform.json"); diff --git a/tests/API/Kitsu/Transformer/MangaListTransformerTest.php b/tests/API/Kitsu/Transformer/MangaListTransformerTest.php index da7847ac..7a9c9546 100644 --- a/tests/API/Kitsu/Transformer/MangaListTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaListTransformerTest.php @@ -18,15 +18,15 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaListTransformer; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\Ion\Json; -class MangaListTransformerTest extends AnimeClient_TestCase { +class MangaListTransformerTest extends AnimeClientTestCase { public function setUp() { parent::setUp(); - $this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu'; + $this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu'; $rawBefore = Json::decodeFile("{$this->dir}/mangaListBeforeTransform.json"); $this->beforeTransform = JsonAPI::inlineRawIncludes($rawBefore, 'manga'); diff --git a/tests/API/Kitsu/Transformer/MangaTransformerTest.php b/tests/API/Kitsu/Transformer/MangaTransformerTest.php index 7ddcadea..fda3648c 100644 --- a/tests/API/Kitsu/Transformer/MangaTransformerTest.php +++ b/tests/API/Kitsu/Transformer/MangaTransformerTest.php @@ -18,15 +18,15 @@ namespace Aviat\AnimeClient\Tests\API\Kitsu\Transformer; use Aviat\AnimeClient\API\JsonAPI; use Aviat\AnimeClient\API\Kitsu\Transformer\MangaTransformer; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\Ion\Json; -class MangaTransformerTest extends AnimeClient_TestCase { +class MangaTransformerTest extends AnimeClientTestCase { public function setUp() { parent::setUp(); - $this->dir = AnimeClient_TestCase::TEST_DATA_DIR . '/Kitsu'; + $this->dir = AnimeClientTestCase::TEST_DATA_DIR . '/Kitsu'; $data = Json::decodeFile("{$this->dir}/mangaBeforeTransform.json"); $baseData = $data['data'][0]['attributes']; diff --git a/tests/AnimeClientTest.php b/tests/AnimeClientTest.php index a62c1791..da4b1e68 100644 --- a/tests/AnimeClientTest.php +++ b/tests/AnimeClientTest.php @@ -2,7 +2,7 @@ namespace Aviat\AnimeClient\Tests; -class AnimeClientTest extends AnimeClient_TestCase { +class AnimeClientTest extends AnimeClientTestCase { /** * Basic sanity test for _dir function */ diff --git a/tests/AnimeClient_TestCase.php b/tests/AnimeClientTestCase.php similarity index 97% rename from tests/AnimeClient_TestCase.php rename to tests/AnimeClientTestCase.php index 3bd39053..3009714a 100644 --- a/tests/AnimeClient_TestCase.php +++ b/tests/AnimeClientTestCase.php @@ -20,7 +20,7 @@ define('TEST_VIEW_DIR', __DIR__ . '/test_views'); /** * Base class for TestCases */ -class AnimeClient_TestCase extends TestCase { +class AnimeClientTestCase extends TestCase { // Test directory constants const ROOT_DIR = ROOT_DIR; const SRC_DIR = SRC_DIR; @@ -160,4 +160,4 @@ class AnimeClient_TestCase extends TestCase { return Json::decode($rawData); } } -// End of AnimeClient_TestCase.php \ No newline at end of file +// End of AnimeClientTestCase.php \ No newline at end of file diff --git a/tests/Command/BaseCommandTest.php b/tests/Command/BaseCommandTest.php index e6cc9d0e..f70c1a58 100644 --- a/tests/Command/BaseCommandTest.php +++ b/tests/Command/BaseCommandTest.php @@ -17,11 +17,11 @@ namespace Aviat\AnimeClient\Tests\Command; use Aviat\AnimeClient\Command\BaseCommand; -use Aviat\AnimeClient\Tests\AnimeClient_TestCase; +use Aviat\AnimeClient\Tests\AnimeClientTestCase; use Aviat\Ion\Friend; use ConsoleKit\Console; -class BaseCommandTest extends AnimeClient_TestCase { +class BaseCommandTest extends AnimeClientTestCase { public function setUp() { $this->base = new BaseCommand(new Console()); diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 477ab812..37b09abe 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -11,7 +11,7 @@ use Aviat\AnimeClient\Controller\{ Manga as MangaController }; -class ControllerTest extends AnimeClient_TestCase { +class ControllerTest extends AnimeClientTestCase { public function setUp() { diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index 54884117..f52f6d1e 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -9,7 +9,7 @@ use Monolog\Handler\TestHandler; use Monolog\Logger; -class DispatcherTest extends AnimeClient_TestCase { +class DispatcherTest extends AnimeClientTestCase { protected $container; protected $router; diff --git a/tests/Helper/MenuHelperTest.php b/tests/Helper/MenuHelperTest.php index 578746c6..7226e989 100644 --- a/tests/Helper/MenuHelperTest.php +++ b/tests/Helper/MenuHelperTest.php @@ -18,7 +18,7 @@ namespace Aviat\AnimeClient\Tests; use Aviat\AnimeClient\Helper\Menu as MenuHelper; -class MenuHelperTest extends AnimeClient_TestCase { +class MenuHelperTest extends AnimeClientTestCase { public function setUp() { diff --git a/tests/MenuGeneratorTest.php b/tests/MenuGeneratorTest.php index 003404b2..53ed0636 100644 --- a/tests/MenuGeneratorTest.php +++ b/tests/MenuGeneratorTest.php @@ -5,7 +5,7 @@ namespace Aviat\AnimeClient\Tests; use Aviat\AnimeClient\MenuGenerator; use Aviat\Ion\Friend; -class MenuGeneratorTest extends AnimeClient_TestCase { +class MenuGeneratorTest extends AnimeClientTestCase { protected $generator; protected $friend; diff --git a/tests/RequirementsTest.php b/tests/RequirementsTest.php index 620fde17..28f0ff5c 100644 --- a/tests/RequirementsTest.php +++ b/tests/RequirementsTest.php @@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests; use PDO; -class RequirementsTest extends AnimeClient_TestCase { +class RequirementsTest extends AnimeClientTestCase { public function testPHPVersion() { diff --git a/tests/RoutingBaseTest.php b/tests/RoutingBaseTest.php index 0ebd85aa..19f7d7bd 100644 --- a/tests/RoutingBaseTest.php +++ b/tests/RoutingBaseTest.php @@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests; use Aviat\AnimeClient\RoutingBase; -class RoutingBaseTest extends AnimeClient_TestCase { +class RoutingBaseTest extends AnimeClientTestCase { public function setUp() { diff --git a/tests/UrlGeneratorTest.php b/tests/UrlGeneratorTest.php index 4a77a096..33470985 100644 --- a/tests/UrlGeneratorTest.php +++ b/tests/UrlGeneratorTest.php @@ -5,7 +5,7 @@ namespace Aviat\AnimeClient\Tests; use Aviat\AnimeClient\UrlGenerator; use Aviat\Ion\Config; -class UrlGeneratorTest extends AnimeClient_TestCase { +class UrlGeneratorTest extends AnimeClientTestCase { public function assetUrlProvider() { diff --git a/tests/UtilTest.php b/tests/UtilTest.php index a9e30d88..061dcf73 100644 --- a/tests/UtilTest.php +++ b/tests/UtilTest.php @@ -4,7 +4,7 @@ namespace Aviat\AnimeClient\Tests; use Aviat\AnimeClient\Util; -class UtilTest extends AnimeClient_TestCase { +class UtilTest extends AnimeClientTestCase { public function setUp() { diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9267755f..ec05319b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -30,7 +30,7 @@ function _dir() // Autoloading // ----------------------------------------------------------------------------- -require _dir(__DIR__, 'AnimeClient_TestCase.php'); +require _dir(__DIR__, 'AnimeClientTestCase.php'); require _dir(__DIR__, '../vendor/autoload.php'); // ----------------------------------------------------------------------------- diff --git a/tests/mocks.php b/tests/mocks.php index b53cbc5e..eb37c55b 100644 --- a/tests/mocks.php +++ b/tests/mocks.php @@ -3,18 +3,15 @@ * All the mock classes that extend the classes they are used to test */ -use Aviat\AnimeClient\Model\Anime as AnimeModel; -use Aviat\AnimeClient\Model\API as BaseApiModel; -use Aviat\AnimeClient\Model\Manga as MangaModel; -use Aviat\Ion\Enum; -use Aviat\Ion\Friend; -use Aviat\Ion\Json; +use Aviat\AnimeClient\Model\{ + Anime as AnimeModel, + API as BaseApiModel, + Manga as MangaModel +}; +use Aviat\Ion\{Enum, Friend, Json}; use Aviat\Ion\Transformer\AbstractTransformer; use Aviat\Ion\View; -use Aviat\Ion\View\HtmlView; -use Aviat\Ion\View\HttpView; -use Aviat\Ion\View\JsonView; - +use Aviat\Ion\View\{HtmlView, HttpView, JsonView}; // ----------------------------------------------------------------------------- // Mock the default error handler From 488a01f8a543e67a0cfbe711098097c41a1f36d3 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 15 Feb 2017 16:58:08 -0500 Subject: [PATCH 30/56] Js snake case to camel case --- public/js/manga_edit.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/public/js/manga_edit.js b/public/js/manga_edit.js index 33b93ca6..2bd2f492 100644 --- a/public/js/manga_edit.js +++ b/public/js/manga_edit.js @@ -6,13 +6,13 @@ 'use strict'; _.on('.manga.list', 'click', '.edit_buttons button', e => { - let this_sel = e.target; - let parent_sel = _.closestParent(e.target, 'article'); - let manga_id = parent_sel.id.replace("manga-", ""); - let type = this_sel.classList.contains("plus_one_chapter") ? 'chapter' : 'volume'; - let completed = parseInt(_.$(`.${type}s_read`, parent_sel)[0].textContent, 10); - let total = parseInt(_.$(`.${type}_count`, parent_sel)[0].textContent, 10); - let manga_name = _.$('.name', parent_sel)[0].textContent; + let thisSel = e.target; + let parentSel = _.closestParent(e.target, 'article'); + let mangaId = parentSel.id.replace("manga-", ""); + let type = thisSel.classList.contains("plus_one_chapter") ? 'chapter' : 'volume'; + let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10); + let total = parseInt(_.$(`.${type}_count`, parentSel)[0].textContent, 10); + let mangaName = _.$('.name', parentSel)[0].textContent; if (isNaN(completed)) { completed = 0; @@ -20,7 +20,7 @@ // Setup the update data let data = { - id: manga_id, + id: mangaId, data: { progress: completed } @@ -47,16 +47,16 @@ mimeType: 'application/json', success: () => { if (data.data.status == 'completed') { - _.hide(parent_sel); + _.hide(parentSel); } - _.$(`.${type}s_read`, parent_sel)[0].textContent = completed; - _.showMessage('success', `Sucessfully updated ${manga_name}`); + _.$(`.${type}s_read`, parentSel)[0].textContent = completed; + _.showMessage('success', `Sucessfully updated ${mangaName}`); _.scrollToTop(); }, error: (xhr, errorType, error) => { console.error(error); - _.showMessage('error', `Failed to updated ${manga_name}`); + _.showMessage('error', `Failed to updated ${mangaName}`); _.scrollToTop(); } }); From 85cd77267bbcdaece5dd5521caf6296350927854 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 16 Feb 2017 11:09:37 -0500 Subject: [PATCH 31/56] Make sure header comments are actually updated for all code files --- build/update_header_comments.php | 3 +++ src/AnimeClient.php | 8 ++++---- src/Controller.php | 8 ++++---- src/Controller/Anime.php | 10 +++++----- src/Dispatcher.php | 8 ++++---- src/MenuGenerator.php | 8 ++++---- src/RoutingBase.php | 8 ++++---- src/UrlGenerator.php | 8 ++++---- src/Util.php | 8 ++++---- tests/AnimeClientTest.php | 16 +++++++++++++++- tests/AnimeClientTestCase.php | 16 +++++++++++++++- tests/ControllerTest.php | 14 ++++++++++++++ tests/DispatcherTest.php | 16 +++++++++++++++- tests/MenuGeneratorTest.php | 16 +++++++++++++++- tests/RequirementsTest.php | 16 +++++++++++++++- tests/RoutingBaseTest.php | 16 +++++++++++++++- tests/TestSessionHandler.php | 16 +++++++++++++++- tests/UrlGeneratorTest.php | 16 +++++++++++++++- tests/UtilTest.php | 16 +++++++++++++++- 19 files changed, 185 insertions(+), 42 deletions(-) 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/src/AnimeClient.php b/src/AnimeClient.php index b43531bd..dddffd9b 100644 --- a/src/AnimeClient.php +++ b/src/AnimeClient.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/src/Controller.php b/src/Controller.php index 284673e3..63e1194c 100644 --- a/src/Controller.php +++ b/src/Controller.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/src/Controller/Anime.php b/src/Controller/Anime.php index bda57451..5e3eb59e 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -81,11 +81,11 @@ class Anime extends BaseController { { $typeTitleMap = [ 'all' => 'All', - AnimeWatchingStatus::WATCHING => 'Currently Watching', - AnimeWatchingStatus::PLAN_TO_WATCH => 'Plan to Watch', - AnimeWatchingStatus::ON_HOLD => 'On Hold', - AnimeWatchingStatus::DROPPED => 'Dropped', - AnimeWatchingStatus::COMPLETED => 'Completed' + 'watching' => 'Currently Watching', + 'plan_to_watch' => 'Plan to Watch', + 'on_hold' => 'On Hold', + 'dropped' => 'Dropped', + 'completed' => 'Completed' ]; $modelMap = [ diff --git a/src/Dispatcher.php b/src/Dispatcher.php index f06a185b..29f88fb9 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.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/src/MenuGenerator.php b/src/MenuGenerator.php index a292616f..fe09acf5 100644 --- a/src/MenuGenerator.php +++ b/src/MenuGenerator.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/src/RoutingBase.php b/src/RoutingBase.php index 79cde788..16673107 100644 --- a/src/RoutingBase.php +++ b/src/RoutingBase.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/src/UrlGenerator.php b/src/UrlGenerator.php index 95df8f5c..bb523411 100644 --- a/src/UrlGenerator.php +++ b/src/UrlGenerator.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/src/Util.php b/src/Util.php index ac038b45..7cbcd427 100644 --- a/src/Util.php +++ b/src/Util.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/tests/AnimeClientTest.php b/tests/AnimeClientTest.php index da4b1e68..0122541c 100644 --- a/tests/AnimeClientTest.php +++ b/tests/AnimeClientTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/AnimeClientTestCase.php b/tests/AnimeClientTestCase.php index 3009714a..94b484eb 100644 --- a/tests/AnimeClientTestCase.php +++ b/tests/AnimeClientTestCase.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/ControllerTest.php b/tests/ControllerTest.php index 37b09abe..7421c6e7 100644 --- a/tests/ControllerTest.php +++ b/tests/ControllerTest.php @@ -1,4 +1,18 @@ + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/DispatcherTest.php b/tests/DispatcherTest.php index f52f6d1e..9650779c 100644 --- a/tests/DispatcherTest.php +++ b/tests/DispatcherTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/MenuGeneratorTest.php b/tests/MenuGeneratorTest.php index 53ed0636..d412c9c9 100644 --- a/tests/MenuGeneratorTest.php +++ b/tests/MenuGeneratorTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/RequirementsTest.php b/tests/RequirementsTest.php index 28f0ff5c..be1bfd3a 100644 --- a/tests/RequirementsTest.php +++ b/tests/RequirementsTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/RoutingBaseTest.php b/tests/RoutingBaseTest.php index 19f7d7bd..39aab47c 100644 --- a/tests/RoutingBaseTest.php +++ b/tests/RoutingBaseTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/TestSessionHandler.php b/tests/TestSessionHandler.php index 487b01fa..9b7b486e 100644 --- a/tests/TestSessionHandler.php +++ b/tests/TestSessionHandler.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/UrlGeneratorTest.php b/tests/UrlGeneratorTest.php index 33470985..3ffd06af 100644 --- a/tests/UrlGeneratorTest.php +++ b/tests/UrlGeneratorTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; diff --git a/tests/UtilTest.php b/tests/UtilTest.php index 061dcf73..f67e9b53 100644 --- a/tests/UtilTest.php +++ b/tests/UtilTest.php @@ -1,4 +1,18 @@ - + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ namespace Aviat\AnimeClient\Tests; From 6ed755e2520f9057e4a65b0263777f36feda82ae Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 16 Feb 2017 11:47:54 -0500 Subject: [PATCH 32/56] JS style fixes --- public/js/anime_collection.js | 4 ++-- public/js/anime_edit.js | 8 ++++---- public/js/base/AnimeClient.js | 16 ++++++++-------- public/js/base/events.js | 6 +++--- public/js/manga_edit.js | 11 +++++------ 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/public/js/anime_collection.js b/public/js/anime_collection.js index d0e51155..8869e247 100644 --- a/public/js/anime_collection.js +++ b/public/js/anime_collection.js @@ -4,7 +4,7 @@ const search = (tempHtml, query) => { _.$('.cssload-loader')[0].removeAttribute('hidden'); - _.get(_.url('/collection/search'), {'query':query}, (searchResults, status) => { + _.get(_.url('/collection/search'), {query}, (searchResults, status) => { searchResults = JSON.parse(searchResults); _.$('.cssload-loader')[0].setAttribute('hidden', 'hidden'); @@ -18,7 +18,7 @@ }); }; - _.get('/public/templates/anime-ajax-search-results.html', tempHtml => { + _.get('/public/templates/anime-ajax-search-results.html', (tempHtml) => { _.on('#search', 'keyup', _.throttle(250, function(e) { let query = encodeURIComponent(this.value); if (query === '') { diff --git a/public/js/anime_edit.js b/public/js/anime_edit.js index 57cc24ad..911cd4d3 100644 --- a/public/js/anime_edit.js +++ b/public/js/anime_edit.js @@ -6,7 +6,7 @@ 'use strict'; // Action to increment episode count - _.on('body.anime.list', 'click', '.plus_one', e => { + _.on('body.anime.list', 'click', '.plus_one', (e) => { let parentSel = _.closestParent(e.target, 'article'); let watchedCount = parseInt(_.$('.completed_number', parentSel)[0].textContent, 10); let totalCount = parseInt(_.$('.total_number', parentSel)[0].textContent, 10); @@ -28,17 +28,17 @@ } // If you increment at the last episode, mark as completed - if (( ! isNaN(watchedCount)) && (watchedCount + 1) == totalCount) { + if (( ! isNaN(watchedCount)) && (watchedCount + 1) === totalCount) { data.data.status = 'completed'; } // okay, lets actually make some changes! _.ajax(_.url('/anime/update'), { - data: data, + data, dataType: 'json', type: 'POST', success: () => { - if (data.data.status == 'completed') { + if (data.data.status === 'completed') { _.hide(parentSel); } diff --git a/public/js/base/AnimeClient.js b/public/js/base/AnimeClient.js index 92614baf..b8d85fa2 100644 --- a/public/js/base/AnimeClient.js +++ b/public/js/base/AnimeClient.js @@ -26,7 +26,7 @@ var AnimeClient = (function(w) { * @return {array} - array of dom elements */ $(selector, context) { - if (typeof selector !== "string") { + if (typeof selector !== 'string') { return selector; } @@ -78,10 +78,10 @@ var AnimeClient = (function(w) { */ showMessage(type, message) { let template = - `
- + `
+ ${message} - +
`; let sel = AnimeClient.$('.message'); @@ -225,7 +225,7 @@ var AnimeClient = (function(w) { pairs.push(`${name}=${value}`); }); - return pairs.join("&"); + return pairs.join('&'); }; /** @@ -255,7 +255,7 @@ var AnimeClient = (function(w) { let request = new XMLHttpRequest(); let method = String(config.type).toUpperCase(); - if (method === "GET") { + if (method === 'GET') { url += (url.match(/\?/)) ? ajaxSerialize(config.data) : `?${ajaxSerialize(config.data)}`; @@ -267,7 +267,7 @@ var AnimeClient = (function(w) { if (request.readyState === 4) { let responseText = ''; - if (request.responseType == 'json') { + if (request.responseType === 'json') { responseText = JSON.parse(request.responseText); } else { responseText = request.responseText; @@ -291,7 +291,7 @@ var AnimeClient = (function(w) { request.setRequestHeader('Content-Type', config.mimeType); switch (method) { - case "GET": + case 'GET': request.send(null); break; diff --git a/public/js/base/events.js b/public/js/base/events.js index a59ce1c0..ae30ebb7 100644 --- a/public/js/base/events.js +++ b/public/js/base/events.js @@ -11,8 +11,8 @@ }); // Confirm deleting of list or library items - ac.on('form.js-delete', 'submit', event => { - let proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?"); + ac.on('form.js-delete', 'submit', (event) => { + const proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?"); if (proceed === false) { event.preventDefault(); @@ -23,7 +23,7 @@ // Clear the api cache ac.on('.js-clear-cache', 'click', () => { ac.get('/cache_purge', () => { - ac.showMessage('success', `Successfully purged api cache`); + ac.showMessage('success', 'Successfully purged api cache'); }); }); diff --git a/public/js/manga_edit.js b/public/js/manga_edit.js index 2bd2f492..b0fdf222 100644 --- a/public/js/manga_edit.js +++ b/public/js/manga_edit.js @@ -5,7 +5,7 @@ 'use strict'; - _.on('.manga.list', 'click', '.edit_buttons button', e => { + _.on('.manga.list', 'click', '.edit_buttons button', (e) => { let thisSel = e.target; let parentSel = _.closestParent(e.target, 'article'); let mangaId = parentSel.id.replace("manga-", ""); @@ -33,7 +33,7 @@ } // If you increment at the last chapter, mark as completed - if (( ! isNaN(completed)) && (completed + 1) == total) { + if (( ! isNaN(completed)) && (completed + 1) === total) { data.data.status = 'completed'; } @@ -41,12 +41,12 @@ data.data.progress = ++completed; _.ajax(_.url('/manga/update'), { - data: data, + data, dataType: 'json', type: 'POST', mimeType: 'application/json', success: () => { - if (data.data.status == 'completed') { + if (data.data.status === 'completed') { _.hide(parentSel); } @@ -54,8 +54,7 @@ _.showMessage('success', `Sucessfully updated ${mangaName}`); _.scrollToTop(); }, - error: (xhr, errorType, error) => { - console.error(error); + error: () => { _.showMessage('error', `Failed to updated ${mangaName}`); _.scrollToTop(); } From 0cef44c9869c4ef401414d173e1a82f378e209ab Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 16 Feb 2017 13:22:26 -0500 Subject: [PATCH 33/56] More javascript style fixes --- public/js/base/AnimeClient.js | 4 ++-- public/js/base/events.js | 2 +- public/js/manga_collection.js | 4 ++-- public/js/manga_edit.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/base/AnimeClient.js b/public/js/base/AnimeClient.js index b8d85fa2..180a0756 100644 --- a/public/js/base/AnimeClient.js +++ b/public/js/base/AnimeClient.js @@ -226,7 +226,7 @@ var AnimeClient = (function(w) { }); return pairs.join('&'); - }; + } /** * Make an ajax request @@ -308,7 +308,7 @@ var AnimeClient = (function(w) { } return _.ajax(url, { - data: data, + data, success: callback }); }; diff --git a/public/js/base/events.js b/public/js/base/events.js index ae30ebb7..b7462294 100644 --- a/public/js/base/events.js +++ b/public/js/base/events.js @@ -12,7 +12,7 @@ // Confirm deleting of list or library items ac.on('form.js-delete', 'submit', (event) => { - const proceed = confirm("Are you ABSOLUTELY SURE you want to delete this item?"); + const proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?'); if (proceed === false) { event.preventDefault(); diff --git a/public/js/manga_collection.js b/public/js/manga_collection.js index 137ea46c..1d3dccbf 100644 --- a/public/js/manga_collection.js +++ b/public/js/manga_collection.js @@ -4,7 +4,7 @@ const search = (tempHtml, query) => { _.$('.cssload-loader')[0].removeAttribute('hidden'); - _.get(_.url('/manga/search'), {'query':query,}, (searchResults, status) => { + _.get(_.url('/manga/search'), {query}, (searchResults, status) => { searchResults = JSON.parse(searchResults); _.$('.cssload-loader')[0].setAttribute('hidden', 'hidden'); @@ -13,7 +13,7 @@ }); }; - _.get('/public/templates/manga-ajax-search-results.html', tempHtml => { + _.get('/public/templates/manga-ajax-search-results.html', (tempHtml) => { _.on('#search', 'keyup', _.throttle(250, function(e) { let query = encodeURIComponent(this.value); if (query === '') { diff --git a/public/js/manga_edit.js b/public/js/manga_edit.js index b0fdf222..7fa89a66 100644 --- a/public/js/manga_edit.js +++ b/public/js/manga_edit.js @@ -8,8 +8,8 @@ _.on('.manga.list', 'click', '.edit_buttons button', (e) => { let thisSel = e.target; let parentSel = _.closestParent(e.target, 'article'); - let mangaId = parentSel.id.replace("manga-", ""); - let type = thisSel.classList.contains("plus_one_chapter") ? 'chapter' : 'volume'; + let mangaId = parentSel.id.replace('manga-', ''); + let type = thisSel.classList.contains('plus_one_chapter') ? 'chapter' : 'volume'; let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10); let total = parseInt(_.$(`.${type}_count`, parentSel)[0].textContent, 10); let mangaName = _.$('.name', parentSel)[0].textContent; From 0232d18f1fe22ffbe74e1d100b5661e41ec46e65 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 16 Feb 2017 14:30:06 -0500 Subject: [PATCH 34/56] Yet more snake case to camel case --- src/API/Kitsu.php | 8 +- src/Controller.php | 73 +++++++++-------- src/Controller/Anime.php | 10 +-- src/Controller/Collection.php | 6 +- src/Controller/Manga.php | 10 +-- src/Dispatcher.php | 81 ++++++++++--------- src/MenuGenerator.php | 10 +-- src/Util.php | 16 ++-- tests/MenuGeneratorTest.php | 2 +- tests/UtilTest.php | 12 +-- .../test_data/Kitsu/animeAfterTransform.json | 8 +- 11 files changed, 123 insertions(+), 113 deletions(-) diff --git a/src/API/Kitsu.php b/src/API/Kitsu.php index cc79be83..9ac7bb8c 100644 --- a/src/API/Kitsu.php +++ b/src/API/Kitsu.php @@ -110,21 +110,21 @@ class Kitsu { return [ 'name' => 'Crunchyroll', 'link' => true, - 'logo' => '' + 'image' => 'streaming-logos/crunchyroll.svg', ]; case 'www.funimation.com': return [ 'name' => 'Funimation', 'link' => true, - 'logo' => '' + 'image' => 'streaming-logos/funimation.svg', ]; case 'www.hulu.com': return [ 'name' => 'Hulu', 'link' => true, - 'logo' => '' + 'image' => 'streaming-logos/hulu.svg', ]; // Default to Netflix, because the API links are broken, @@ -133,7 +133,7 @@ class Kitsu { return [ 'name' => 'Netflix', 'link' => false, - 'logo' => '' + 'image' => 'streaming-logos/netflix.svg', ]; } } diff --git a/src/Controller.php b/src/Controller.php index 63e1194c..4f27026b 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -107,10 +107,10 @@ class Controller { $this->session = $session->getSegment(SESSION_SEGMENT); // Set a 'previous' flash value for better redirects - $server_params = $this->request->getServerParams(); - if (array_key_exists('HTTP_REFERER', $server_params)) + $serverParams = $this->request->getServerParams(); + if (array_key_exists('HTTP_REFERER', $serverParams)) { - $this->session->setFlash('previous', $server_params['HTTP_REFERER']); + $this->session->setFlash('previous', $serverParams['HTTP_REFERER']); } // Set a message box if available @@ -124,8 +124,8 @@ class Controller { */ public function redirectToDefaultRoute() { - $default_type = $this->config->get(['routes', 'route_config', 'default_list']); - $this->redirect($this->urlGenerator->defaultUrl($default_type), 303); + $defaultType = $this->config->get(['routes', 'route_config', 'default_list']); + $this->redirect($this->urlGenerator->defaultUrl($defaultType), 303); } /** @@ -133,7 +133,7 @@ class Controller { * * @return void */ - public function redirect_to_previous() + public function redirectToPrevious() { $previous = $this->session->getFlash('previous'); $this->redirect($previous, 303); @@ -145,31 +145,31 @@ class Controller { * @param string|null $url * @return void */ - public function set_session_redirect($url = NULL) + public function setSessionRedirect($url = NULL) { - $server_params = $this->request->getServerParams(); + $serverParams = $this->request->getServerParams(); - if ( ! array_key_exists('HTTP_REFERER', $server_params)) + if ( ! array_key_exists('HTTP_REFERER', $serverParams)) { return; } $util = $this->container->get('util'); - $double_form_page = $server_params['HTTP_REFERER'] === $this->request->getUri(); + $doubleFormPage = $serverParams['HTTP_REFERER'] === $this->request->getUri(); // Don't attempt to set the redirect url if // the page is one of the form type pages, // and the previous page is also a form type page_segments - if ($double_form_page) + if ($doubleFormPage) { return; } if (is_null($url)) { - $url = $util->is_view_page() + $url = $util->isViewPage() ? $this->request->url->get() - : $server_params['HTTP_REFERER']; + : $serverParams['HTTP_REFERER']; } $this->session->set('redirect_url', $url); @@ -180,7 +180,7 @@ class Controller { * * @return void */ - public function session_redirect() + public function sessionRedirect() { $target = $this->session->get('redirect_url'); if (empty($target)) @@ -221,7 +221,7 @@ class Controller { * @throws InvalidArgumentException * @return string */ - protected function load_partial($view, $template, array $data = []) + protected function loadPartial($view, $template, array $data = []) { $router = $this->container->get('dispatcher'); @@ -234,14 +234,14 @@ class Controller { $data['route_path'] = $route ? $router->getRoute()->path : ''; - $template_path = _dir($this->config->get('view_path'), "{$template}.php"); + $templatePath = _dir($this->config->get('view_path'), "{$template}.php"); - if ( ! is_file($template_path)) + if ( ! is_file($templatePath)) { throw new InvalidArgumentException("Invalid template : {$template}"); } - return $view->renderTemplate($template_path, (array)$data); + return $view->renderTemplate($templatePath, (array)$data); } /** @@ -252,17 +252,17 @@ class Controller { * @param array $data * @return void */ - protected function render_full_page($view, $template, array $data) + protected function renderFullPage($view, $template, array $data) { - $view->appendOutput($this->load_partial($view, 'header', $data)); + $view->appendOutput($this->loadPartial($view, 'header', $data)); if (array_key_exists('message', $data) && is_array($data['message'])) { - $view->appendOutput($this->load_partial($view, 'message', $data['message'])); + $view->appendOutput($this->loadPartial($view, 'message', $data['message'])); } - $view->appendOutput($this->load_partial($view, $template, $data)); - $view->appendOutput($this->load_partial($view, 'footer', $data)); + $view->appendOutput($this->loadPartial($view, $template, $data)); + $view->appendOutput($this->loadPartial($view, 'footer', $data)); } /** @@ -280,11 +280,11 @@ class Controller { if ($status !== '') { - $message = $this->show_message($view, 'error', $status); + $message = $this->showMessage($view, 'error', $status); } // Set the redirect url - $this->set_session_redirect(); + $this->setSessionRedirect(); $this->outputHTML('login', [ 'title' => 'Api login', @@ -303,10 +303,10 @@ class Controller { $post = $this->request->getParsedBody(); if ($auth->authenticate($post['password'])) { - return $this->session_redirect(); + return $this->sessionRedirect(); } - $this->set_flash_message('Invalid username or password.'); + $this->setFlashMessage('Invalid username or password.'); $this->redirect($this->urlGenerator->url('login'), 303); } @@ -361,12 +361,21 @@ class Controller { * @param string $type * @return void */ - public function set_flash_message($message, $type = "info") + public function setFlashMessage($message, $type = "info") { - $this->session->setFlash('message', [ + static $messages; + + if (!$messages) + { + $messages = []; + } + + $messages[] = [ 'message_type' => $type, 'message' => $message - ]); + ]; + + $this->session->setFlash('message', $messages); } /** @@ -393,7 +402,7 @@ class Controller { */ protected function showMessage($view, $type, $message) { - return $this->load_partial($view, 'message', [ + return $this->loadPartial($view, 'message', [ 'message_type' => $type, 'message' => $message ]); @@ -416,7 +425,7 @@ class Controller { } $view->setStatusCode($code); - $this->render_full_page($view, $template, $data); + $this->renderFullPage($view, $template, $data); } /** diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index 5e3eb59e..7b04fa05 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -132,7 +132,7 @@ class Anime extends BaseController { AnimeWatchingStatus::COMPLETED => 'Completed' ]; - $this->set_session_redirect(); + $this->setSessionRedirect(); $this->outputHTML('anime/add', [ 'title' => $this->config->get('whose_list') . "'s Anime List · Add", @@ -166,7 +166,7 @@ class Anime extends BaseController { $this->set_flash_message('Failed to add new anime to list', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** @@ -191,7 +191,7 @@ class Anime extends BaseController { ->titleize(); } - $this->set_session_redirect(); + $this->setSessionRedirect(); $this->outputHTML('anime/edit', [ 'title' => $this->config->get('whose_list') . @@ -240,7 +240,7 @@ class Anime extends BaseController { $this->set_flash_message('Failed to update anime.', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** @@ -285,7 +285,7 @@ class Anime extends BaseController { $this->set_flash_message('Failed to delete anime.', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** diff --git a/src/Controller/Collection.php b/src/Controller/Collection.php index e8955c5e..dc5b560b 100644 --- a/src/Controller/Collection.php +++ b/src/Controller/Collection.php @@ -115,7 +115,7 @@ class Collection extends BaseController { */ public function form($id = NULL) { - $this->set_session_redirect(); + $this->setSessionRedirect(); $action = (is_null($id)) ? "Add" : "Edit"; @@ -146,7 +146,7 @@ class Collection extends BaseController { $this->set_flash_message('Failed to update collection item', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** @@ -167,7 +167,7 @@ class Collection extends BaseController { $this->set_flash_message('Failed to add collection item.', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** diff --git a/src/Controller/Manga.php b/src/Controller/Manga.php index fc273abe..7bc3c9ec 100644 --- a/src/Controller/Manga.php +++ b/src/Controller/Manga.php @@ -115,7 +115,7 @@ class Manga extends Controller { ->titleize(); } - $this->set_session_redirect(); + $this->setSessionRedirect(); $this->outputHTML('manga/add', [ 'title' => $this->config->get('whose_list') . "'s Manga List · Add", @@ -149,7 +149,7 @@ class Manga extends Controller { $this->set_flash_message('Failed to add new manga to list' . $result['body'], 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** @@ -161,7 +161,7 @@ class Manga extends Controller { */ public function edit($id, $status = "All") { - $this->set_session_redirect(); + $this->setSessionRedirect(); $item = $this->model->getLibraryItem($id); $title = $this->config->get('whose_list') . "'s Manga List · Edit"; @@ -211,7 +211,7 @@ class Manga extends Controller { } - $this->session_redirect(); + $this->sessionRedirect(); } /** @@ -257,7 +257,7 @@ class Manga extends Controller { $this->set_flash_message('Failed to delete manga.', 'error'); } - $this->session_redirect(); + $this->sessionRedirect(); } /** diff --git a/src/Dispatcher.php b/src/Dispatcher.php index 29f88fb9..97c2e656 100644 --- a/src/Dispatcher.php +++ b/src/Dispatcher.php @@ -52,9 +52,9 @@ class Dispatcher extends RoutingBase { /** * Routes added to router - * @var array $output_routes + * @var array $outputRoutes */ - protected $output_routes; + protected $outputRoutes; /** * Constructor @@ -68,7 +68,7 @@ class Dispatcher extends RoutingBase { $this->matcher = $container->get('aura-router')->getMatcher(); $this->request = $container->get('request'); - $this->output_routes = $this->_setupRoutes(); + $this->outputRoutes = $this->setupRoutes(); } /** @@ -80,12 +80,12 @@ class Dispatcher extends RoutingBase { { $logger = $this->container->getLogger('default'); - $raw_route = $this->request->getUri()->getPath(); - $route_path = "/" . trim($raw_route, '/'); + $rawRoute = $this->request->getUri()->getPath(); + $routePath = "/" . trim($rawRoute, '/'); $logger->info('Dispatcher - Routing data from get_route method'); $logger->info(print_r([ - 'route_path' => $route_path + 'route_path' => $routePath ], TRUE)); return $this->matcher->match($this->request); @@ -98,7 +98,7 @@ class Dispatcher extends RoutingBase { */ public function getOutputRoutes() { - return $this->output_routes; + return $this->outputRoutes; } /** @@ -131,10 +131,10 @@ class Dispatcher extends RoutingBase { { // If not route was matched, return an appropriate http // error message - $error_route = $this->getErrorParams(); + $errorRoute = $this->getErrorParams(); $controllerName = DEFAULT_CONTROLLER; - $actionMethod = $error_route['action_method']; - $params = $error_route['params']; + $actionMethod = $errorRoute['action_method']; + $params = $errorRoute['params']; } $this->call($controllerName, $actionMethod, $params); @@ -152,7 +152,7 @@ class Dispatcher extends RoutingBase { { if (array_key_exists('controller', $route->attributes)) { - $controller_name = $route->attributes['controller']; + $controllerName = $route->attributes['controller']; } else { @@ -160,13 +160,13 @@ class Dispatcher extends RoutingBase { } // Get the full namespace for a controller if a short name is given - if (strpos($controller_name, '\\') === FALSE) + if (strpos($controllerName, '\\') === FALSE) { $map = $this->getControllerList(); - $controller_name = $map[$controller_name]; + $controllerName = $map[$controllerName]; } - $action_method = (array_key_exists('action', $route->attributes)) + $actionMethod = (array_key_exists('action', $route->attributes)) ? $route->attributes['action'] : NOT_FOUND_METHOD; @@ -186,8 +186,8 @@ class Dispatcher extends RoutingBase { $logger->info(json_encode($params)); return [ - 'controller_name' => $controller_name, - 'action_method' => $action_method, + 'controller_name' => $controllerName, + 'action_method' => $actionMethod, 'params' => $params ]; } @@ -199,16 +199,16 @@ class Dispatcher extends RoutingBase { */ public function getController() { - $route_type = $this->__get('default_list'); - $request_uri = $this->request->getUri()->getPath(); - $path = trim($request_uri, '/'); + $routeType = $this->__get('default_list'); + $requestUri = $this->request->getUri()->getPath(); + $path = trim($requestUri, '/'); $segments = explode('/', $path); $controller = reset($segments); if (empty($controller)) { - $controller = $route_type; + $controller = $routeType; } return $controller; @@ -221,22 +221,22 @@ class Dispatcher extends RoutingBase { */ public function getControllerList() { - $default_namespace = DEFAULT_CONTROLLER_NAMESPACE; - $path = str_replace('\\', '/', $default_namespace); + $defaultNamespace = DEFAULT_CONTROLLER_NAMESPACE; + $path = str_replace('\\', '/', $defaultNamespace); $path = str_replace('Aviat/AnimeClient/', '', $path); $path = trim($path, '/'); - $actual_path = realpath(_dir(SRC_DIR, $path)); - $class_files = glob("{$actual_path}/*.php"); + $actualPath = realpath(_dir(SRC_DIR, $path)); + $classFiles = glob("{$actualPath}/*.php"); $controllers = []; - foreach ($class_files as $file) + foreach ($classFiles as $file) { - $raw_class_name = basename(str_replace(".php", "", $file)); - $path = strtolower(basename($raw_class_name)); - $class_name = trim($default_namespace . '\\' . $raw_class_name, '\\'); + $rawClassName = basename(str_replace(".php", "", $file)); + $path = strtolower(basename($rawClassName)); + $className = trim($defaultNamespace . '\\' . $rawClassName, '\\'); - $controllers[$path] = $class_name; + $controllers[$path] = $className; } return $controllers; @@ -260,6 +260,7 @@ class Dispatcher extends RoutingBase { // Run the appropriate controller method $logger->debug('Dispatcher - controller arguments'); $logger->debug(print_r($params, TRUE)); + call_user_func_array([$controller, $method], $params); } @@ -277,7 +278,7 @@ class Dispatcher extends RoutingBase { $logger->info('Dispatcher - failed route'); $logger->info(print_r($failure, TRUE)); - $action_method = ERROR_MESSAGE_METHOD; + $actionMethod = ERROR_MESSAGE_METHOD; $params = []; @@ -300,13 +301,13 @@ class Dispatcher extends RoutingBase { default: // Fall back to a 404 message - $action_method = NOT_FOUND_METHOD; + $actionMethod = NOT_FOUND_METHOD; break; } return [ 'params' => $params, - 'action_method' => $action_method + 'action_method' => $actionMethod ]; } @@ -315,9 +316,9 @@ class Dispatcher extends RoutingBase { * * @return array */ - protected function _setupRoutes() + protected function setupRoutes() { - $route_type = $this->getController(); + $routeType = $this->getController(); // Add routes $routes = []; @@ -326,18 +327,18 @@ class Dispatcher extends RoutingBase { $path = $route['path']; unset($route['path']); - $controller_map = $this->getControllerList(); - $controller_class = (array_key_exists($route_type, $controller_map)) - ? $controller_map[$route_type] + $controllerMap = $this->getControllerList(); + $controllerClass = (array_key_exists($routeType, $controllerMap)) + ? $controllerMap[$routeType] : DEFAULT_CONTROLLER; - if (array_key_exists($route_type, $controller_map)) + if (array_key_exists($routeType, $controllerMap)) { - $controller_class = $controller_map[$route_type]; + $controllerClass = $controllerMap[$routeType]; } // Prepend the controller to the route parameters - $route['controller'] = $controller_class; + $route['controller'] = $controllerClass; // Select the appropriate router method based on the http verb $add = (array_key_exists('verb', $route)) diff --git a/src/MenuGenerator.php b/src/MenuGenerator.php index fe09acf5..440d3f8c 100644 --- a/src/MenuGenerator.php +++ b/src/MenuGenerator.php @@ -62,7 +62,7 @@ class MenuGenerator extends UrlGenerator { * @param array $menus * @return array */ - protected function parse_config(array $menus) + protected function parseConfig(array $menus) { $parsed = []; @@ -88,17 +88,17 @@ class MenuGenerator extends UrlGenerator { public function generate($menu) { $menus = $this->config->get('menus'); - $parsed_config = $this->parse_config($menus); + $parsedConfig = $this->parseConfig($menus); // Bail out early on invalid menu - if ( ! $this->arr($parsed_config)->hasKey($menu)) + if ( ! $this->arr($parsedConfig)->hasKey($menu)) { return ''; } - $menu_config = $parsed_config[$menu]; + $menuConfig = $parsedConfig[$menu]; - foreach ($menu_config as $title => $path) + foreach ($menuConfig as $title => $path) { $has = $this->string($this->path())->contains($path); $selected = ($has && strlen($this->path()) >= strlen($path)); diff --git a/src/Util.php b/src/Util.php index 7cbcd427..e147a2e0 100644 --- a/src/Util.php +++ b/src/Util.php @@ -31,7 +31,7 @@ class Util { * Routes that don't require a second navigation level * @var array */ - private static $form_pages = [ + private static $formPages = [ 'edit', 'add', 'update', @@ -65,7 +65,7 @@ class Util { * @param string $b - Second item to compare * @return string */ - public static function is_selected($a, $b) + public static function isSelected($a, $b) { return ($a === $b) ? 'selected' : ''; } @@ -77,7 +77,7 @@ class Util { * @param string $b - Second item to compare * @return string */ - public static function is_not_selected($a, $b) + public static function isNotSelected($a, $b) { return ($a !== $b) ? 'selected' : ''; } @@ -87,13 +87,13 @@ class Util { * * @return bool */ - public function is_view_page() + public function isViewPage() { $url = $this->container->get('request') ->getUri(); - $page_segments = explode("/", (string) $url); + $pageSegments = explode("/", (string) $url); - $intersect = array_intersect($page_segments, self::$form_pages); + $intersect = array_intersect($pageSegments, self::$formPages); return empty($intersect); } @@ -104,9 +104,9 @@ class Util { * * @return boolean */ - public function is_form_page() + public function isFormPage() { - return ! $this->is_view_page(); + return ! $this->isViewPage(); } } diff --git a/tests/MenuGeneratorTest.php b/tests/MenuGeneratorTest.php index d412c9c9..dc63c6b0 100644 --- a/tests/MenuGeneratorTest.php +++ b/tests/MenuGeneratorTest.php @@ -62,7 +62,7 @@ class MenuGeneratorTest extends AnimeClientTestCase { 'All' => '/anime/all' ] ]; - $this->assertEquals($expected, $friend->parse_config($menus)); + $this->assertEquals($expected, $friend->parseConfig($menus)); } public function testBadConfig() diff --git a/tests/UtilTest.php b/tests/UtilTest.php index f67e9b53..5278c635 100644 --- a/tests/UtilTest.php +++ b/tests/UtilTest.php @@ -29,19 +29,19 @@ class UtilTest extends AnimeClientTestCase { public function testIsSelected() { // Failure to match - $this->assertEquals('', Util::is_selected('foo', 'bar')); + $this->assertEquals('', Util::isSelected('foo', 'bar')); // Matches - $this->assertEquals('selected', Util::is_selected('foo', 'foo')); + $this->assertEquals('selected', Util::isSelected('foo', 'foo')); } public function testIsNotSelected() { // Failure to match - $this->assertEquals('selected', Util::is_not_selected('foo', 'bar')); + $this->assertEquals('selected', Util::isNotSelected('foo', 'bar')); // Matches - $this->assertEquals('', Util::is_not_selected('foo', 'foo')); + $this->assertEquals('', Util::isNotSelected('foo', 'foo')); } public function dataIsViewPage() @@ -76,7 +76,7 @@ class UtilTest extends AnimeClientTestCase { 'REQUEST_URI' => $uri ] ]); - $this->assertEquals($expected, $this->util->is_view_page()); + $this->assertEquals($expected, $this->util->isViewPage()); } /** @@ -89,6 +89,6 @@ class UtilTest extends AnimeClientTestCase { 'REQUEST_URI' => $uri ] ]); - $this->assertEquals(!$expected, $this->util->is_form_page()); + $this->assertEquals(!$expected, $this->util->isFormPage()); } } diff --git a/tests/test_data/Kitsu/animeAfterTransform.json b/tests/test_data/Kitsu/animeAfterTransform.json index 19230fe7..32c29e95 100644 --- a/tests/test_data/Kitsu/animeAfterTransform.json +++ b/tests/test_data/Kitsu/animeAfterTransform.json @@ -15,7 +15,7 @@ "meta": { "name": "Crunchyroll", "link": true, - "logo": "<\/path><\/path><\/g><\/svg>" + "image": "streaming-logos\/crunchyroll.svg" }, "link": "http:\/\/www.crunchyroll.com\/attack-on-titan", "subs": ["en"], @@ -24,7 +24,7 @@ "meta": { "name": "Hulu", "link": true, - "logo": "<\/path><\/svg>" + "image": "streaming-logos\/hulu.svg" }, "link": "http:\/\/www.hulu.com\/attack-on-titan", "subs": ["en"], @@ -33,7 +33,7 @@ "meta": { "name": "Funimation", "link": true, - "logo": "<\/path><\/svg>" + "image": "streaming-logos\/funimation.svg" }, "link": "http:\/\/www.funimation.com\/shows\/attack-on-titan\/videos\/episodes", "subs": ["en"], @@ -42,7 +42,7 @@ "meta": { "name": "Netflix", "link": false, - "logo": "<\/path><\/svg>" + "image": "streaming-logos\/netflix.svg" }, "link": "t", "subs": ["en"], From 07b1422fad6fc5d9d63171d0b022459a7c1bc1fd Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 16 Feb 2017 14:30:39 -0500 Subject: [PATCH 35/56] Reference svg logos as image files, not raw html --- app/views/anime/cover.php | 4 ++-- app/views/anime/details.php | 18 +++++++++--------- app/views/anime/list.php | 6 +++--- app/views/header.php | 9 ++++++--- app/views/main-menu.php | 6 +++--- public/css/base.css | 1 + public/css/base.myth.css | 1 + 7 files changed, 25 insertions(+), 20 deletions(-) diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index 51cffb84..bd320894 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -55,10 +55,10 @@ diff --git a/app/views/anime/details.php b/app/views/anime/details.php index 6aa91b08..389d060c 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -54,21 +54,21 @@
- + - - + + diff --git a/app/views/anime/list.php b/app/views/anime/list.php index f2857e26..a9ff92b6 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -64,11 +64,11 @@ diff --git a/app/views/header.php b/app/views/header.php index e49e45f2..3575945c 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,7 +6,7 @@ - + @@ -14,7 +14,10 @@
\ No newline at end of file diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 9542d7eb..dc5d86a5 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -33,12 +33,12 @@ diff --git a/public/css/base.css b/public/css/base.css index 475583b1..fca8d1cc 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -1316,6 +1316,7 @@ a:hover, a:active { .streaming-logo { width: 50px; height: 50px; + vertical-align:middle; } .cover_streaming_link .streaming-logo { diff --git a/public/css/base.myth.css b/public/css/base.myth.css index a70e419c..d855d069 100644 --- a/public/css/base.myth.css +++ b/public/css/base.myth.css @@ -568,6 +568,7 @@ a:hover, a:active { .streaming-logo { width: 50px; height: 50px; + vertical-align:middle; } .cover_streaming_link .streaming-logo { From 8898655a4932318d65b88a5a1f523e944ca3c628 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 17 Feb 2017 08:25:19 -0500 Subject: [PATCH 36/56] Various tweaking --- RoboFile.php | 46 ++++++----------- app/views/anime/cover.php | 8 ++- app/views/header.php | 6 +-- composer.json | 8 +-- public/css/base.css | 2 + public/css/base.myth.css | 3 ++ favicon.ico => public/favicon.ico | Bin src/API/ParallelAPIRequest.php | 83 ++++++++++++++++++++++++++++++ src/Controller.php | 12 +++-- src/Controller/Anime.php | 12 ++--- src/Model/API.php | 26 ---------- src/Model/Anime.php | 3 +- src/Model/Manga.php | 10 ++-- 13 files changed, 138 insertions(+), 81 deletions(-) rename favicon.ico => public/favicon.ico (100%) create mode 100644 src/API/ParallelAPIRequest.php diff --git a/RoboFile.php b/RoboFile.php index d54b3eae..8d483d27 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -1,4 +1,7 @@ -taskPhpUnit() + $this->_run(['vendor/bin/phpunit -c build']); + /* $this->taskPhpUnit() ->configFile('build/phpunit.xml') ->printed(true) - ->run(); + ->run(); */ } /** @@ -128,7 +132,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 +140,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 +207,13 @@ class RoboFile extends \Robo\Tasks { public function test() { $this->lint(); - $this->taskPHPUnit() + + $this->_run(['phpunit']); + + /*$this->taskPHPUnit() ->configFile('phpunit.xml') ->printed(true) - ->run(); + ->run();*/ } /** @@ -275,7 +259,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/views/anime/cover.php b/app/views/anime/cover.php index bd320894..4c539a11 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -28,7 +28,13 @@ isAuthenticated()): ?>
- ">Edit + Edit
diff --git a/app/views/header.php b/app/views/header.php index 3575945c..f4b29528 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,8 +6,8 @@ - - + + @@ -16,7 +16,7 @@ diff --git a/composer.json b/composer.json index 4b91d3b0..3dfd8d94 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "require-dev": { "pdepend/pdepend": "^2.2", "sebastian/phpcpd": "^3.0", - "theseer/phpdox": "^0.9.0", + "theseer/phpdox": "*", "phploc/phploc": "^3.0", "phpmd/phpmd": "^2.4", "phpunit/phpunit": "^6.0", @@ -46,6 +46,8 @@ }, "scripts": { "build:css": "cd public && npm run build && cd ..", - "watch:css": "cd public && npm run watch" + "coverage": "vendor/bin/phpunit -c build", + "watch:css": "cd public && npm run watch", + "test": "vendor/bin/phpunit" } -} \ No newline at end of file +} diff --git a/public/css/base.css b/public/css/base.css index fca8d1cc..89b3c380 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -1044,6 +1044,7 @@ a:hover, a:active { .medium_metadata > div, .row { text-shadow:1px 2px 1px rgba(0, 0, 0, .85); + background:#000; background:rgba(0, 0, 0, .45); color:#ffffff; padding:0.25em 0.125em; @@ -1127,6 +1128,7 @@ a:hover, a:active { .anime .row, .manga .row { width:100%; + background:#000; background:rgba(0, 0, 0, .45); display: -webkit-box; display: -ms-flexbox; diff --git a/public/css/base.myth.css b/public/css/base.myth.css index d855d069..24285199 100644 --- a/public/css/base.myth.css +++ b/public/css/base.myth.css @@ -4,6 +4,7 @@ --link-shadow: 1px 1px 1px #000; --shadow: 1px 2px 1px rgba(0, 0, 0, 0.85); --title-overlay: rgba(0, 0, 0, 0.45); + --title-overlay-fallback: #000; --text-color: #ffffff; --normal-padding: 0.25em 0.125em; --link-hover-color: #7d12db; @@ -315,6 +316,7 @@ a:hover, a:active { .medium_metadata > div, .row { text-shadow: var(--shadow); + background: var(--title-overlay-fallback); background: var(--title-overlay); color: var(--text-color); padding: var(--normal-padding); @@ -398,6 +400,7 @@ a:hover, a:active { .anime .row, .manga .row { width:100%; + background: var(--title-overlay-fallback); background: var(--title-overlay); display: flex; align-content: space-around; diff --git a/favicon.ico b/public/favicon.ico similarity index 100% rename from favicon.ico rename to public/favicon.ico diff --git a/src/API/ParallelAPIRequest.php b/src/API/ParallelAPIRequest.php new file mode 100644 index 00000000..71170738 --- /dev/null +++ b/src/API/ParallelAPIRequest.php @@ -0,0 +1,83 @@ + + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ + +namespace Aviat\AnimeClient\API; + +use function Amp\{all, some, wait}; + +use Amp\Artax\Client; + +/** + * Class to simplify making and validating simultaneous requests + */ +class ParallelAPIRequest { + + /** + * Set of requests to make in parallel + * + * @var array + */ + protected $requests = []; + + /** + * Add a request + * + * @param string|Request $request + * @param string|number $key + * @return self + */ + public function addRequest($request, $key = null): self + { + if ( ! is_null($key)) + { + $this->requests[$key] = $request; + return $this; + } + + $this->requests[] = $request; + return $this; + } + + /** + * Add multiple requests + * + * @param string[]|Request[] $requests + * @return self + */ + public function addRequests(array $requests): self + { + array_walk($requests, [$this, 'addRequest']); + return $this; + } + + /** + * Actually make the requests + * + * @param bool $allowFailingRequests + * @return array + */ + public function makeRequests(bool $allowFailingRequests = FALSE): array + { + $client = new Client(); + $promises = $client->requestMulti($this->requests); + + $func = ($allowFailingRequests) ? 'some' : 'all'; + + $results = wait($func($promises)); + + return $results; + } +} \ No newline at end of file diff --git a/src/Controller.php b/src/Controller.php index 4f27026b..5ba581c5 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -97,10 +97,14 @@ class Controller { $this->config = $container->get('config'); $this->request = $container->get('request'); $this->response = $container->get('response'); - $this->baseData['url'] = $auraUrlGenerator; - $this->baseData['urlGenerator'] = $urlGenerator; - $this->baseData['auth'] = $container->get('auth'); - $this->baseData['config'] = $this->config; + + $this->baseData = array_merge((array)$this->baseData, [ + 'url' => $auraUrlGenerator, + 'urlGenerator' => $urlGenerator, + 'auth' => $container->get('auth'), + 'config' => $this->config + ]); + $this->urlGenerator = $urlGenerator; $session = $container->get('session'); diff --git a/src/Controller/Anime.php b/src/Controller/Anime.php index 7b04fa05..814bf4b5 100644 --- a/src/Controller/Anime.php +++ b/src/Controller/Anime.php @@ -158,12 +158,12 @@ class Anime extends BaseController { if ($result) { - $this->set_flash_message('Added new anime to list', 'success'); + $this->setFlashMessage('Added new anime to list', 'success'); $this->cache->clear(); } else { - $this->set_flash_message('Failed to add new anime to list', 'error'); + $this->setFlashMessage('Failed to add new anime to list', 'error'); } $this->sessionRedirect(); @@ -232,12 +232,12 @@ class Anime extends BaseController { if ($fullResult['statusCode'] === 200) { - $this->set_flash_message("Successfully updated.", 'success'); + $this->setFlashMessage("Successfully updated.", 'success'); $this->cache->clear(); } else { - $this->set_flash_message('Failed to update anime.', 'error'); + $this->setFlashMessage('Failed to update anime.', 'error'); } $this->sessionRedirect(); @@ -277,12 +277,12 @@ class Anime extends BaseController { if ((bool)$response === TRUE) { - $this->set_flash_message("Successfully deleted anime.", 'success'); + $this->setFlashMessage("Successfully deleted anime.", 'success'); $this->cache->clear(); } else { - $this->set_flash_message('Failed to delete anime.', 'error'); + $this->setFlashMessage('Failed to delete anime.', 'error'); } $this->sessionRedirect(); diff --git a/src/Model/API.php b/src/Model/API.php index 8f07adfb..354761b6 100644 --- a/src/Model/API.php +++ b/src/Model/API.php @@ -16,7 +16,6 @@ namespace Aviat\AnimeClient\Model; -use Aviat\Ion\Di\{ContainerAware, ContainerInterface}; use Aviat\Ion\Model; /** @@ -24,31 +23,6 @@ use Aviat\Ion\Model; */ class API extends Model { - use ContainerAware; - - /** - * Config manager - * @var ConfigInterface - */ - protected $config; - - /** - * Cache manager - * @var \Psr\Cache\CacheItemPoolInterface - */ - protected $cache; - - /** - * Constructor - * - * @param ContainerInterface $container - */ - public function __construct(ContainerInterface $container) - { - $this->container = $container; - $this->config = $container->get('config'); - } - /** * Sort the list entries by their title * diff --git a/src/Model/Anime.php b/src/Model/Anime.php index a4fc70d2..969fa5a7 100644 --- a/src/Model/Anime.php +++ b/src/Model/Anime.php @@ -18,6 +18,7 @@ namespace Aviat\AnimeClient\Model; use function Amp\some; use function Amp\wait; + use Amp\Artax\Client; use Aviat\AnimeClient\API\Kitsu\Enum\AnimeWatchingStatus; use Aviat\Ion\Di\ContainerInterface; @@ -58,8 +59,6 @@ class Anime extends API { * @param ContainerInterface $container */ public function __construct(ContainerInterface $container) { - parent::__construct($container); - $config = $container->get('config'); $this->kitsuModel = $container->get('kitsu-model'); $this->malModel = $container->get('mal-model'); diff --git a/src/Model/Manga.php b/src/Model/Manga.php index 86f949e5..a3f832e1 100644 --- a/src/Model/Manga.php +++ b/src/Model/Manga.php @@ -36,7 +36,7 @@ class Manga extends API * Map API constants to display constants * @var array */ - protected $const_map = [ + protected $constMap = [ MangaReadingStatus::READING => self::READING, MangaReadingStatus::PLAN_TO_READ => self::PLAN_TO_READ, MangaReadingStatus::ON_HOLD => self::ON_HOLD, @@ -44,7 +44,7 @@ class Manga extends API MangaReadingStatus::COMPLETED => self::COMPLETED ]; - protected $status_map = [ + protected $statusMap = [ 'current' => self::READING, 'planned' => self::PLAN_TO_READ, 'completed' => self::COMPLETED, @@ -59,8 +59,6 @@ class Manga extends API public function __construct(ContainerInterface $container) { - parent::__construct($container); - $this->kitsuModel = $container->get('kitsu-model'); } @@ -72,7 +70,7 @@ class Manga extends API */ public function getList($status) { - $APIstatus = array_flip($this->const_map)[$status]; + $APIstatus = array_flip($this->constMap)[$status]; $data = $this->kitsuModel->getMangaList($APIstatus); return $this->mapByStatus($data)[$status]; } @@ -161,7 +159,7 @@ class Manga extends API ]; foreach ($data as &$entry) { - $key = $this->status_map[$entry['reading_status']]; + $key = $this->statusMap[$entry['reading_status']]; $output[$key][] = $entry; } From 6efe1ffbc890c9a4c190d36414487ecc4a07b8b3 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 17 Feb 2017 08:39:27 -0500 Subject: [PATCH 37/56] Slightly reorganize model hierarchy --- src/Model/API.php | 8 +++----- src/Model/AbstractModel.php | 26 ++++++++++++++++++++++++++ src/Model/DB.php | 3 +-- 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 src/Model/AbstractModel.php diff --git a/src/Model/API.php b/src/Model/API.php index 354761b6..6c6442ee 100644 --- a/src/Model/API.php +++ b/src/Model/API.php @@ -16,12 +16,10 @@ namespace Aviat\AnimeClient\Model; -use Aviat\Ion\Model; - /** * Base model for api interaction */ -class API extends Model { +class API extends AbstractModel { /** * Sort the list entries by their title @@ -31,13 +29,13 @@ class API extends Model { * @param string $sort_key * @return void */ - protected function sortByName(array &$array, string $sort_key) + protected function sortByName(array &$array, string $sortKey) { $sort = []; foreach ($array as $key => $item) { - $sort[$key] = $item[$sort_key]['titles'][0]; + $sort[$key] = $item[$sortKey]['titles'][0]; } array_multisort($sort, SORT_ASC, $array); diff --git a/src/Model/AbstractModel.php b/src/Model/AbstractModel.php new file mode 100644 index 00000000..c7cab2ec --- /dev/null +++ b/src/Model/AbstractModel.php @@ -0,0 +1,26 @@ + + * @copyright 2015 - 2017 Timothy J. Warren + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @version 4.0 + * @link https://github.com/timw4mail/HummingBirdAnimeClient + */ + +namespace Aviat\AnimeClient\Model; + +use Aviat\Ion\StringWrapper; + +/** + * Base class for Models + */ +abstract class AbstractModel { + use StringWrapper; +} \ No newline at end of file diff --git a/src/Model/DB.php b/src/Model/DB.php index 647076fc..a4a29167 100644 --- a/src/Model/DB.php +++ b/src/Model/DB.php @@ -17,12 +17,11 @@ namespace Aviat\AnimeClient\Model; use Aviat\Ion\Di\{ContainerAware, ContainerInterface}; -use Aviat\Ion\Model; /** * Base model for database interaction */ -class DB extends Model { +class DB extends AbstractModel { use ContainerAware; /** From 30b43fd27cf58a9c815399c12a2d9a9524dce030 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 17 Feb 2017 10:55:17 -0500 Subject: [PATCH 38/56] Lots of style fixes, with more to come --- RoboFile.php | 9 +----- .../WhiteSpace/LogicalNotSpacingSniff.php | 2 +- composer.json | 5 ++-- phpdoc.dist.xml | 6 ++-- build/phpdox.xml => phpdox.xml | 12 ++++---- src/API/APIRequestBuilder.php | 1 + src/API/FailedResponseException.php | 3 ++ src/API/JsonAPI.php | 2 +- src/API/Kitsu.php | 25 +++++++++-------- src/API/Kitsu/KitsuRequestBuilder.php | 6 ++-- src/API/MAL/MALTrait.php | 12 ++++---- src/API/MAL/Model.php | 2 ++ src/API/ParallelAPIRequest.php | 2 +- src/API/XML.php | 21 +++++++++++--- src/Command/ClearCache.php | 2 ++ src/Command/SyncKitsuWithMal.php | 28 +++++++++++-------- src/Controller.php | 2 +- src/Model/API.php | 2 +- src/Model/Anime.php | 21 ++++++++++++-- src/Model/Manga.php | 10 +++++++ src/UrlGenerator.php | 13 +++++---- 21 files changed, 119 insertions(+), 67 deletions(-) rename build/phpdox.xml => phpdox.xml (95%) diff --git a/RoboFile.php b/RoboFile.php index 8d483d27..466abc62 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -118,9 +118,7 @@ class RoboFile extends Tasks { public function docs() { $cmd_parts = [ - 'cd build', - '../vendor/bin/phpdox', - 'cd ..' + 'phpdox', ]; $this->_run($cmd_parts, ' && '); } @@ -209,11 +207,6 @@ class RoboFile extends Tasks { $this->lint(); $this->_run(['phpunit']); - - /*$this->taskPHPUnit() - ->configFile('phpunit.xml') - ->printed(true) - ->run();*/ } /** 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/composer.json b/composer.json index 3dfd8d94..0719d141 100644 --- a/composer.json +++ b/composer.json @@ -34,11 +34,11 @@ "require-dev": { "pdepend/pdepend": "^2.2", "sebastian/phpcpd": "^3.0", - "theseer/phpdox": "*", + "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", @@ -47,6 +47,7 @@ "scripts": { "build:css": "cd public && npm run build && cd ..", "coverage": "vendor/bin/phpunit -c build", + "docs": "vendor/bin/phpdox", "watch:css": "cd public && npm run watch", "test": "vendor/bin/phpunit" } 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
- - - -    + + + +    - -    + +   
- - + + - +