From fce9764f08c345629ff4764a018cff86a6f00079 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Apr 2020 15:07:08 -0400 Subject: [PATCH 01/27] Clean up public folder, move JS tools to frontEndSrc folder --- app/views/footer.php | 8 +- app/views/header.php | 6 +- frontEndSrc/build-js.js | 71 ++ {public/tools => frontEndSrc}/css.js | 34 +- frontEndSrc/css/auto.css | 3 + frontEndSrc/css/dark.css | 5 + frontEndSrc/css/light.css | 4 + .../css/src/-marx-.css | 0 .../css/src/components.css | 0 .../css/src/dark-override.css | 0 {public => frontEndSrc}/css/src/general.css | 0 .../css/src/responsive.css | 0 {public/tools => frontEndSrc}/cssfilter.js | 0 .../js/anime-client.js | 6 +- {public/js/src => frontEndSrc/js}/anime.js | 2 +- .../js/src/index.js => frontEndSrc/js/anon.js | 2 +- .../js/base/class-list.js | 0 .../js/base/sort-tables.js | 0 .../js/src/base => frontEndSrc/js}/events.js | 75 +- .../js/index.js | 2 +- {public/js/src => frontEndSrc/js}/manga.js | 2 +- .../js}/template-helpers.js | 4 +- {public => frontEndSrc}/package.json | 15 +- {public => frontEndSrc}/test/ajax.php | 0 {public => frontEndSrc}/test/index.html | 12 +- {public => frontEndSrc}/test/lib/mocha.css | 0 .../test/lib/testBundle.js | 0 .../test/tests/AnimeClient.js | 0 {public => frontEndSrc}/test/tests/ajax.js | 0 {public => frontEndSrc}/yarn.lock | 730 +++++++----------- public/css/auto.min.css | 1 + public/css/dark.min.css | 2 +- public/css/light.min.css | 1 + public/css/src/all.css | 4 - public/es/anon.min.js | 1 + public/es/scripts.min.js | 1 + public/js/anon.min.js | 14 + public/js/anon.min.js.map | 1 + public/js/scripts-authed.min.js | 26 - public/js/scripts-authed.min.js.map | 1 - public/js/scripts.min.js | 23 +- public/js/scripts.min.js.map | 2 +- public/js/tables.min.js | 2 +- public/js/tables.min.js.map | 2 +- public/tools/build-js.js | 44 -- 45 files changed, 518 insertions(+), 588 deletions(-) create mode 100644 frontEndSrc/build-js.js rename {public/tools => frontEndSrc}/css.js (50%) create mode 100644 frontEndSrc/css/auto.css create mode 100644 frontEndSrc/css/dark.css create mode 100644 frontEndSrc/css/light.css rename public/css/src/marx.css => frontEndSrc/css/src/-marx-.css (100%) rename {public => frontEndSrc}/css/src/components.css (100%) rename {public => frontEndSrc}/css/src/dark-override.css (100%) rename {public => frontEndSrc}/css/src/general.css (100%) rename {public => frontEndSrc}/css/src/responsive.css (100%) rename {public/tools => frontEndSrc}/cssfilter.js (100%) rename public/js/src/base/AnimeClient.js => frontEndSrc/js/anime-client.js (98%) rename {public/js/src => frontEndSrc/js}/anime.js (98%) rename public/js/src/index.js => frontEndSrc/js/anon.js (89%) rename public/js/src/base/classList.js => frontEndSrc/js/base/class-list.js (100%) rename public/js/src/base/sort_tables.js => frontEndSrc/js/base/sort-tables.js (100%) rename {public/js/src/base => frontEndSrc/js}/events.js (52%) rename public/js/src/index-authed.js => frontEndSrc/js/index.js (67%) rename {public/js/src => frontEndSrc/js}/manga.js (98%) rename {public/js/src => frontEndSrc/js}/template-helpers.js (98%) rename {public => frontEndSrc}/package.json (53%) rename {public => frontEndSrc}/test/ajax.php (100%) rename {public => frontEndSrc}/test/index.html (71%) rename {public => frontEndSrc}/test/lib/mocha.css (100%) rename {public => frontEndSrc}/test/lib/testBundle.js (100%) rename {public => frontEndSrc}/test/tests/AnimeClient.js (100%) rename {public => frontEndSrc}/test/tests/ajax.js (100%) rename {public => frontEndSrc}/yarn.lock (80%) create mode 100644 public/css/auto.min.css create mode 100644 public/css/light.min.css delete mode 100644 public/css/src/all.css create mode 100644 public/es/anon.min.js create mode 100644 public/es/scripts.min.js create mode 100644 public/js/anon.min.js create mode 100644 public/js/anon.min.js.map delete mode 100644 public/js/scripts-authed.min.js delete mode 100644 public/js/scripts-authed.min.js.map delete mode 100644 public/tools/build-js.js diff --git a/app/views/footer.php b/app/views/footer.php index c089893b..e2bdf90e 100644 --- a/app/views/footer.php +++ b/app/views/footer.php @@ -12,11 +12,11 @@ isAuthenticated()): ?> - - + + - - + + diff --git a/app/views/header.php b/app/views/header.php index 77eee069..25828f09 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,11 +6,7 @@ - get('theme') !== 'auto'): ?> - - get('theme') === 'auto'): ?> - - + diff --git a/frontEndSrc/build-js.js b/frontEndSrc/build-js.js new file mode 100644 index 00000000..a4cc6199 --- /dev/null +++ b/frontEndSrc/build-js.js @@ -0,0 +1,71 @@ +import compiler from '@ampproject/rollup-plugin-closure-compiler'; +import { terser } from 'rollup-plugin-terser'; + +const plugins = [ + compiler({ + assumeFunctionWrapper: true, + compilationLevel: 'WHITESPACE_ONLY', //'ADVANCED', + createSourceMap: true, + env: 'BROWSER', + languageIn: 'ECMASCRIPT_2018', + languageOut: 'ES3' + }) +]; + +const defaultOutput = { + format: 'iife', + sourcemap: true, +} + +const nonModules = [{ + input: './js/anon.js', + output: { + ...defaultOutput, + file: '../public/js/anon.min.js', + sourcemapFile: '../public/js/anon.min.js.map', + }, + plugins, +}, { + input: './js/index.js', + output: { + ...defaultOutput, + file: '../public/js/scripts.min.js', + sourcemapFile: '../public/js/scripts.min.js.map', + }, + plugins, +}, { + input: './js/base/sort-tables.js', + output: { + ...defaultOutput, + file: '../public/js/tables.min.js', + sourcemapFile: '../public/js/tables.min.js.map', + }, + plugins, +}]; + +const moduleOutput = { + format: 'es', + sourcemap: false, +} + +let modules = [{ + input: './js/anon.js', + output: { + ...moduleOutput, + file: '../public/es/anon.min.js', + }, + plugins: [terser()], +}, { + input: './js/index.js', + output: { + ...moduleOutput, + file: '../public/es/scripts.min.js', + }, + plugins: [terser()], +}]; + +// Return the config array for rollup +export default [ + ...nonModules, + ...modules, +]; \ No newline at end of file diff --git a/public/tools/css.js b/frontEndSrc/css.js similarity index 50% rename from public/tools/css.js rename to frontEndSrc/css.js index 7877a57a..4b02f04e 100644 --- a/public/tools/css.js +++ b/frontEndSrc/css.js @@ -7,8 +7,9 @@ const atImport = require('postcss-import'); const cssNext = require('postcss-preset-env'); const cssNano = require('cssnano'); -const css = fs.readFileSync('css/src/all.css', 'utf-8'); +const lightCss = fs.readFileSync('css/light.css', 'utf-8'); const darkCss = fs.readFileSync('css/src/dark-override.css', 'utf-8'); +const fullDarkCss = fs.readFileSync('css/dark.css', 'utf-8'); const minOptions = { autoprefixer: false, @@ -29,28 +30,37 @@ const processOptions = { (async () => { // Basic theme - const light = await postcss() + const lightMin = await postcss() .use(atImport()) .use(cssNext(processOptions)) .use(cssNano(minOptions)) - .process(css, { - from: 'css/src/all.css', - to: 'css/app.min.css', + .process(lightCss, { + from: 'css/light.css', + to: '/public/css/light.min.css', }); - fs.writeFileSync('css/app.min.css', light); + fs.writeFileSync('../public/css/light.min.css', lightMin); // Dark theme - const dark = await postcss() + const darkFullMin = await postcss() + .use(atImport()) + .use(cssNext(processOptions)) + .use(cssNano(minOptions)) + .process(fullDarkCss, { + from: 'css/dark.css', + to: '/public/css/dark.min.css', + }); + fs.writeFileSync('../public/css/dark.min.css', darkFullMin); + + // Dark override + const darkMin = await postcss() .use(atImport()) .use(cssNext(processOptions)) .use(cssNano(minOptions)) .process(darkCss, { from: 'css/dark-override.css', - to: 'css/dark.min.css', + to: '/public/css/dark.min.css', }); - fs.writeFileSync('css/dark.min.css', dark); - - const autoDarkCss = `${light} @media (prefers-color-scheme: dark) { ${dark} }` - fs.writeFileSync('css/dark-auto.min.css', autoDarkCss) + const autoDarkCss = `${lightMin} @media (prefers-color-scheme: dark) { ${darkMin} }` + fs.writeFileSync('../public/css/auto.min.css', autoDarkCss) })(); \ No newline at end of file diff --git a/frontEndSrc/css/auto.css b/frontEndSrc/css/auto.css new file mode 100644 index 00000000..37eca657 --- /dev/null +++ b/frontEndSrc/css/auto.css @@ -0,0 +1,3 @@ +@media (prefers-color-scheme: dark) { + @import "src/dark-override.css"; +} \ No newline at end of file diff --git a/frontEndSrc/css/dark.css b/frontEndSrc/css/dark.css new file mode 100644 index 00000000..3b4f7a82 --- /dev/null +++ b/frontEndSrc/css/dark.css @@ -0,0 +1,5 @@ +@import "src/-marx-.css"; +@import "src/general.css"; +@import "src/components.css"; +@import "src/responsive.css"; +@import "src/dark-override.css"; \ No newline at end of file diff --git a/frontEndSrc/css/light.css b/frontEndSrc/css/light.css new file mode 100644 index 00000000..6c328380 --- /dev/null +++ b/frontEndSrc/css/light.css @@ -0,0 +1,4 @@ +@import "src/-marx-.css"; +@import "src/general.css"; +@import "src/components.css"; +@import "src/responsive.css"; diff --git a/public/css/src/marx.css b/frontEndSrc/css/src/-marx-.css similarity index 100% rename from public/css/src/marx.css rename to frontEndSrc/css/src/-marx-.css diff --git a/public/css/src/components.css b/frontEndSrc/css/src/components.css similarity index 100% rename from public/css/src/components.css rename to frontEndSrc/css/src/components.css diff --git a/public/css/src/dark-override.css b/frontEndSrc/css/src/dark-override.css similarity index 100% rename from public/css/src/dark-override.css rename to frontEndSrc/css/src/dark-override.css diff --git a/public/css/src/general.css b/frontEndSrc/css/src/general.css similarity index 100% rename from public/css/src/general.css rename to frontEndSrc/css/src/general.css diff --git a/public/css/src/responsive.css b/frontEndSrc/css/src/responsive.css similarity index 100% rename from public/css/src/responsive.css rename to frontEndSrc/css/src/responsive.css diff --git a/public/tools/cssfilter.js b/frontEndSrc/cssfilter.js similarity index 100% rename from public/tools/cssfilter.js rename to frontEndSrc/cssfilter.js diff --git a/public/js/src/base/AnimeClient.js b/frontEndSrc/js/anime-client.js similarity index 98% rename from public/js/src/base/AnimeClient.js rename to frontEndSrc/js/anime-client.js index e77739af..04869dba 100644 --- a/public/js/src/base/AnimeClient.js +++ b/frontEndSrc/js/anime-client.js @@ -3,9 +3,9 @@ // ------------------------------------------------------------------------- const matches = (elm, selector) => { - let matches = (elm.document || elm.ownerDocument).querySelectorAll(selector), - i = matches.length; - while (--i >= 0 && matches.item(i) !== elm) {}; + let m = (elm.document || elm.ownerDocument).querySelectorAll(selector); + let i = matches.length; + while (--i >= 0 && m.item(i) !== elm) {}; return i > -1; } diff --git a/public/js/src/anime.js b/frontEndSrc/js/anime.js similarity index 98% rename from public/js/src/anime.js rename to frontEndSrc/js/anime.js index 27e1f94c..cdf1ac7e 100644 --- a/public/js/src/anime.js +++ b/frontEndSrc/js/anime.js @@ -1,4 +1,4 @@ -import _ from './base/AnimeClient.js' +import _ from './anime-client.js' import { renderAnimeSearchResults } from './template-helpers.js' const search = (query) => { diff --git a/public/js/src/index.js b/frontEndSrc/js/anon.js similarity index 89% rename from public/js/src/index.js rename to frontEndSrc/js/anon.js index 88d68d5b..89a7bdbc 100644 --- a/public/js/src/index.js +++ b/frontEndSrc/js/anon.js @@ -1,4 +1,4 @@ -import './base/events.js'; +import './events.js'; if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js').then(reg => { diff --git a/public/js/src/base/classList.js b/frontEndSrc/js/base/class-list.js similarity index 100% rename from public/js/src/base/classList.js rename to frontEndSrc/js/base/class-list.js diff --git a/public/js/src/base/sort_tables.js b/frontEndSrc/js/base/sort-tables.js similarity index 100% rename from public/js/src/base/sort_tables.js rename to frontEndSrc/js/base/sort-tables.js diff --git a/public/js/src/base/events.js b/frontEndSrc/js/events.js similarity index 52% rename from public/js/src/base/events.js rename to frontEndSrc/js/events.js index 70182d37..2a8adfab 100644 --- a/public/js/src/base/events.js +++ b/frontEndSrc/js/events.js @@ -1,31 +1,61 @@ -import _ from './AnimeClient.js'; -/** - * Event handlers - */ -// Close event for messages -_.on('header', 'click', '.message', (e) => { - _.hide(e.target); -}); +import _ from './anime-client.js'; -// Confirm deleting of list or library items -_.on('form.js-delete', 'submit', (event) => { +// ---------------------------------------------------------------------------- +// Event subscriptions +// ---------------------------------------------------------------------------- +_.on('header', 'click', '.message', hide); +_.on('form.js-delete', 'submit', confirmDelete); +_.on('.js-clear-cache', 'click', clearAPICache); +_.on('.vertical-tabs input', 'change', scrollToSection); +_.on('.media-filter', 'input', filterMedia); + +// ---------------------------------------------------------------------------- +// Handler functions +// ---------------------------------------------------------------------------- + +/** + * Hide the html element attached to the event + * + * @param event + * @return void + */ +function hide (event) { + _.hide(event.target) +} + +/** + * Confirm deletion of an item + * + * @param event + * @return void + */ +function confirmDelete (event) { const proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?'); if (proceed === false) { event.preventDefault(); event.stopPropagation(); } -}); +} -// Clear the api cache -_.on('.js-clear-cache', 'click', () => { +/** + * Clear the API cache, and show a message if the cache is cleared + * + * @return void + */ +function clearAPICache () { _.get('/cache_purge', () => { _.showMessage('success', 'Successfully purged api cache'); }); -}); +} -// Alleviate some page jumping - _.on('.vertical-tabs input', 'change', (event) => { +/** + * Scroll to the accordion/vertical tab section just opened + * + * @param event + * @return void + */ +function scrollToSection (event) { const el = event.currentTarget.parentElement; const rect = el.getBoundingClientRect(); @@ -35,10 +65,15 @@ _.on('.js-clear-cache', 'click', () => { top, behavior: 'smooth', }); -}); +} -// Filter the current page (cover view) -_.on('.media-filter', 'input', (event) => { +/** + * Filter an anime or manga list + * + * @param event + * @return void + */ +function filterMedia (event) { const rawFilter = event.target.value; const filter = new RegExp(rawFilter, 'i'); @@ -72,4 +107,4 @@ _.on('.media-filter', 'input', (event) => { _.show('article.media'); _.show('table.media-wrap tbody tr'); } -}); +} diff --git a/public/js/src/index-authed.js b/frontEndSrc/js/index.js similarity index 67% rename from public/js/src/index-authed.js rename to frontEndSrc/js/index.js index 5d852c20..6cad73e4 100644 --- a/public/js/src/index-authed.js +++ b/frontEndSrc/js/index.js @@ -1,4 +1,4 @@ -import './index.js'; +import './anon.js'; import './anime.js'; import './manga.js'; diff --git a/public/js/src/manga.js b/frontEndSrc/js/manga.js similarity index 98% rename from public/js/src/manga.js rename to frontEndSrc/js/manga.js index 120b69e5..6af89f93 100644 --- a/public/js/src/manga.js +++ b/frontEndSrc/js/manga.js @@ -1,4 +1,4 @@ -import _ from './base/AnimeClient.js' +import _ from './anime-client.js' import { renderMangaSearchResults } from './template-helpers.js' const search = (query) => { diff --git a/public/js/src/template-helpers.js b/frontEndSrc/js/template-helpers.js similarity index 98% rename from public/js/src/template-helpers.js rename to frontEndSrc/js/template-helpers.js index 4de89e8b..d9038c22 100644 --- a/public/js/src/template-helpers.js +++ b/frontEndSrc/js/template-helpers.js @@ -1,4 +1,4 @@ -import _ from './base/AnimeClient.js'; +import _ from './anime-client.js'; // Click on hidden MAL checkbox so // that MAL id is passed @@ -27,7 +27,7 @@ export function renderAnimeSearchResults (data) { - + ${item.canonicalTitle}
${titles} diff --git a/public/package.json b/frontEndSrc/package.json similarity index 53% rename from public/package.json rename to frontEndSrc/package.json index 00d00c0a..7970de82 100644 --- a/public/package.json +++ b/frontEndSrc/package.json @@ -2,20 +2,21 @@ "license": "MIT", "scripts": { "build": "npm run build:css && npm run build:js", - "build:css": "node ./tools/css.js", - "build:js": "rollup -c ./tools/build-js.js", - "watch:css": "watch 'npm run build:css' --filter=./tools/cssfilter.js", + "build:css": "node ./css.js", + "build:js": "rollup -c ./build-js.js", + "watch:css": "watch 'npm run build:css' --filter=./cssfilter.js", "watch:js": "watch 'npm run build:js' ./js/src", "watch": "concurrently \"npm:watch:css\" \"npm:watch:js\" --kill-others" }, "devDependencies": { - "@ampproject/rollup-plugin-closure-compiler": "^0.9.0", - "concurrently": "^4.1.1", + "@ampproject/rollup-plugin-closure-compiler": "^0.24.0", + "concurrently": "^5.1.0", "cssnano": "^4.1.10", - "postcss": "^7.0.17", + "postcss": "^7.0.27", "postcss-import": "^12.0.1", "postcss-preset-env": "^6.7.0", - "rollup": "^1.16.7", + "rollup": "^2.4.0", + "rollup-plugin-terser": "^5.3.0", "watch": "^1.0.2" } } diff --git a/public/test/ajax.php b/frontEndSrc/test/ajax.php similarity index 100% rename from public/test/ajax.php rename to frontEndSrc/test/ajax.php diff --git a/public/test/index.html b/frontEndSrc/test/index.html similarity index 71% rename from public/test/index.html rename to frontEndSrc/test/index.html index 93cdb56c..7afcc145 100644 --- a/public/test/index.html +++ b/frontEndSrc/test/index.html @@ -3,7 +3,7 @@ Hummingbird AnimeClient Front-end Testsuite - +
@@ -20,8 +20,8 @@
    - - + + - + - - + + isAuthenticated()): ?> - + - + diff --git a/frontEndSrc/build-js.js b/frontEndSrc/build-js.js index a4cc6199..5a3c19de 100644 --- a/frontEndSrc/build-js.js +++ b/frontEndSrc/build-js.js @@ -1,5 +1,4 @@ import compiler from '@ampproject/rollup-plugin-closure-compiler'; -import { terser } from 'rollup-plugin-terser'; const plugins = [ compiler({ @@ -52,16 +51,14 @@ let modules = [{ input: './js/anon.js', output: { ...moduleOutput, - file: '../public/es/anon.min.js', + file: '../public/es/anon.js', }, - plugins: [terser()], }, { input: './js/index.js', output: { ...moduleOutput, - file: '../public/es/scripts.min.js', + file: '../public/es/scripts.js', }, - plugins: [terser()], }]; // Return the config array for rollup diff --git a/frontEndSrc/package.json b/frontEndSrc/package.json index 7970de82..34a8b9b2 100644 --- a/frontEndSrc/package.json +++ b/frontEndSrc/package.json @@ -16,7 +16,6 @@ "postcss-import": "^12.0.1", "postcss-preset-env": "^6.7.0", "rollup": "^2.4.0", - "rollup-plugin-terser": "^5.3.0", "watch": "^1.0.2" } } diff --git a/frontEndSrc/yarn.lock b/frontEndSrc/yarn.lock index 1a160fca..afcf2fbb 100644 --- a/frontEndSrc/yarn.lock +++ b/frontEndSrc/yarn.lock @@ -23,27 +23,6 @@ magic-string "0.25.7" uuid "7.0.2" -"@babel/code-frame@^7.5.5": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" - -"@babel/helper-validator-identifier@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" - integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== - -"@babel/highlight@^7.8.3": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" - integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== - dependencies: - "@babel/helper-validator-identifier" "^7.9.0" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -125,11 +104,6 @@ browserslist@^4.0.0, browserslist@^4.6.3, browserslist@^4.6.4: electron-to-chromium "^1.3.188" node-releases "^1.1.25" -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -169,7 +143,7 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000983.tgz#ab3c70061ca2a3467182a10ac75109b199b647f8" integrity sha512-/llD1bZ6qwNkt41AsvjsmwNOoA4ZB+8iqmf5LVyeSXuBODT/hAMFNVOh84NdUzoiYiSKqo5vQ3ZzeYHSi/olDQ== -chalk@2.x, chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@2.x, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -253,11 +227,6 @@ color@^3.0.0: color-convert "^1.9.1" color-string "^1.5.2" -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - concurrently@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-5.1.0.tgz#05523986ba7aaf4b58a49ddd658fab88fa783132" @@ -557,11 +526,6 @@ estree-walker@2.0.1: resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.1.tgz#f8e030fb21cefa183b44b7ad516b747434e7a3e0" integrity sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - exec-sh@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" @@ -780,19 +744,6 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -jest-worker@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" - integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== - dependencies: - merge-stream "^2.0.0" - supports-color "^6.1.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" @@ -861,11 +812,6 @@ mdn-data@~1.1.0: resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01" integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA== -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - merge@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" @@ -1663,24 +1609,6 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -rollup-plugin-terser@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.3.0.tgz#9c0dd33d5771df9630cd027d6a2559187f65885e" - integrity sha512-XGMJihTIO3eIBsVGq7jiNYOdDMb3pVxuzY0uhOE/FM4x/u9nQgr3+McsjzqBn3QfHIpNSZmFnpoKAwHBEcsT7g== - dependencies: - "@babel/code-frame" "^7.5.5" - jest-worker "^24.9.0" - rollup-pluginutils "^2.8.2" - serialize-javascript "^2.1.2" - terser "^4.6.2" - -rollup-pluginutils@^2.8.2: - version "2.8.2" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - rollup@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.4.0.tgz#b136a4d701d24dd79ec9551ee0330e7f632ee9d2" @@ -1710,11 +1638,6 @@ sax@~1.2.4: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -serialize-javascript@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" - integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -1727,20 +1650,12 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -source-map-support@~0.5.12: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map@^0.5.1, source-map@^0.5.3: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: +source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -1862,15 +1777,6 @@ svgo@^1.0.0: unquote "~1.1.1" util.promisify "~1.0.0" -terser@^4.6.2: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" diff --git a/public/es/anon.js b/public/es/anon.js new file mode 100644 index 00000000..266dc124 --- /dev/null +++ b/public/es/anon.js @@ -0,0 +1,460 @@ +// ------------------------------------------------------------------------- +// ! Base +// ------------------------------------------------------------------------- + +const matches = (elm, selector) => { + let m = (elm.document || elm.ownerDocument).querySelectorAll(selector); + let i = matches.length; + while (--i >= 0 && m.item(i) !== elm) {} return i > -1; +}; + +const AnimeClient = { + /** + * Placeholder function + */ + noop: () => {}, + /** + * DOM selector + * + * @param {string} selector - The dom selector string + * @param {object} [context] + * @return {[HTMLElement]} - array of dom elements + */ + $(selector, context = null) { + if (typeof selector !== 'string') { + return selector; + } + + context = (context !== null && context.nodeType === 1) + ? context + : document; + + let elements = []; + if (selector.match(/^#([\w]+$)/)) { + elements.push(document.getElementById(selector.split('#')[1])); + } else { + elements = [].slice.apply(context.querySelectorAll(selector)); + } + + return elements; + }, + /** + * Does the selector exist on the current page? + * + * @param {string} selector + * @returns {boolean} + */ + hasElement (selector) { + return AnimeClient.$(selector).length > 0; + }, + /** + * Scroll to the top of the Page + * + * @return {void} + */ + scrollToTop () { + const el = AnimeClient.$('header')[0]; + el.scrollIntoView(true); + }, + /** + * Hide the selected element + * + * @param {string|Element} sel - the selector of the element to hide + * @return {void} + */ + hide (sel) { + if (typeof sel === 'string') { + sel = AnimeClient.$(sel); + } + + if (Array.isArray(sel)) { + sel.forEach(el => el.setAttribute('hidden', 'hidden')); + } else { + sel.setAttribute('hidden', 'hidden'); + } + }, + /** + * UnHide the selected element + * + * @param {string|Element} sel - the selector of the element to hide + * @return {void} + */ + show (sel) { + if (typeof sel === 'string') { + sel = AnimeClient.$(sel); + } + + if (Array.isArray(sel)) { + sel.forEach(el => el.removeAttribute('hidden')); + } else { + sel.removeAttribute('hidden'); + } + }, + /** + * Display a message box + * + * @param {string} type - message type: info, error, success + * @param {string} message - the message itself + * @return {void} + */ + showMessage (type, message) { + let template = + `
    + + ${message} + +
    `; + + let sel = AnimeClient.$('.message'); + if (sel[0] !== undefined) { + sel[0].remove(); + } + + AnimeClient.$('header')[0].insertAdjacentHTML('beforeend', template); + }, + /** + * Finds the closest parent element matching the passed selector + * + * @param {HTMLElement} current - the current HTMLElement + * @param {string} parentSelector - selector for the parent element + * @return {HTMLElement|null} - the parent element + */ + closestParent (current, parentSelector) { + if (Element.prototype.closest !== undefined) { + return current.closest(parentSelector); + } + + while (current !== document.documentElement) { + if (matches(current, parentSelector)) { + return current; + } + + current = current.parentElement; + } + + return null; + }, + /** + * Generate a full url from a relative path + * + * @param {string} path - url path + * @return {string} - full url + */ + url (path) { + let uri = `//${document.location.host}`; + uri += (path.charAt(0) === '/') ? path : `/${path}`; + + return uri; + }, + /** + * Throttle execution of a function + * + * @see https://remysharp.com/2010/07/21/throttling-function-calls + * @see https://jsfiddle.net/jonathansampson/m7G64/ + * @param {Number} interval - the minimum throttle time in ms + * @param {Function} fn - the function to throttle + * @param {Object} [scope] - the 'this' object for the function + * @return {Function} + */ + throttle (interval, fn, scope) { + let wait = false; + return function (...args) { + const context = scope || this; + + if ( ! wait) { + fn.apply(context, args); + wait = true; + setTimeout(function() { + wait = false; + }, interval); + } + }; + }, +}; + +// ------------------------------------------------------------------------- +// ! Events +// ------------------------------------------------------------------------- + +function addEvent(sel, event, listener) { + // Recurse! + if (! event.match(/^([\w\-]+)$/)) { + event.split(' ').forEach((evt) => { + addEvent(sel, evt, listener); + }); + } + + sel.addEventListener(event, listener, false); +} + +function delegateEvent(sel, target, event, listener) { + // Attach the listener to the parent + addEvent(sel, event, (e) => { + // Get live version of the target selector + AnimeClient.$(target, sel).forEach((element) => { + if(e.target == element) { + listener.call(element, e); + e.stopPropagation(); + } + }); + }); +} + +/** + * Add an event listener + * + * @param {string|HTMLElement} sel - the parent selector to bind to + * @param {string} event - event name(s) to bind + * @param {string|HTMLElement|function} target - the element to directly bind the event to + * @param {function} [listener] - event listener callback + * @return {void} + */ +AnimeClient.on = (sel, event, target, listener) => { + if (listener === undefined) { + listener = target; + AnimeClient.$(sel).forEach((el) => { + addEvent(el, event, listener); + }); + } else { + AnimeClient.$(sel).forEach((el) => { + delegateEvent(el, target, event, listener); + }); + } +}; + +// ------------------------------------------------------------------------- +// ! Ajax +// ------------------------------------------------------------------------- + +/** + * Url encoding for non-get requests + * + * @param data + * @returns {string} + * @private + */ +function ajaxSerialize(data) { + let pairs = []; + + Object.keys(data).forEach((name) => { + let value = data[name].toString(); + + name = encodeURIComponent(name); + value = encodeURIComponent(value); + + pairs.push(`${name}=${value}`); + }); + + return pairs.join('&'); +} + +/** + * Make an ajax request + * + * Config:{ + * data: // data to send with the request + * type: // http verb of the request, defaults to GET + * success: // success callback + * error: // error callback + * } + * + * @param {string} url - the url to request + * @param {Object} config - the configuration object + * @return {void} + */ +AnimeClient.ajax = (url, config) => { + // Set some sane defaults + const defaultConfig = { + data: {}, + type: 'GET', + dataType: '', + success: AnimeClient.noop, + mimeType: 'application/x-www-form-urlencoded', + error: AnimeClient.noop + }; + + config = { + ...defaultConfig, + ...config, + }; + + let request = new XMLHttpRequest(); + let method = String(config.type).toUpperCase(); + + if (method === 'GET') { + url += (url.match(/\?/)) + ? ajaxSerialize(config.data) + : `?${ajaxSerialize(config.data)}`; + } + + request.open(method, url); + + request.onreadystatechange = () => { + if (request.readyState === 4) { + let responseText = ''; + + if (request.responseType === 'json') { + responseText = JSON.parse(request.responseText); + } else { + responseText = request.responseText; + } + + if (request.status > 299) { + config.error.call(null, request.status, responseText, request.response); + } else { + config.success.call(null, responseText, request.status); + } + } + }; + + if (config.dataType === 'json') { + config.data = JSON.stringify(config.data); + config.mimeType = 'application/json'; + } else { + config.data = ajaxSerialize(config.data); + } + + request.setRequestHeader('Content-Type', config.mimeType); + + if (method === 'GET') { + request.send(null); + } else { + request.send(config.data); + } +}; + +/** + * Do a get request + * + * @param {string} url + * @param {object|function} data + * @param {function} [callback] + */ +AnimeClient.get = (url, data, callback = null) => { + if (callback === null) { + callback = data; + data = {}; + } + + return AnimeClient.ajax(url, { + data, + success: callback + }); +}; + +// ---------------------------------------------------------------------------- +// Event subscriptions +// ---------------------------------------------------------------------------- +AnimeClient.on('header', 'click', '.message', hide); +AnimeClient.on('form.js-delete', 'submit', confirmDelete); +AnimeClient.on('.js-clear-cache', 'click', clearAPICache); +AnimeClient.on('.vertical-tabs input', 'change', scrollToSection); +AnimeClient.on('.media-filter', 'input', filterMedia); + +// ---------------------------------------------------------------------------- +// Handler functions +// ---------------------------------------------------------------------------- + +/** + * Hide the html element attached to the event + * + * @param event + * @return void + */ +function hide (event) { + AnimeClient.hide(event.target); +} + +/** + * Confirm deletion of an item + * + * @param event + * @return void + */ +function confirmDelete (event) { + const proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?'); + + if (proceed === false) { + event.preventDefault(); + event.stopPropagation(); + } +} + +/** + * Clear the API cache, and show a message if the cache is cleared + * + * @return void + */ +function clearAPICache () { + AnimeClient.get('/cache_purge', () => { + AnimeClient.showMessage('success', 'Successfully purged api cache'); + }); +} + +/** + * Scroll to the accordion/vertical tab section just opened + * + * @param event + * @return void + */ +function scrollToSection (event) { + const el = event.currentTarget.parentElement; + const rect = el.getBoundingClientRect(); + + const top = rect.top + window.pageYOffset; + + window.scrollTo({ + top, + behavior: 'smooth', + }); +} + +/** + * Filter an anime or manga list + * + * @param event + * @return void + */ +function filterMedia (event) { + const rawFilter = event.target.value; + const filter = new RegExp(rawFilter, 'i'); + + // console.log('Filtering items by: ', filter); + + if (rawFilter !== '') { + // Filter the cover view + AnimeClient.$('article.media').forEach(article => { + const titleLink = AnimeClient.$('.name a', article)[0]; + const title = String(titleLink.textContent).trim(); + if ( ! filter.test(title)) { + AnimeClient.hide(article); + } else { + AnimeClient.show(article); + } + }); + + // Filter the list view + AnimeClient.$('table.media-wrap tbody tr').forEach(tr => { + const titleCell = AnimeClient.$('td.align-left', tr)[0]; + const titleLink = AnimeClient.$('a', titleCell)[0]; + const linkTitle = String(titleLink.textContent).trim(); + const textTitle = String(titleCell.textContent).trim(); + if ( ! (filter.test(linkTitle) || filter.test(textTitle))) { + AnimeClient.hide(tr); + } else { + AnimeClient.show(tr); + } + }); + } else { + AnimeClient.show('article.media'); + AnimeClient.show('table.media-wrap tbody tr'); + } +} + +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('/sw.js').then(reg => { + console.log('Service worker registered', reg.scope); + }).catch(error => { + console.error('Failed to register service worker', error); + }); +} diff --git a/public/es/scripts.js b/public/es/scripts.js new file mode 100644 index 00000000..21b0ab5e --- /dev/null +++ b/public/es/scripts.js @@ -0,0 +1,721 @@ +// ------------------------------------------------------------------------- +// ! Base +// ------------------------------------------------------------------------- + +const matches = (elm, selector) => { + let m = (elm.document || elm.ownerDocument).querySelectorAll(selector); + let i = matches.length; + while (--i >= 0 && m.item(i) !== elm) {} return i > -1; +}; + +const AnimeClient = { + /** + * Placeholder function + */ + noop: () => {}, + /** + * DOM selector + * + * @param {string} selector - The dom selector string + * @param {object} [context] + * @return {[HTMLElement]} - array of dom elements + */ + $(selector, context = null) { + if (typeof selector !== 'string') { + return selector; + } + + context = (context !== null && context.nodeType === 1) + ? context + : document; + + let elements = []; + if (selector.match(/^#([\w]+$)/)) { + elements.push(document.getElementById(selector.split('#')[1])); + } else { + elements = [].slice.apply(context.querySelectorAll(selector)); + } + + return elements; + }, + /** + * Does the selector exist on the current page? + * + * @param {string} selector + * @returns {boolean} + */ + hasElement (selector) { + return AnimeClient.$(selector).length > 0; + }, + /** + * Scroll to the top of the Page + * + * @return {void} + */ + scrollToTop () { + const el = AnimeClient.$('header')[0]; + el.scrollIntoView(true); + }, + /** + * Hide the selected element + * + * @param {string|Element} sel - the selector of the element to hide + * @return {void} + */ + hide (sel) { + if (typeof sel === 'string') { + sel = AnimeClient.$(sel); + } + + if (Array.isArray(sel)) { + sel.forEach(el => el.setAttribute('hidden', 'hidden')); + } else { + sel.setAttribute('hidden', 'hidden'); + } + }, + /** + * UnHide the selected element + * + * @param {string|Element} sel - the selector of the element to hide + * @return {void} + */ + show (sel) { + if (typeof sel === 'string') { + sel = AnimeClient.$(sel); + } + + if (Array.isArray(sel)) { + sel.forEach(el => el.removeAttribute('hidden')); + } else { + sel.removeAttribute('hidden'); + } + }, + /** + * Display a message box + * + * @param {string} type - message type: info, error, success + * @param {string} message - the message itself + * @return {void} + */ + showMessage (type, message) { + let template = + `
    + + ${message} + +
    `; + + let sel = AnimeClient.$('.message'); + if (sel[0] !== undefined) { + sel[0].remove(); + } + + AnimeClient.$('header')[0].insertAdjacentHTML('beforeend', template); + }, + /** + * Finds the closest parent element matching the passed selector + * + * @param {HTMLElement} current - the current HTMLElement + * @param {string} parentSelector - selector for the parent element + * @return {HTMLElement|null} - the parent element + */ + closestParent (current, parentSelector) { + if (Element.prototype.closest !== undefined) { + return current.closest(parentSelector); + } + + while (current !== document.documentElement) { + if (matches(current, parentSelector)) { + return current; + } + + current = current.parentElement; + } + + return null; + }, + /** + * Generate a full url from a relative path + * + * @param {string} path - url path + * @return {string} - full url + */ + url (path) { + let uri = `//${document.location.host}`; + uri += (path.charAt(0) === '/') ? path : `/${path}`; + + return uri; + }, + /** + * Throttle execution of a function + * + * @see https://remysharp.com/2010/07/21/throttling-function-calls + * @see https://jsfiddle.net/jonathansampson/m7G64/ + * @param {Number} interval - the minimum throttle time in ms + * @param {Function} fn - the function to throttle + * @param {Object} [scope] - the 'this' object for the function + * @return {Function} + */ + throttle (interval, fn, scope) { + let wait = false; + return function (...args) { + const context = scope || this; + + if ( ! wait) { + fn.apply(context, args); + wait = true; + setTimeout(function() { + wait = false; + }, interval); + } + }; + }, +}; + +// ------------------------------------------------------------------------- +// ! Events +// ------------------------------------------------------------------------- + +function addEvent(sel, event, listener) { + // Recurse! + if (! event.match(/^([\w\-]+)$/)) { + event.split(' ').forEach((evt) => { + addEvent(sel, evt, listener); + }); + } + + sel.addEventListener(event, listener, false); +} + +function delegateEvent(sel, target, event, listener) { + // Attach the listener to the parent + addEvent(sel, event, (e) => { + // Get live version of the target selector + AnimeClient.$(target, sel).forEach((element) => { + if(e.target == element) { + listener.call(element, e); + e.stopPropagation(); + } + }); + }); +} + +/** + * Add an event listener + * + * @param {string|HTMLElement} sel - the parent selector to bind to + * @param {string} event - event name(s) to bind + * @param {string|HTMLElement|function} target - the element to directly bind the event to + * @param {function} [listener] - event listener callback + * @return {void} + */ +AnimeClient.on = (sel, event, target, listener) => { + if (listener === undefined) { + listener = target; + AnimeClient.$(sel).forEach((el) => { + addEvent(el, event, listener); + }); + } else { + AnimeClient.$(sel).forEach((el) => { + delegateEvent(el, target, event, listener); + }); + } +}; + +// ------------------------------------------------------------------------- +// ! Ajax +// ------------------------------------------------------------------------- + +/** + * Url encoding for non-get requests + * + * @param data + * @returns {string} + * @private + */ +function ajaxSerialize(data) { + let pairs = []; + + Object.keys(data).forEach((name) => { + let value = data[name].toString(); + + name = encodeURIComponent(name); + value = encodeURIComponent(value); + + pairs.push(`${name}=${value}`); + }); + + return pairs.join('&'); +} + +/** + * Make an ajax request + * + * Config:{ + * data: // data to send with the request + * type: // http verb of the request, defaults to GET + * success: // success callback + * error: // error callback + * } + * + * @param {string} url - the url to request + * @param {Object} config - the configuration object + * @return {void} + */ +AnimeClient.ajax = (url, config) => { + // Set some sane defaults + const defaultConfig = { + data: {}, + type: 'GET', + dataType: '', + success: AnimeClient.noop, + mimeType: 'application/x-www-form-urlencoded', + error: AnimeClient.noop + }; + + config = { + ...defaultConfig, + ...config, + }; + + let request = new XMLHttpRequest(); + let method = String(config.type).toUpperCase(); + + if (method === 'GET') { + url += (url.match(/\?/)) + ? ajaxSerialize(config.data) + : `?${ajaxSerialize(config.data)}`; + } + + request.open(method, url); + + request.onreadystatechange = () => { + if (request.readyState === 4) { + let responseText = ''; + + if (request.responseType === 'json') { + responseText = JSON.parse(request.responseText); + } else { + responseText = request.responseText; + } + + if (request.status > 299) { + config.error.call(null, request.status, responseText, request.response); + } else { + config.success.call(null, responseText, request.status); + } + } + }; + + if (config.dataType === 'json') { + config.data = JSON.stringify(config.data); + config.mimeType = 'application/json'; + } else { + config.data = ajaxSerialize(config.data); + } + + request.setRequestHeader('Content-Type', config.mimeType); + + if (method === 'GET') { + request.send(null); + } else { + request.send(config.data); + } +}; + +/** + * Do a get request + * + * @param {string} url + * @param {object|function} data + * @param {function} [callback] + */ +AnimeClient.get = (url, data, callback = null) => { + if (callback === null) { + callback = data; + data = {}; + } + + return AnimeClient.ajax(url, { + data, + success: callback + }); +}; + +// ---------------------------------------------------------------------------- +// Event subscriptions +// ---------------------------------------------------------------------------- +AnimeClient.on('header', 'click', '.message', hide); +AnimeClient.on('form.js-delete', 'submit', confirmDelete); +AnimeClient.on('.js-clear-cache', 'click', clearAPICache); +AnimeClient.on('.vertical-tabs input', 'change', scrollToSection); +AnimeClient.on('.media-filter', 'input', filterMedia); + +// ---------------------------------------------------------------------------- +// Handler functions +// ---------------------------------------------------------------------------- + +/** + * Hide the html element attached to the event + * + * @param event + * @return void + */ +function hide (event) { + AnimeClient.hide(event.target); +} + +/** + * Confirm deletion of an item + * + * @param event + * @return void + */ +function confirmDelete (event) { + const proceed = confirm('Are you ABSOLUTELY SURE you want to delete this item?'); + + if (proceed === false) { + event.preventDefault(); + event.stopPropagation(); + } +} + +/** + * Clear the API cache, and show a message if the cache is cleared + * + * @return void + */ +function clearAPICache () { + AnimeClient.get('/cache_purge', () => { + AnimeClient.showMessage('success', 'Successfully purged api cache'); + }); +} + +/** + * Scroll to the accordion/vertical tab section just opened + * + * @param event + * @return void + */ +function scrollToSection (event) { + const el = event.currentTarget.parentElement; + const rect = el.getBoundingClientRect(); + + const top = rect.top + window.pageYOffset; + + window.scrollTo({ + top, + behavior: 'smooth', + }); +} + +/** + * Filter an anime or manga list + * + * @param event + * @return void + */ +function filterMedia (event) { + const rawFilter = event.target.value; + const filter = new RegExp(rawFilter, 'i'); + + // console.log('Filtering items by: ', filter); + + if (rawFilter !== '') { + // Filter the cover view + AnimeClient.$('article.media').forEach(article => { + const titleLink = AnimeClient.$('.name a', article)[0]; + const title = String(titleLink.textContent).trim(); + if ( ! filter.test(title)) { + AnimeClient.hide(article); + } else { + AnimeClient.show(article); + } + }); + + // Filter the list view + AnimeClient.$('table.media-wrap tbody tr').forEach(tr => { + const titleCell = AnimeClient.$('td.align-left', tr)[0]; + const titleLink = AnimeClient.$('a', titleCell)[0]; + const linkTitle = String(titleLink.textContent).trim(); + const textTitle = String(titleCell.textContent).trim(); + if ( ! (filter.test(linkTitle) || filter.test(textTitle))) { + AnimeClient.hide(tr); + } else { + AnimeClient.show(tr); + } + }); + } else { + AnimeClient.show('article.media'); + AnimeClient.show('table.media-wrap tbody tr'); + } +} + +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register('/sw.js').then(reg => { + console.log('Service worker registered', reg.scope); + }).catch(error => { + console.error('Failed to register service worker', error); + }); +} + +// Click on hidden MAL checkbox so +// that MAL id is passed +AnimeClient.on('main', 'change', '.big-check', (e) => { + const id = e.target.id; + document.getElementById(`mal_${id}`).checked = true; +}); + +function renderAnimeSearchResults (data) { + const results = []; + + data.forEach(x => { + const item = x.attributes; + const titles = item.titles.reduce((prev, current) => { + return prev + `${current}
    `; + }, []); + + results.push(` + + `); + }); + + return results.join(''); +} + +function renderMangaSearchResults (data) { + const results = []; + + data.forEach(x => { + const item = x.attributes; + const titles = item.titles.reduce((prev, current) => { + return prev + `${current}
    `; + }, []); + + results.push(` + + `); + }); + + return results.join(''); +} + +const search = (query) => { + // Show the loader + AnimeClient.show('.cssload-loader'); + + // Do the api search + AnimeClient.get(AnimeClient.url('/anime-collection/search'), { query }, (searchResults, status) => { + searchResults = JSON.parse(searchResults); + + // Hide the loader + AnimeClient.hide('.cssload-loader'); + + // Show the results + AnimeClient.$('#series-list')[ 0 ].innerHTML = renderAnimeSearchResults(searchResults.data); + }); +}; + +if (AnimeClient.hasElement('.anime #search')) { + AnimeClient.on('#search', 'input', AnimeClient.throttle(250, (e) => { + const query = encodeURIComponent(e.target.value); + if (query === '') { + return; + } + + search(query); + })); +} + +// Action to increment episode count +AnimeClient.on('body.anime.list', 'click', '.plus-one', (e) => { + let parentSel = AnimeClient.closestParent(e.target, 'article'); + let watchedCount = parseInt(AnimeClient.$('.completed_number', parentSel)[ 0 ].textContent, 10) || 0; + let totalCount = parseInt(AnimeClient.$('.total_number', parentSel)[ 0 ].textContent, 10); + let title = AnimeClient.$('.name a', parentSel)[ 0 ].textContent; + + // Setup the update data + let data = { + id: parentSel.dataset.kitsuId, + mal_id: parentSel.dataset.malId, + data: { + progress: watchedCount + 1 + } + }; + + // If the episode count is 0, and incremented, + // change status to currently watching + if (isNaN(watchedCount) || watchedCount === 0) { + data.data.status = 'current'; + } + + // If you increment at the last episode, mark as completed + if ((!isNaN(watchedCount)) && (watchedCount + 1) === totalCount) { + data.data.status = 'completed'; + } + + AnimeClient.show('#loading-shadow'); + + // okay, lets actually make some changes! + AnimeClient.ajax(AnimeClient.url('/anime/increment'), { + data, + dataType: 'json', + type: 'POST', + success: (res) => { + const resData = JSON.parse(res); + + if (resData.errors) { + AnimeClient.hide('#loading-shadow'); + AnimeClient.showMessage('error', `Failed to update ${title}. `); + AnimeClient.scrollToTop(); + return; + } + + if (resData.data.attributes.status === 'completed') { + AnimeClient.hide(parentSel); + } + + AnimeClient.hide('#loading-shadow'); + + AnimeClient.showMessage('success', `Successfully updated ${title}`); + AnimeClient.$('.completed_number', parentSel)[ 0 ].textContent = ++watchedCount; + AnimeClient.scrollToTop(); + }, + error: () => { + AnimeClient.hide('#loading-shadow'); + AnimeClient.showMessage('error', `Failed to update ${title}. `); + AnimeClient.scrollToTop(); + } + }); +}); + +const search$1 = (query) => { + AnimeClient.show('.cssload-loader'); + AnimeClient.get(AnimeClient.url('/manga/search'), { query }, (searchResults, status) => { + searchResults = JSON.parse(searchResults); + AnimeClient.hide('.cssload-loader'); + AnimeClient.$('#series-list')[ 0 ].innerHTML = renderMangaSearchResults(searchResults.data); + }); +}; + +if (AnimeClient.hasElement('.manga #search')) { + AnimeClient.on('#search', 'input', AnimeClient.throttle(250, (e) => { + let query = encodeURIComponent(e.target.value); + if (query === '') { + return; + } + + search$1(query); + })); +} + +/** + * Javascript for editing manga, if logged in + */ +AnimeClient.on('.manga.list', 'click', '.edit-buttons button', (e) => { + let thisSel = e.target; + let parentSel = AnimeClient.closestParent(e.target, 'article'); + let type = thisSel.classList.contains('plus-one-chapter') ? 'chapter' : 'volume'; + let completed = parseInt(AnimeClient.$(`.${type}s_read`, parentSel)[ 0 ].textContent, 10) || 0; + let total = parseInt(AnimeClient.$(`.${type}_count`, parentSel)[ 0 ].textContent, 10); + let mangaName = AnimeClient.$('.name', parentSel)[ 0 ].textContent; + + if (isNaN(completed)) { + completed = 0; + } + + // Setup the update data + let data = { + id: parentSel.dataset.kitsuId, + mal_id: parentSel.dataset.malId, + data: { + progress: completed + } + }; + + // If the episode count is 0, and incremented, + // change status to currently reading + if (isNaN(completed) || completed === 0) { + data.data.status = 'current'; + } + + // If you increment at the last chapter, mark as completed + if ((!isNaN(completed)) && (completed + 1) === total) { + data.data.status = 'completed'; + } + + // Update the total count + data.data.progress = ++completed; + + AnimeClient.show('#loading-shadow'); + + AnimeClient.ajax(AnimeClient.url('/manga/increment'), { + data, + dataType: 'json', + type: 'POST', + mimeType: 'application/json', + success: () => { + if (data.data.status === 'completed') { + AnimeClient.hide(parentSel); + } + + AnimeClient.hide('#loading-shadow'); + + AnimeClient.$(`.${type}s_read`, parentSel)[ 0 ].textContent = completed; + AnimeClient.showMessage('success', `Successfully updated ${mangaName}`); + AnimeClient.scrollToTop(); + }, + error: () => { + AnimeClient.hide('#loading-shadow'); + AnimeClient.showMessage('error', `Failed to update ${mangaName}`); + AnimeClient.scrollToTop(); + } + }); +}); From 4f6a92cd452fe77f4d2154b19dac3b5ab68bc020 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Apr 2020 15:38:32 -0400 Subject: [PATCH 03/27] Update dependencies to latest versions --- .travis.yml | 8 --- CHANGELOG.md | 3 + Jenkinsfile | 12 ---- composer.json | 12 ++-- src/AnimeClient/constants.php | 2 +- ...aListTransformerTest__testTransform__1.yml | 65 +++++++++++++++++-- ...eHelper with data set Full webp URL__1.txt | 1 + ...lper with data set Partial webp URL__1.txt | 1 + ...with data set bmp with gif fallback__1.txt | 1 + ...ictureHelper with data set jpeg2000__1.txt | 1 + ...with data set png placeholder image__1.txt | 1 + ...ta set simple image with attributes__1.txt | 1 + ...png fallback and lots of attributes__1.txt | 1 + ...ith data set webp placeholder image__1.txt | 1 + .../FormGeneratorTest__testGeneration__1.txt | 2 + .../FormGeneratorTest__testGeneration__10.txt | 1 + .../FormGeneratorTest__testGeneration__11.txt | 1 + .../FormGeneratorTest__testGeneration__12.txt | 1 + .../FormGeneratorTest__testGeneration__13.txt | 5 ++ .../FormGeneratorTest__testGeneration__14.txt | 2 + .../FormGeneratorTest__testGeneration__15.txt | 2 + .../FormGeneratorTest__testGeneration__16.txt | 4 ++ .../FormGeneratorTest__testGeneration__17.txt | 8 +++ .../FormGeneratorTest__testGeneration__18.txt | 8 +++ .../FormGeneratorTest__testGeneration__19.txt | 5 ++ .../FormGeneratorTest__testGeneration__2.txt | 1 + .../FormGeneratorTest__testGeneration__20.txt | 1 + .../FormGeneratorTest__testGeneration__21.txt | 1 + .../FormGeneratorTest__testGeneration__22.txt | 1 + .../FormGeneratorTest__testGeneration__23.txt | 1 + .../FormGeneratorTest__testGeneration__24.txt | 1 + .../FormGeneratorTest__testGeneration__25.txt | 1 + .../FormGeneratorTest__testGeneration__3.txt | 1 + .../FormGeneratorTest__testGeneration__4.txt | 1 + .../FormGeneratorTest__testGeneration__5.txt | 1 + .../FormGeneratorTest__testGeneration__6.txt | 1 + .../FormGeneratorTest__testGeneration__7.txt | 1 + .../FormGeneratorTest__testGeneration__8.txt | 1 + .../FormGeneratorTest__testGeneration__9.txt | 6 ++ 39 files changed, 136 insertions(+), 32 deletions(-) create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Full webp URL__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Partial webp URL__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set bmp with gif fallback__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set jpeg2000__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set png placeholder image__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set simple image with attributes__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set svg with png fallback and lots of attributes__1.txt create mode 100644 tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set webp placeholder image__1.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__1.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__10.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__11.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__12.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__13.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__14.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__15.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__16.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__17.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__18.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__19.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__2.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__20.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__21.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__22.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__23.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__24.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__25.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__3.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__4.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__5.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__6.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__7.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__8.txt create mode 100644 tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__9.txt diff --git a/.travis.yml b/.travis.yml index 62f82e2c..d913cc55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ install: - composer install --ignore-platform-reqs php: - - 7.3 - 7.4 - nightly @@ -12,13 +11,6 @@ script: - mkdir -p build/logs - php vendor/bin/phpunit -c build -#after_script: -# - CODECLIMATE_REPO_TOKEN=2cbddcebcb9256b3402867282e119dbe61de0b31039325356af3c7d72ed6d058 vendor/bin/test-reporter - matrix: allow_failures: - php: nightly - -#addons: -# code_climate: -# repo_token: 2cbddcebcb9256b3402867282e119dbe61de0b31039325356af3c7d72ed6d058 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e18a7bc4..52ddbd71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## Version 5 +* Updated PHP requirement to 7.4 + ## Version 4.2 * Updated dependencies * Updated PHP requirement to 7.3 diff --git a/Jenkinsfile b/Jenkinsfile index 7fb02a70..c94da53f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,18 +10,6 @@ pipeline { sh 'php composer.phar install --ignore-platform-reqs' } } - stage('PHP 7.3') { - agent { - docker { - image 'php:7.3-alpine' - args '-u root --privileged' - } - } - steps { - sh 'apk add --no-cache git' - sh 'php ./vendor/bin/phpunit --colors=never' - } - } stage('PHP 7.4') { agent { docker { diff --git a/composer.json b/composer.json index 0e45c808..b166b893 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ "config": { "lock": false, "platform": { - "php": "7.3" + "php": "7.4" } }, "require": { @@ -50,7 +50,7 @@ "laminas/laminas-httphandlerrunner": "^1.0", "maximebf/consolekit": "^1.0", "monolog/monolog": "^2.0.1", - "php": "^7.3", + "php": "^7.4 || ^8", "psr/container": "~1.0", "psr/http-message": "~1.0", "psr/log": "~1.0", @@ -60,14 +60,14 @@ "consolidation/robo": "^2.0.0", "filp/whoops": "^2.1", "pdepend/pdepend": "^2.2", - "phploc/phploc": "^5.0", + "phploc/phploc": "^6.0.2", "phpmd/phpmd": "^2.8", "phpstan/phpstan": "^0.12.0", - "phpunit/phpunit": "^8.4.3", + "phpunit/phpunit": "^9.1.1", "roave/security-advisories": "dev-master", "robmorgan/phinx": "^0.10.6", - "sebastian/phpcpd": "^4.1.0", - "spatie/phpunit-snapshot-assertions": "^2.2.1", + "sebastian/phpcpd": "^5.0.2", + "spatie/phpunit-snapshot-assertions": "^4.1.0", "squizlabs/php_codesniffer": "^3.2.2", "symfony/var-dumper": "^5", "theseer/phpdox": "*" diff --git a/src/AnimeClient/constants.php b/src/AnimeClient/constants.php index 3a54a8b0..108d8e5c 100644 --- a/src/AnimeClient/constants.php +++ b/src/AnimeClient/constants.php @@ -24,7 +24,7 @@ const ERROR_MESSAGE_METHOD = 'errorPage'; const NOT_FOUND_METHOD = 'notFound'; const SESSION_SEGMENT = 'Aviat\AnimeClient\Auth'; const SRC_DIR = __DIR__; -const USER_AGENT = "Tim's Anime Client/4.2"; +const USER_AGENT = "Tim's Anime Client/5"; // Regex patterns const ALPHA_SLUG_PATTERN = '[a-z_]+'; diff --git a/tests/AnimeClient/API/Kitsu/Transformer/__snapshots__/MangaListTransformerTest__testTransform__1.yml b/tests/AnimeClient/API/Kitsu/Transformer/__snapshots__/MangaListTransformerTest__testTransform__1.yml index 87effff0..7e670c63 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/__snapshots__/MangaListTransformerTest__testTransform__1.yml +++ b/tests/AnimeClient/API/Kitsu/Transformer/__snapshots__/MangaListTransformerTest__testTransform__1.yml @@ -1,5 +1,60 @@ -- null -- null -- null -- null -- null +- + empty: false + id: '15084773' + mal_id: '26769' + chapters: { read: 67, total: '-' } + volumes: { read: '-', total: '-' } + manga: { empty: false, genres: [Comedy, Romance, School, 'Slice of Life', Thriller], id: '20286', image: 'https://media.kitsu.io/manga/poster_images/20286/small.jpg?1434293999', slug: bokura-wa-minna-kawaisou, title: 'Bokura wa Minna Kawaisou', titles: { }, type: Manga, url: 'https://kitsu.io/manga/bokura-wa-minna-kawaisou' } + reading_status: current + notes: '' + rereading: false + reread: 0 + user_rating: 9 +- + empty: false + id: '15085607' + mal_id: '16' + chapters: { read: 17, total: 120 } + volumes: { read: '-', total: 14 } + manga: { empty: false, genres: [Comedy, Ecchi, Harem, Romance, Sports], id: '47', image: 'https://media.kitsu.io/manga/poster_images/47/small.jpg?1434249493', slug: love-hina, title: 'Love Hina', titles: { }, type: Manga, url: 'https://kitsu.io/manga/love-hina' } + reading_status: current + notes: '' + rereading: false + reread: 0 + user_rating: 7 +- + empty: false + id: '15084529' + mal_id: '35003' + chapters: { read: 16, total: '-' } + volumes: { read: '-', total: '-' } + manga: { empty: false, genres: [Comedy, Ecchi, 'Gender Bender', Romance, School, Sports, Supernatural], id: '11777', image: 'https://media.kitsu.io/manga/poster_images/11777/small.jpg?1438784325', slug: yamada-kun-to-7-nin-no-majo, title: 'Yamada-kun to 7-nin no Majo', titles: ['Yamada-kun and the Seven Witches'], type: Manga, url: 'https://kitsu.io/manga/yamada-kun-to-7-nin-no-majo' } + reading_status: current + notes: '' + rereading: false + reread: 0 + user_rating: 9 +- + empty: false + id: '15312827' + mal_id: '78523' + chapters: { read: 68, total: '-' } + volumes: { read: '-', total: '-' } + manga: { empty: false, genres: [Romance, School, 'Slice of Life'], id: '27175', image: 'https://media.kitsu.io/manga/poster_images/27175/small.jpg?1464379411', slug: relife, title: ReLIFE, titles: { }, type: Manga, url: 'https://kitsu.io/manga/relife' } + reading_status: current + notes: '' + rereading: false + reread: 0 + user_rating: '-' +- + empty: false + id: '15084769' + mal_id: '60815' + chapters: { read: 43, total: '-' } + volumes: { read: '-', total: '-' } + manga: { empty: false, genres: [Comedy, School, 'Slice of Life'], id: '25491', image: 'https://media.kitsu.io/manga/poster_images/25491/small.jpg?1434305043', slug: joshikausei, title: Joshikausei, titles: { }, type: Manga, url: 'https://kitsu.io/manga/joshikausei' } + reading_status: current + notes: '' + rereading: false + reread: 0 + user_rating: 8 diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Full webp URL__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Full webp URL__1.txt new file mode 100644 index 00000000..e7e95073 --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Full webp URL__1.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Partial webp URL__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Partial webp URL__1.txt new file mode 100644 index 00000000..4e55b5db --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set Partial webp URL__1.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set bmp with gif fallback__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set bmp with gif fallback__1.txt new file mode 100644 index 00000000..fbd9a6fe --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set bmp with gif fallback__1.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set jpeg2000__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set jpeg2000__1.txt new file mode 100644 index 00000000..2e5d0bc9 --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set jpeg2000__1.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set png placeholder image__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set png placeholder image__1.txt new file mode 100644 index 00000000..83b6602a --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set png placeholder image__1.txt @@ -0,0 +1 @@ +placeholder.png \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set simple image with attributes__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set simple image with attributes__1.txt new file mode 100644 index 00000000..dc0fa1ea --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set simple image with attributes__1.txt @@ -0,0 +1 @@ +should exist \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set svg with png fallback and lots of attributes__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set svg with png fallback and lots of attributes__1.txt new file mode 100644 index 00000000..fe80c67d --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set svg with png fallback and lots of attributes__1.txt @@ -0,0 +1 @@ +Example text \ No newline at end of file diff --git a/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set webp placeholder image__1.txt b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set webp placeholder image__1.txt new file mode 100644 index 00000000..f3241b60 --- /dev/null +++ b/tests/AnimeClient/Helper/__snapshots__/PictureHelperTest__testPictureHelper with data set webp placeholder image__1.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__1.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__1.txt new file mode 100644 index 00000000..5fad8486 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__1.txt @@ -0,0 +1,2 @@ + + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__10.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__10.txt new file mode 100644 index 00000000..d8a5b82b --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__10.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__11.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__11.txt new file mode 100644 index 00000000..d9cd9f23 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__11.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__12.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__12.txt new file mode 100644 index 00000000..b67ece0b --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__12.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__13.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__13.txt new file mode 100644 index 00000000..217e1070 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__13.txt @@ -0,0 +1,5 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__14.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__14.txt new file mode 100644 index 00000000..9cc61252 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__14.txt @@ -0,0 +1,2 @@ + + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__15.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__15.txt new file mode 100644 index 00000000..d5908280 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__15.txt @@ -0,0 +1,2 @@ + + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__16.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__16.txt new file mode 100644 index 00000000..6845605d --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__16.txt @@ -0,0 +1,4 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__17.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__17.txt new file mode 100644 index 00000000..8562b0c1 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__17.txt @@ -0,0 +1,8 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__18.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__18.txt new file mode 100644 index 00000000..8ee72966 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__18.txt @@ -0,0 +1,8 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__19.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__19.txt new file mode 100644 index 00000000..cd9981ba --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__19.txt @@ -0,0 +1,5 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__2.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__2.txt new file mode 100644 index 00000000..9e04d906 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__2.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__20.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__20.txt new file mode 100644 index 00000000..d713594d --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__20.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__21.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__21.txt new file mode 100644 index 00000000..db4b90ec --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__21.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__22.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__22.txt new file mode 100644 index 00000000..de84dffa --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__22.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__23.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__23.txt new file mode 100644 index 00000000..25da8325 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__23.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__24.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__24.txt new file mode 100644 index 00000000..a3d30e0d --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__24.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__25.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__25.txt new file mode 100644 index 00000000..a3631d99 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__25.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__3.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__3.txt new file mode 100644 index 00000000..c6d07c96 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__3.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__4.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__4.txt new file mode 100644 index 00000000..d620ee08 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__4.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__5.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__5.txt new file mode 100644 index 00000000..b211273f --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__5.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__6.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__6.txt new file mode 100644 index 00000000..93f193dc --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__6.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__7.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__7.txt new file mode 100644 index 00000000..ef90ca7e --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__7.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__8.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__8.txt new file mode 100644 index 00000000..ddc0efb8 --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__8.txt @@ -0,0 +1 @@ + diff --git a/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__9.txt b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__9.txt new file mode 100644 index 00000000..4753279d --- /dev/null +++ b/tests/AnimeClient/__snapshots__/FormGeneratorTest__testGeneration__9.txt @@ -0,0 +1,6 @@ + From 2584047289b68c6dd8b8e399ac75ae6bddbcd04f Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Apr 2020 15:39:39 -0400 Subject: [PATCH 04/27] Bump version and PHP requirement in headers --- app/bootstrap.php | 4 ++-- build/header_comment.txt | 4 ++-- index.php | 4 ++-- src/AnimeClient/API/APIRequestBuilder.php | 4 ++-- src/AnimeClient/API/AbstractListItem.php | 4 ++-- src/AnimeClient/API/Anilist.php | 4 ++-- src/AnimeClient/API/Anilist/AnilistRequestBuilder.php | 4 ++-- src/AnimeClient/API/Anilist/AnilistTrait.php | 4 ++-- src/AnimeClient/API/Anilist/ListItem.php | 4 ++-- src/AnimeClient/API/Anilist/MissingIdException.php | 4 ++-- src/AnimeClient/API/Anilist/Model.php | 4 ++-- .../API/Anilist/Transformer/AnimeListTransformer.php | 4 ++-- .../API/Anilist/Transformer/MangaListTransformer.php | 4 ++-- src/AnimeClient/API/Anilist/Types/MediaListEntry.php | 4 ++-- src/AnimeClient/API/CacheTrait.php | 4 ++-- src/AnimeClient/API/Enum/AnimeWatchingStatus/Anilist.php | 4 ++-- src/AnimeClient/API/Enum/AnimeWatchingStatus/Kitsu.php | 4 ++-- src/AnimeClient/API/Enum/AnimeWatchingStatus/Route.php | 4 ++-- src/AnimeClient/API/Enum/AnimeWatchingStatus/Title.php | 4 ++-- src/AnimeClient/API/Enum/MangaReadingStatus/Anilist.php | 4 ++-- src/AnimeClient/API/Enum/MangaReadingStatus/Kitsu.php | 4 ++-- src/AnimeClient/API/Enum/MangaReadingStatus/Route.php | 4 ++-- src/AnimeClient/API/Enum/MangaReadingStatus/Title.php | 4 ++-- src/AnimeClient/API/FailedResponseException.php | 4 ++-- src/AnimeClient/API/JsonAPI.php | 4 ++-- src/AnimeClient/API/Kitsu.php | 4 ++-- src/AnimeClient/API/Kitsu/Auth.php | 4 ++-- src/AnimeClient/API/Kitsu/Enum/AnimeAiringStatus.php | 4 ++-- src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php | 4 ++-- src/AnimeClient/API/Kitsu/KitsuTrait.php | 4 ++-- src/AnimeClient/API/Kitsu/ListItem.php | 4 ++-- src/AnimeClient/API/Kitsu/Model.php | 4 ++-- .../API/Kitsu/Transformer/AnimeListTransformer.php | 4 ++-- src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php | 4 ++-- .../API/Kitsu/Transformer/CharacterTransformer.php | 4 ++-- .../API/Kitsu/Transformer/MangaListTransformer.php | 4 ++-- src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php | 4 ++-- src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php | 4 ++-- src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php | 4 ++-- src/AnimeClient/API/Mapping/AnimeWatchingStatus.php | 4 ++-- src/AnimeClient/API/Mapping/MangaReadingStatus.php | 4 ++-- src/AnimeClient/API/ParallelAPIRequest.php | 4 ++-- src/AnimeClient/AnimeClient.php | 4 ++-- src/AnimeClient/Command/BaseCommand.php | 4 ++-- src/AnimeClient/Command/CacheClear.php | 4 ++-- src/AnimeClient/Command/CachePrime.php | 4 ++-- src/AnimeClient/Command/ClearThumbnails.php | 4 ++-- src/AnimeClient/Command/SyncLists.php | 4 ++-- src/AnimeClient/Command/UpdateThumbnails.php | 4 ++-- src/AnimeClient/Controller.php | 4 ++-- src/AnimeClient/Controller/Anime.php | 4 ++-- src/AnimeClient/Controller/AnimeCollection.php | 4 ++-- src/AnimeClient/Controller/Character.php | 4 ++-- src/AnimeClient/Controller/Images.php | 4 ++-- src/AnimeClient/Controller/Manga.php | 4 ++-- src/AnimeClient/Controller/MangaCollection.php | 4 ++-- src/AnimeClient/Controller/Misc.php | 4 ++-- src/AnimeClient/Controller/People.php | 4 ++-- src/AnimeClient/Controller/Settings.php | 4 ++-- src/AnimeClient/Controller/User.php | 4 ++-- src/AnimeClient/Dispatcher.php | 4 ++-- src/AnimeClient/FormGenerator.php | 4 ++-- src/AnimeClient/Helper/Form.php | 4 ++-- src/AnimeClient/Helper/Menu.php | 4 ++-- src/AnimeClient/Helper/Picture.php | 4 ++-- src/AnimeClient/MenuGenerator.php | 4 ++-- src/AnimeClient/Model/API.php | 4 ++-- src/AnimeClient/Model/Anime.php | 4 ++-- src/AnimeClient/Model/AnimeCollection.php | 4 ++-- src/AnimeClient/Model/Collection.php | 4 ++-- src/AnimeClient/Model/DB.php | 4 ++-- src/AnimeClient/Model/Manga.php | 4 ++-- src/AnimeClient/Model/MangaCollection.php | 4 ++-- src/AnimeClient/Model/Settings.php | 4 ++-- src/AnimeClient/RoutingBase.php | 4 ++-- src/AnimeClient/Types/AbstractType.php | 4 ++-- src/AnimeClient/Types/Anime.php | 4 ++-- src/AnimeClient/Types/AnimeListItem.php | 4 ++-- src/AnimeClient/Types/AnimePage.php | 4 ++-- src/AnimeClient/Types/Character.php | 4 ++-- src/AnimeClient/Types/Characters.php | 4 ++-- src/AnimeClient/Types/Config.php | 4 ++-- src/AnimeClient/Types/Config/Anilist.php | 4 ++-- src/AnimeClient/Types/Config/Cache.php | 4 ++-- src/AnimeClient/Types/Config/Database.php | 4 ++-- src/AnimeClient/Types/FormItem.php | 4 ++-- src/AnimeClient/Types/FormItemData.php | 4 ++-- src/AnimeClient/Types/MangaListItem.php | 4 ++-- src/AnimeClient/Types/MangaListItemDetail.php | 4 ++-- src/AnimeClient/Types/MangaPage.php | 4 ++-- src/AnimeClient/Types/Media.php | 4 ++-- src/AnimeClient/Types/Person.php | 4 ++-- src/AnimeClient/Types/UndefinedPropertyException.php | 4 ++-- src/AnimeClient/Types/User.php | 4 ++-- src/AnimeClient/UrlGenerator.php | 4 ++-- src/AnimeClient/Util.php | 4 ++-- src/AnimeClient/constants.php | 4 ++-- src/Ion/ArrayWrapper.php | 4 ++-- src/Ion/Config.php | 4 ++-- src/Ion/ConfigInterface.php | 4 ++-- src/Ion/Di/Container.php | 4 ++-- src/Ion/Di/ContainerAware.php | 4 ++-- src/Ion/Di/ContainerAwareInterface.php | 4 ++-- src/Ion/Di/ContainerInterface.php | 4 ++-- src/Ion/Di/Exception/ContainerException.php | 4 ++-- src/Ion/Di/Exception/NotFoundException.php | 4 ++-- src/Ion/Enum.php | 4 ++-- src/Ion/Exception/ConfigException.php | 4 ++-- src/Ion/Exception/DoubleRenderException.php | 4 ++-- src/Ion/Friend.php | 4 ++-- src/Ion/Json.php | 4 ++-- src/Ion/JsonException.php | 4 ++-- src/Ion/Model.php | 4 ++-- src/Ion/Model/DB.php | 4 ++-- src/Ion/StringWrapper.php | 4 ++-- src/Ion/Transformer/AbstractTransformer.php | 4 ++-- src/Ion/Transformer/TransformerInterface.php | 4 ++-- src/Ion/Type/ArrayType.php | 4 ++-- src/Ion/Type/StringType.php | 4 ++-- src/Ion/View.php | 4 ++-- src/Ion/View/HtmlView.php | 4 ++-- src/Ion/View/HttpView.php | 4 ++-- src/Ion/View/JsonView.php | 4 ++-- src/Ion/ViewInterface.php | 4 ++-- src/Ion/functions.php | 4 ++-- tests/AnimeClient/API/APIRequestBuilderTest.php | 4 ++-- tests/AnimeClient/API/CacheTraitTest.php | 4 ++-- tests/AnimeClient/API/JsonAPITest.php | 4 ++-- .../API/Kitsu/Transformer/AnimeListTransformerTest.php | 4 ++-- .../API/Kitsu/Transformer/AnimeTransformerTest.php | 4 ++-- .../API/Kitsu/Transformer/MangaListTransformerTest.php | 4 ++-- .../API/Kitsu/Transformer/MangaTransformerTest.php | 4 ++-- tests/AnimeClient/API/KitsuTest.php | 4 ++-- tests/AnimeClient/API/ParallelAPIRequestTest.php | 4 ++-- tests/AnimeClient/AnimeClientTest.php | 4 ++-- tests/AnimeClient/AnimeClientTestCase.php | 4 ++-- tests/AnimeClient/Command/BaseCommandTest.php | 4 ++-- tests/AnimeClient/ControllerTest.php | 4 ++-- tests/AnimeClient/DispatcherTest.php | 4 ++-- tests/AnimeClient/FormGeneratorTest.php | 4 ++-- tests/AnimeClient/Helper/MenuHelperTest.php | 4 ++-- tests/AnimeClient/Helper/PictureHelperTest.php | 4 ++-- tests/AnimeClient/MenuGeneratorTest.php | 4 ++-- tests/AnimeClient/RequirementsTest.php | 4 ++-- tests/AnimeClient/RoutingBaseTest.php | 4 ++-- tests/AnimeClient/TestSessionHandler.php | 4 ++-- tests/AnimeClient/UrlGeneratorTest.php | 4 ++-- tests/AnimeClient/UtilTest.php | 4 ++-- tests/Ion/BaseModelTest.php | 4 ++-- tests/Ion/ConfigTest.php | 4 ++-- tests/Ion/Di/ContainerAwareTest.php | 4 ++-- tests/Ion/Di/ContainerTest.php | 4 ++-- tests/Ion/EnumTest.php | 4 ++-- tests/Ion/Exception/DoubleRenderExceptionTest.php | 4 ++-- tests/Ion/FriendTest.php | 4 ++-- tests/Ion/IonTestCase.php | 4 ++-- tests/Ion/JsonTest.php | 4 ++-- tests/Ion/Model/BaseDBModelTest.php | 4 ++-- tests/Ion/StringWrapperTest.php | 4 ++-- tests/Ion/TestSessionHandler.php | 4 ++-- tests/Ion/Transformer/AbstractTransformerTest.php | 4 ++-- tests/Ion/Type/ArrayTypeTest.php | 4 ++-- tests/Ion/Type/StringTypeTest.php | 4 ++-- tests/Ion/View/HtmlViewTest.php | 4 ++-- tests/Ion/View/HttpViewTest.php | 4 ++-- tests/Ion/View/JsonViewTest.php | 4 ++-- tests/Ion/functionsTest.php | 4 ++-- tests/Ion/mocks.php | 4 ++-- 168 files changed, 336 insertions(+), 336 deletions(-) diff --git a/app/bootstrap.php b/app/bootstrap.php index f7638021..c641ffe0 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/build/header_comment.txt b/build/header_comment.txt index e61c8af8..73dc0735 100644 --- a/build/header_comment.txt +++ b/build/header_comment.txt @@ -3,13 +3,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/index.php b/index.php index cef4c453..ad20d92f 100644 --- a/index.php +++ b/index.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/APIRequestBuilder.php b/src/AnimeClient/API/APIRequestBuilder.php index 5639f8cb..1e145f5d 100644 --- a/src/AnimeClient/API/APIRequestBuilder.php +++ b/src/AnimeClient/API/APIRequestBuilder.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/AbstractListItem.php b/src/AnimeClient/API/AbstractListItem.php index 3ff1a8af..257e3478 100644 --- a/src/AnimeClient/API/AbstractListItem.php +++ b/src/AnimeClient/API/AbstractListItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist.php b/src/AnimeClient/API/Anilist.php index 86857ec2..43c0bd7f 100644 --- a/src/AnimeClient/API/Anilist.php +++ b/src/AnimeClient/API/Anilist.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php index f24d3d9b..5504c13c 100644 --- a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php +++ b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/AnilistTrait.php b/src/AnimeClient/API/Anilist/AnilistTrait.php index 98f161ef..388643d8 100644 --- a/src/AnimeClient/API/Anilist/AnilistTrait.php +++ b/src/AnimeClient/API/Anilist/AnilistTrait.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/ListItem.php b/src/AnimeClient/API/Anilist/ListItem.php index e3c795c5..8bf67fd1 100644 --- a/src/AnimeClient/API/Anilist/ListItem.php +++ b/src/AnimeClient/API/Anilist/ListItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/MissingIdException.php b/src/AnimeClient/API/Anilist/MissingIdException.php index c128adee..e83cac8c 100644 --- a/src/AnimeClient/API/Anilist/MissingIdException.php +++ b/src/AnimeClient/API/Anilist/MissingIdException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/Model.php b/src/AnimeClient/API/Anilist/Model.php index 98d74e6d..51b893e8 100644 --- a/src/AnimeClient/API/Anilist/Model.php +++ b/src/AnimeClient/API/Anilist/Model.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php index 62897dc3..51429387 100644 --- a/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php index ab2eeaf5..f7ca4073 100644 --- a/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Anilist/Types/MediaListEntry.php b/src/AnimeClient/API/Anilist/Types/MediaListEntry.php index 4a778e77..57330504 100644 --- a/src/AnimeClient/API/Anilist/Types/MediaListEntry.php +++ b/src/AnimeClient/API/Anilist/Types/MediaListEntry.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/CacheTrait.php b/src/AnimeClient/API/CacheTrait.php index ba786d0c..47d3db12 100644 --- a/src/AnimeClient/API/CacheTrait.php +++ b/src/AnimeClient/API/CacheTrait.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Anilist.php b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Anilist.php index 01fd04ef..a0300d26 100644 --- a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Anilist.php +++ b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Anilist.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Kitsu.php b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Kitsu.php index d8d69d32..22de0103 100644 --- a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Kitsu.php +++ b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Kitsu.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Route.php b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Route.php index ff77694c..c77c0fd8 100644 --- a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Route.php +++ b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Route.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Title.php b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Title.php index 0861a888..3a1bbd61 100644 --- a/src/AnimeClient/API/Enum/AnimeWatchingStatus/Title.php +++ b/src/AnimeClient/API/Enum/AnimeWatchingStatus/Title.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/MangaReadingStatus/Anilist.php b/src/AnimeClient/API/Enum/MangaReadingStatus/Anilist.php index 588d3b30..ddea659f 100644 --- a/src/AnimeClient/API/Enum/MangaReadingStatus/Anilist.php +++ b/src/AnimeClient/API/Enum/MangaReadingStatus/Anilist.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/MangaReadingStatus/Kitsu.php b/src/AnimeClient/API/Enum/MangaReadingStatus/Kitsu.php index 4eb6623e..aac435a7 100644 --- a/src/AnimeClient/API/Enum/MangaReadingStatus/Kitsu.php +++ b/src/AnimeClient/API/Enum/MangaReadingStatus/Kitsu.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/MangaReadingStatus/Route.php b/src/AnimeClient/API/Enum/MangaReadingStatus/Route.php index db8f34d4..97158942 100644 --- a/src/AnimeClient/API/Enum/MangaReadingStatus/Route.php +++ b/src/AnimeClient/API/Enum/MangaReadingStatus/Route.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Enum/MangaReadingStatus/Title.php b/src/AnimeClient/API/Enum/MangaReadingStatus/Title.php index 040e4cae..cac50b41 100644 --- a/src/AnimeClient/API/Enum/MangaReadingStatus/Title.php +++ b/src/AnimeClient/API/Enum/MangaReadingStatus/Title.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/FailedResponseException.php b/src/AnimeClient/API/FailedResponseException.php index cfa05f97..9991a337 100644 --- a/src/AnimeClient/API/FailedResponseException.php +++ b/src/AnimeClient/API/FailedResponseException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/JsonAPI.php b/src/AnimeClient/API/JsonAPI.php index bb3129ba..2ca0d75d 100644 --- a/src/AnimeClient/API/JsonAPI.php +++ b/src/AnimeClient/API/JsonAPI.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu.php b/src/AnimeClient/API/Kitsu.php index 831a37ce..61b1b539 100644 --- a/src/AnimeClient/API/Kitsu.php +++ b/src/AnimeClient/API/Kitsu.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Auth.php b/src/AnimeClient/API/Kitsu/Auth.php index 94755d3f..2198eccd 100644 --- a/src/AnimeClient/API/Kitsu/Auth.php +++ b/src/AnimeClient/API/Kitsu/Auth.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Enum/AnimeAiringStatus.php b/src/AnimeClient/API/Kitsu/Enum/AnimeAiringStatus.php index d69623f3..cbf397ab 100644 --- a/src/AnimeClient/API/Kitsu/Enum/AnimeAiringStatus.php +++ b/src/AnimeClient/API/Kitsu/Enum/AnimeAiringStatus.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php index bd8d0aa0..b933328c 100644 --- a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php +++ b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/KitsuTrait.php b/src/AnimeClient/API/Kitsu/KitsuTrait.php index 0b4f9f31..598ff0ea 100644 --- a/src/AnimeClient/API/Kitsu/KitsuTrait.php +++ b/src/AnimeClient/API/Kitsu/KitsuTrait.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/ListItem.php b/src/AnimeClient/API/Kitsu/ListItem.php index dde2d38d..2415841a 100644 --- a/src/AnimeClient/API/Kitsu/ListItem.php +++ b/src/AnimeClient/API/Kitsu/ListItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Model.php b/src/AnimeClient/API/Kitsu/Model.php index dc3c3c5d..414131a7 100644 --- a/src/AnimeClient/API/Kitsu/Model.php +++ b/src/AnimeClient/API/Kitsu/Model.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php index 74d3739a..e4942909 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php index 0369a795..fc93827c 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php index 76c8bffa..41b3e509 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php index 2692e01d..83cc7d0a 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php index a5338a89..3d2d4e08 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php index 6a0b4ea2..93fb6e21 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php index 21ea0e25..4af2896f 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Mapping/AnimeWatchingStatus.php b/src/AnimeClient/API/Mapping/AnimeWatchingStatus.php index a7f0eca6..f6fde964 100644 --- a/src/AnimeClient/API/Mapping/AnimeWatchingStatus.php +++ b/src/AnimeClient/API/Mapping/AnimeWatchingStatus.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/Mapping/MangaReadingStatus.php b/src/AnimeClient/API/Mapping/MangaReadingStatus.php index 3c114a66..1ce7f597 100644 --- a/src/AnimeClient/API/Mapping/MangaReadingStatus.php +++ b/src/AnimeClient/API/Mapping/MangaReadingStatus.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/API/ParallelAPIRequest.php b/src/AnimeClient/API/ParallelAPIRequest.php index 6230eee5..771006ba 100644 --- a/src/AnimeClient/API/ParallelAPIRequest.php +++ b/src/AnimeClient/API/ParallelAPIRequest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/AnimeClient.php b/src/AnimeClient/AnimeClient.php index 1242a74d..f70a2142 100644 --- a/src/AnimeClient/AnimeClient.php +++ b/src/AnimeClient/AnimeClient.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/BaseCommand.php b/src/AnimeClient/Command/BaseCommand.php index 02205d88..6fc64487 100644 --- a/src/AnimeClient/Command/BaseCommand.php +++ b/src/AnimeClient/Command/BaseCommand.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/CacheClear.php b/src/AnimeClient/Command/CacheClear.php index 14d5aa6e..2d3495e5 100644 --- a/src/AnimeClient/Command/CacheClear.php +++ b/src/AnimeClient/Command/CacheClear.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/CachePrime.php b/src/AnimeClient/Command/CachePrime.php index 6848a61a..2b25cca7 100644 --- a/src/AnimeClient/Command/CachePrime.php +++ b/src/AnimeClient/Command/CachePrime.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/ClearThumbnails.php b/src/AnimeClient/Command/ClearThumbnails.php index 1c1a1061..1cf1a2fd 100644 --- a/src/AnimeClient/Command/ClearThumbnails.php +++ b/src/AnimeClient/Command/ClearThumbnails.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/SyncLists.php b/src/AnimeClient/Command/SyncLists.php index 8934937d..e0c53da2 100644 --- a/src/AnimeClient/Command/SyncLists.php +++ b/src/AnimeClient/Command/SyncLists.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Command/UpdateThumbnails.php b/src/AnimeClient/Command/UpdateThumbnails.php index 13eb789a..909db166 100644 --- a/src/AnimeClient/Command/UpdateThumbnails.php +++ b/src/AnimeClient/Command/UpdateThumbnails.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller.php b/src/AnimeClient/Controller.php index 8e17f891..db726cb3 100644 --- a/src/AnimeClient/Controller.php +++ b/src/AnimeClient/Controller.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Anime.php b/src/AnimeClient/Controller/Anime.php index 540c167a..a53ced6c 100644 --- a/src/AnimeClient/Controller/Anime.php +++ b/src/AnimeClient/Controller/Anime.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/AnimeCollection.php b/src/AnimeClient/Controller/AnimeCollection.php index 85147cd3..62efaad7 100644 --- a/src/AnimeClient/Controller/AnimeCollection.php +++ b/src/AnimeClient/Controller/AnimeCollection.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Character.php b/src/AnimeClient/Controller/Character.php index 6c14253e..84048b4c 100644 --- a/src/AnimeClient/Controller/Character.php +++ b/src/AnimeClient/Controller/Character.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Images.php b/src/AnimeClient/Controller/Images.php index a6c5f1ff..60913b41 100644 --- a/src/AnimeClient/Controller/Images.php +++ b/src/AnimeClient/Controller/Images.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Manga.php b/src/AnimeClient/Controller/Manga.php index 634b19f2..de3e8550 100644 --- a/src/AnimeClient/Controller/Manga.php +++ b/src/AnimeClient/Controller/Manga.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/MangaCollection.php b/src/AnimeClient/Controller/MangaCollection.php index fce90263..bf3ae0be 100644 --- a/src/AnimeClient/Controller/MangaCollection.php +++ b/src/AnimeClient/Controller/MangaCollection.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Misc.php b/src/AnimeClient/Controller/Misc.php index 6737fe4f..035248f4 100644 --- a/src/AnimeClient/Controller/Misc.php +++ b/src/AnimeClient/Controller/Misc.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/People.php b/src/AnimeClient/Controller/People.php index 2722f2e6..38adec25 100644 --- a/src/AnimeClient/Controller/People.php +++ b/src/AnimeClient/Controller/People.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/Settings.php b/src/AnimeClient/Controller/Settings.php index 20e2a56c..e44d7cda 100644 --- a/src/AnimeClient/Controller/Settings.php +++ b/src/AnimeClient/Controller/Settings.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Controller/User.php b/src/AnimeClient/Controller/User.php index 6df00d17..b00fc9b7 100644 --- a/src/AnimeClient/Controller/User.php +++ b/src/AnimeClient/Controller/User.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Dispatcher.php b/src/AnimeClient/Dispatcher.php index e0a98ca5..3178744d 100644 --- a/src/AnimeClient/Dispatcher.php +++ b/src/AnimeClient/Dispatcher.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/FormGenerator.php b/src/AnimeClient/FormGenerator.php index 3e55dfe6..fe04838f 100644 --- a/src/AnimeClient/FormGenerator.php +++ b/src/AnimeClient/FormGenerator.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Helper/Form.php b/src/AnimeClient/Helper/Form.php index 9c20946b..51f57807 100644 --- a/src/AnimeClient/Helper/Form.php +++ b/src/AnimeClient/Helper/Form.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Helper/Menu.php b/src/AnimeClient/Helper/Menu.php index 92378bae..adc59c55 100644 --- a/src/AnimeClient/Helper/Menu.php +++ b/src/AnimeClient/Helper/Menu.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Helper/Picture.php b/src/AnimeClient/Helper/Picture.php index d4741fb2..604a1948 100644 --- a/src/AnimeClient/Helper/Picture.php +++ b/src/AnimeClient/Helper/Picture.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/MenuGenerator.php b/src/AnimeClient/MenuGenerator.php index e04f4f89..3696f230 100644 --- a/src/AnimeClient/MenuGenerator.php +++ b/src/AnimeClient/MenuGenerator.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/API.php b/src/AnimeClient/Model/API.php index 19aaf1f5..ef6cf104 100644 --- a/src/AnimeClient/Model/API.php +++ b/src/AnimeClient/Model/API.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/Anime.php b/src/AnimeClient/Model/Anime.php index 83a25c30..55d31726 100644 --- a/src/AnimeClient/Model/Anime.php +++ b/src/AnimeClient/Model/Anime.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/AnimeCollection.php b/src/AnimeClient/Model/AnimeCollection.php index bc764ff4..f2322c08 100644 --- a/src/AnimeClient/Model/AnimeCollection.php +++ b/src/AnimeClient/Model/AnimeCollection.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/Collection.php b/src/AnimeClient/Model/Collection.php index eeb32fcd..5cb1c032 100644 --- a/src/AnimeClient/Model/Collection.php +++ b/src/AnimeClient/Model/Collection.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/DB.php b/src/AnimeClient/Model/DB.php index d69481ec..02899670 100644 --- a/src/AnimeClient/Model/DB.php +++ b/src/AnimeClient/Model/DB.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/Manga.php b/src/AnimeClient/Model/Manga.php index 9ff04072..61116861 100644 --- a/src/AnimeClient/Model/Manga.php +++ b/src/AnimeClient/Model/Manga.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/MangaCollection.php b/src/AnimeClient/Model/MangaCollection.php index b1185d44..f3968fcd 100644 --- a/src/AnimeClient/Model/MangaCollection.php +++ b/src/AnimeClient/Model/MangaCollection.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Model/Settings.php b/src/AnimeClient/Model/Settings.php index 92dc1e91..a1beec2c 100644 --- a/src/AnimeClient/Model/Settings.php +++ b/src/AnimeClient/Model/Settings.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/RoutingBase.php b/src/AnimeClient/RoutingBase.php index 34c0deec..ea55207e 100644 --- a/src/AnimeClient/RoutingBase.php +++ b/src/AnimeClient/RoutingBase.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/AbstractType.php b/src/AnimeClient/Types/AbstractType.php index d4a3c548..aa70f2b6 100644 --- a/src/AnimeClient/Types/AbstractType.php +++ b/src/AnimeClient/Types/AbstractType.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Anime.php b/src/AnimeClient/Types/Anime.php index 1b74b029..2b0cf05e 100644 --- a/src/AnimeClient/Types/Anime.php +++ b/src/AnimeClient/Types/Anime.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/AnimeListItem.php b/src/AnimeClient/Types/AnimeListItem.php index 89c7d8b7..a77675a4 100644 --- a/src/AnimeClient/Types/AnimeListItem.php +++ b/src/AnimeClient/Types/AnimeListItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/AnimePage.php b/src/AnimeClient/Types/AnimePage.php index 5b2f2f6b..b1a3b5d9 100644 --- a/src/AnimeClient/Types/AnimePage.php +++ b/src/AnimeClient/Types/AnimePage.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Character.php b/src/AnimeClient/Types/Character.php index d99154b7..d509f58d 100644 --- a/src/AnimeClient/Types/Character.php +++ b/src/AnimeClient/Types/Character.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Characters.php b/src/AnimeClient/Types/Characters.php index 28d0ae6f..6a4782f1 100644 --- a/src/AnimeClient/Types/Characters.php +++ b/src/AnimeClient/Types/Characters.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Config.php b/src/AnimeClient/Types/Config.php index 1eeed209..99ce5d42 100644 --- a/src/AnimeClient/Types/Config.php +++ b/src/AnimeClient/Types/Config.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Config/Anilist.php b/src/AnimeClient/Types/Config/Anilist.php index 0a77a62e..9f8bc333 100644 --- a/src/AnimeClient/Types/Config/Anilist.php +++ b/src/AnimeClient/Types/Config/Anilist.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Config/Cache.php b/src/AnimeClient/Types/Config/Cache.php index b9a5f51b..a2a591a8 100644 --- a/src/AnimeClient/Types/Config/Cache.php +++ b/src/AnimeClient/Types/Config/Cache.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Config/Database.php b/src/AnimeClient/Types/Config/Database.php index 84d1b4a8..cc664cb5 100644 --- a/src/AnimeClient/Types/Config/Database.php +++ b/src/AnimeClient/Types/Config/Database.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/FormItem.php b/src/AnimeClient/Types/FormItem.php index 135f9aa9..ff7651d6 100644 --- a/src/AnimeClient/Types/FormItem.php +++ b/src/AnimeClient/Types/FormItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/FormItemData.php b/src/AnimeClient/Types/FormItemData.php index 03951cd2..1f7f9bae 100644 --- a/src/AnimeClient/Types/FormItemData.php +++ b/src/AnimeClient/Types/FormItemData.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/MangaListItem.php b/src/AnimeClient/Types/MangaListItem.php index b4dda4ce..245bae32 100644 --- a/src/AnimeClient/Types/MangaListItem.php +++ b/src/AnimeClient/Types/MangaListItem.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/MangaListItemDetail.php b/src/AnimeClient/Types/MangaListItemDetail.php index 55885b95..57bb12d6 100644 --- a/src/AnimeClient/Types/MangaListItemDetail.php +++ b/src/AnimeClient/Types/MangaListItemDetail.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/MangaPage.php b/src/AnimeClient/Types/MangaPage.php index 802d2f03..3db6679c 100644 --- a/src/AnimeClient/Types/MangaPage.php +++ b/src/AnimeClient/Types/MangaPage.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Media.php b/src/AnimeClient/Types/Media.php index f1064d6f..cbda1048 100644 --- a/src/AnimeClient/Types/Media.php +++ b/src/AnimeClient/Types/Media.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/Person.php b/src/AnimeClient/Types/Person.php index d21f926e..b7606a0c 100644 --- a/src/AnimeClient/Types/Person.php +++ b/src/AnimeClient/Types/Person.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/UndefinedPropertyException.php b/src/AnimeClient/Types/UndefinedPropertyException.php index 0cdc288e..87b154ce 100644 --- a/src/AnimeClient/Types/UndefinedPropertyException.php +++ b/src/AnimeClient/Types/UndefinedPropertyException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Types/User.php b/src/AnimeClient/Types/User.php index 1ff091af..3a2dfaab 100644 --- a/src/AnimeClient/Types/User.php +++ b/src/AnimeClient/Types/User.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/UrlGenerator.php b/src/AnimeClient/UrlGenerator.php index 831272cd..c8edb2b5 100644 --- a/src/AnimeClient/UrlGenerator.php +++ b/src/AnimeClient/UrlGenerator.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/Util.php b/src/AnimeClient/Util.php index 4e03218d..f29af0ba 100644 --- a/src/AnimeClient/Util.php +++ b/src/AnimeClient/Util.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/AnimeClient/constants.php b/src/AnimeClient/constants.php index 108d8e5c..ed97c946 100644 --- a/src/AnimeClient/constants.php +++ b/src/AnimeClient/constants.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/ArrayWrapper.php b/src/Ion/ArrayWrapper.php index 8a2eca7d..86288895 100644 --- a/src/Ion/ArrayWrapper.php +++ b/src/Ion/ArrayWrapper.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Config.php b/src/Ion/Config.php index c3d3ea8f..0efa4cf1 100644 --- a/src/Ion/Config.php +++ b/src/Ion/Config.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/ConfigInterface.php b/src/Ion/ConfigInterface.php index 9d0e4e3e..f854674a 100644 --- a/src/Ion/ConfigInterface.php +++ b/src/Ion/ConfigInterface.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/Container.php b/src/Ion/Di/Container.php index e6bfea93..c8b8cc80 100644 --- a/src/Ion/Di/Container.php +++ b/src/Ion/Di/Container.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/ContainerAware.php b/src/Ion/Di/ContainerAware.php index c1edcc0d..3b43a0cf 100644 --- a/src/Ion/Di/ContainerAware.php +++ b/src/Ion/Di/ContainerAware.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/ContainerAwareInterface.php b/src/Ion/Di/ContainerAwareInterface.php index f35baadf..50f96c0e 100644 --- a/src/Ion/Di/ContainerAwareInterface.php +++ b/src/Ion/Di/ContainerAwareInterface.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/ContainerInterface.php b/src/Ion/Di/ContainerInterface.php index 7d1e273f..aac06194 100644 --- a/src/Ion/Di/ContainerInterface.php +++ b/src/Ion/Di/ContainerInterface.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/Exception/ContainerException.php b/src/Ion/Di/Exception/ContainerException.php index 1f9ab88d..7323cb12 100644 --- a/src/Ion/Di/Exception/ContainerException.php +++ b/src/Ion/Di/Exception/ContainerException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Di/Exception/NotFoundException.php b/src/Ion/Di/Exception/NotFoundException.php index 214f7690..2b3345d8 100644 --- a/src/Ion/Di/Exception/NotFoundException.php +++ b/src/Ion/Di/Exception/NotFoundException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Enum.php b/src/Ion/Enum.php index 397f2228..e51bfc6a 100644 --- a/src/Ion/Enum.php +++ b/src/Ion/Enum.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Exception/ConfigException.php b/src/Ion/Exception/ConfigException.php index 82aad58a..2ef4003a 100644 --- a/src/Ion/Exception/ConfigException.php +++ b/src/Ion/Exception/ConfigException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Exception/DoubleRenderException.php b/src/Ion/Exception/DoubleRenderException.php index 9e782cda..5faaeb2f 100644 --- a/src/Ion/Exception/DoubleRenderException.php +++ b/src/Ion/Exception/DoubleRenderException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Friend.php b/src/Ion/Friend.php index 675bbdc3..91011dfd 100644 --- a/src/Ion/Friend.php +++ b/src/Ion/Friend.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Json.php b/src/Ion/Json.php index 07e61e69..0abfa667 100644 --- a/src/Ion/Json.php +++ b/src/Ion/Json.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/JsonException.php b/src/Ion/JsonException.php index bd1fb9ad..aafac4da 100644 --- a/src/Ion/JsonException.php +++ b/src/Ion/JsonException.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Model.php b/src/Ion/Model.php index 7f72c0b1..7ae03591 100644 --- a/src/Ion/Model.php +++ b/src/Ion/Model.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Model/DB.php b/src/Ion/Model/DB.php index f06eda2a..a77ce12e 100644 --- a/src/Ion/Model/DB.php +++ b/src/Ion/Model/DB.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/StringWrapper.php b/src/Ion/StringWrapper.php index 71609f05..092c5666 100644 --- a/src/Ion/StringWrapper.php +++ b/src/Ion/StringWrapper.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Transformer/AbstractTransformer.php b/src/Ion/Transformer/AbstractTransformer.php index 56b56194..ea331b56 100644 --- a/src/Ion/Transformer/AbstractTransformer.php +++ b/src/Ion/Transformer/AbstractTransformer.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Transformer/TransformerInterface.php b/src/Ion/Transformer/TransformerInterface.php index b89e8f95..6be92ea8 100644 --- a/src/Ion/Transformer/TransformerInterface.php +++ b/src/Ion/Transformer/TransformerInterface.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Type/ArrayType.php b/src/Ion/Type/ArrayType.php index f1e84928..bab03c61 100644 --- a/src/Ion/Type/ArrayType.php +++ b/src/Ion/Type/ArrayType.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/Type/StringType.php b/src/Ion/Type/StringType.php index 5601731f..a7ade2d4 100644 --- a/src/Ion/Type/StringType.php +++ b/src/Ion/Type/StringType.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/View.php b/src/Ion/View.php index 1b4d2ec2..f98c16ce 100644 --- a/src/Ion/View.php +++ b/src/Ion/View.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/View/HtmlView.php b/src/Ion/View/HtmlView.php index 70e544ce..079c4527 100644 --- a/src/Ion/View/HtmlView.php +++ b/src/Ion/View/HtmlView.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/View/HttpView.php b/src/Ion/View/HttpView.php index 6fa5f09a..3bec3844 100644 --- a/src/Ion/View/HttpView.php +++ b/src/Ion/View/HttpView.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/View/JsonView.php b/src/Ion/View/JsonView.php index a294d06f..474985b1 100644 --- a/src/Ion/View/JsonView.php +++ b/src/Ion/View/JsonView.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/ViewInterface.php b/src/Ion/ViewInterface.php index aeb767d3..6942f2b6 100644 --- a/src/Ion/ViewInterface.php +++ b/src/Ion/ViewInterface.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/src/Ion/functions.php b/src/Ion/functions.php index 439d6107..b18c02bf 100644 --- a/src/Ion/functions.php +++ b/src/Ion/functions.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/APIRequestBuilderTest.php b/tests/AnimeClient/API/APIRequestBuilderTest.php index 116db20b..a73dff08 100644 --- a/tests/AnimeClient/API/APIRequestBuilderTest.php +++ b/tests/AnimeClient/API/APIRequestBuilderTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/CacheTraitTest.php b/tests/AnimeClient/API/CacheTraitTest.php index 2bd73b83..de90422f 100644 --- a/tests/AnimeClient/API/CacheTraitTest.php +++ b/tests/AnimeClient/API/CacheTraitTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/JsonAPITest.php b/tests/AnimeClient/API/JsonAPITest.php index b9aac7a6..802e2b91 100644 --- a/tests/AnimeClient/API/JsonAPITest.php +++ b/tests/AnimeClient/API/JsonAPITest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/Kitsu/Transformer/AnimeListTransformerTest.php b/tests/AnimeClient/API/Kitsu/Transformer/AnimeListTransformerTest.php index 5ca9d5a8..8778f48d 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/AnimeListTransformerTest.php +++ b/tests/AnimeClient/API/Kitsu/Transformer/AnimeListTransformerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/Kitsu/Transformer/AnimeTransformerTest.php b/tests/AnimeClient/API/Kitsu/Transformer/AnimeTransformerTest.php index e1d5fc85..9c58d746 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/AnimeTransformerTest.php +++ b/tests/AnimeClient/API/Kitsu/Transformer/AnimeTransformerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php b/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php index 2e3164cc..b99809d2 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php +++ b/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/Kitsu/Transformer/MangaTransformerTest.php b/tests/AnimeClient/API/Kitsu/Transformer/MangaTransformerTest.php index 75b6e5b8..364039b4 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/MangaTransformerTest.php +++ b/tests/AnimeClient/API/Kitsu/Transformer/MangaTransformerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/KitsuTest.php b/tests/AnimeClient/API/KitsuTest.php index 9ed312de..8f501e5c 100644 --- a/tests/AnimeClient/API/KitsuTest.php +++ b/tests/AnimeClient/API/KitsuTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/API/ParallelAPIRequestTest.php b/tests/AnimeClient/API/ParallelAPIRequestTest.php index 345e9840..7a87a0d5 100644 --- a/tests/AnimeClient/API/ParallelAPIRequestTest.php +++ b/tests/AnimeClient/API/ParallelAPIRequestTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/AnimeClientTest.php b/tests/AnimeClient/AnimeClientTest.php index 0f73ab84..8d044196 100644 --- a/tests/AnimeClient/AnimeClientTest.php +++ b/tests/AnimeClient/AnimeClientTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/AnimeClientTestCase.php b/tests/AnimeClient/AnimeClientTestCase.php index c9c6a8a9..835c0094 100644 --- a/tests/AnimeClient/AnimeClientTestCase.php +++ b/tests/AnimeClient/AnimeClientTestCase.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/Command/BaseCommandTest.php b/tests/AnimeClient/Command/BaseCommandTest.php index 76b8555b..d61cee4b 100644 --- a/tests/AnimeClient/Command/BaseCommandTest.php +++ b/tests/AnimeClient/Command/BaseCommandTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/ControllerTest.php b/tests/AnimeClient/ControllerTest.php index 5b07a40d..8a4a0a52 100644 --- a/tests/AnimeClient/ControllerTest.php +++ b/tests/AnimeClient/ControllerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/DispatcherTest.php b/tests/AnimeClient/DispatcherTest.php index c6e07645..3f16fd78 100644 --- a/tests/AnimeClient/DispatcherTest.php +++ b/tests/AnimeClient/DispatcherTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/FormGeneratorTest.php b/tests/AnimeClient/FormGeneratorTest.php index b3096098..399556ff 100644 --- a/tests/AnimeClient/FormGeneratorTest.php +++ b/tests/AnimeClient/FormGeneratorTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/Helper/MenuHelperTest.php b/tests/AnimeClient/Helper/MenuHelperTest.php index 9501e1a2..1e863b1d 100644 --- a/tests/AnimeClient/Helper/MenuHelperTest.php +++ b/tests/AnimeClient/Helper/MenuHelperTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/Helper/PictureHelperTest.php b/tests/AnimeClient/Helper/PictureHelperTest.php index 15d3a866..a28f4fda 100644 --- a/tests/AnimeClient/Helper/PictureHelperTest.php +++ b/tests/AnimeClient/Helper/PictureHelperTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/MenuGeneratorTest.php b/tests/AnimeClient/MenuGeneratorTest.php index 193a26f2..c6e2490e 100644 --- a/tests/AnimeClient/MenuGeneratorTest.php +++ b/tests/AnimeClient/MenuGeneratorTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/RequirementsTest.php b/tests/AnimeClient/RequirementsTest.php index 1acfa9fc..22b2372a 100644 --- a/tests/AnimeClient/RequirementsTest.php +++ b/tests/AnimeClient/RequirementsTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/RoutingBaseTest.php b/tests/AnimeClient/RoutingBaseTest.php index 63cb48c8..81cbb787 100644 --- a/tests/AnimeClient/RoutingBaseTest.php +++ b/tests/AnimeClient/RoutingBaseTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/TestSessionHandler.php b/tests/AnimeClient/TestSessionHandler.php index 403bcf26..0aad55a2 100644 --- a/tests/AnimeClient/TestSessionHandler.php +++ b/tests/AnimeClient/TestSessionHandler.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/UrlGeneratorTest.php b/tests/AnimeClient/UrlGeneratorTest.php index dfbb2ff7..24e3264a 100644 --- a/tests/AnimeClient/UrlGeneratorTest.php +++ b/tests/AnimeClient/UrlGeneratorTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/AnimeClient/UtilTest.php b/tests/AnimeClient/UtilTest.php index 5ceca47c..d73db21f 100644 --- a/tests/AnimeClient/UtilTest.php +++ b/tests/AnimeClient/UtilTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/BaseModelTest.php b/tests/Ion/BaseModelTest.php index e5fe6562..916d1b74 100644 --- a/tests/Ion/BaseModelTest.php +++ b/tests/Ion/BaseModelTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/ConfigTest.php b/tests/Ion/ConfigTest.php index 1cb2cf15..0d406cf7 100644 --- a/tests/Ion/ConfigTest.php +++ b/tests/Ion/ConfigTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Di/ContainerAwareTest.php b/tests/Ion/Di/ContainerAwareTest.php index 6279e9a3..a8d752f4 100644 --- a/tests/Ion/Di/ContainerAwareTest.php +++ b/tests/Ion/Di/ContainerAwareTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Di/ContainerTest.php b/tests/Ion/Di/ContainerTest.php index 780de61d..e022443c 100644 --- a/tests/Ion/Di/ContainerTest.php +++ b/tests/Ion/Di/ContainerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/EnumTest.php b/tests/Ion/EnumTest.php index dfbd81a7..1d95f7a9 100644 --- a/tests/Ion/EnumTest.php +++ b/tests/Ion/EnumTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Exception/DoubleRenderExceptionTest.php b/tests/Ion/Exception/DoubleRenderExceptionTest.php index f6bdfb42..1aaf8c66 100644 --- a/tests/Ion/Exception/DoubleRenderExceptionTest.php +++ b/tests/Ion/Exception/DoubleRenderExceptionTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/FriendTest.php b/tests/Ion/FriendTest.php index 2fd12ca7..8f4bdfde 100644 --- a/tests/Ion/FriendTest.php +++ b/tests/Ion/FriendTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/IonTestCase.php b/tests/Ion/IonTestCase.php index 00cf234d..6d30b374 100644 --- a/tests/Ion/IonTestCase.php +++ b/tests/Ion/IonTestCase.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/JsonTest.php b/tests/Ion/JsonTest.php index ac72643f..b4b8cef3 100644 --- a/tests/Ion/JsonTest.php +++ b/tests/Ion/JsonTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Model/BaseDBModelTest.php b/tests/Ion/Model/BaseDBModelTest.php index 593f4f87..29cbcb5c 100644 --- a/tests/Ion/Model/BaseDBModelTest.php +++ b/tests/Ion/Model/BaseDBModelTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/StringWrapperTest.php b/tests/Ion/StringWrapperTest.php index 05a7070a..fd9743ec 100644 --- a/tests/Ion/StringWrapperTest.php +++ b/tests/Ion/StringWrapperTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/TestSessionHandler.php b/tests/Ion/TestSessionHandler.php index 04caadcd..bb69b6ad 100644 --- a/tests/Ion/TestSessionHandler.php +++ b/tests/Ion/TestSessionHandler.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Transformer/AbstractTransformerTest.php b/tests/Ion/Transformer/AbstractTransformerTest.php index aeb8c221..fd8d3c0e 100644 --- a/tests/Ion/Transformer/AbstractTransformerTest.php +++ b/tests/Ion/Transformer/AbstractTransformerTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Type/ArrayTypeTest.php b/tests/Ion/Type/ArrayTypeTest.php index 55152ee7..e91dd6cb 100644 --- a/tests/Ion/Type/ArrayTypeTest.php +++ b/tests/Ion/Type/ArrayTypeTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/Type/StringTypeTest.php b/tests/Ion/Type/StringTypeTest.php index 7a25eb78..f12bc45e 100644 --- a/tests/Ion/Type/StringTypeTest.php +++ b/tests/Ion/Type/StringTypeTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/View/HtmlViewTest.php b/tests/Ion/View/HtmlViewTest.php index 4c854d02..e1c54a1f 100644 --- a/tests/Ion/View/HtmlViewTest.php +++ b/tests/Ion/View/HtmlViewTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/View/HttpViewTest.php b/tests/Ion/View/HttpViewTest.php index 369e4a25..ffa821e5 100644 --- a/tests/Ion/View/HttpViewTest.php +++ b/tests/Ion/View/HttpViewTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/View/JsonViewTest.php b/tests/Ion/View/JsonViewTest.php index b0691104..d6ba4bbe 100644 --- a/tests/Ion/View/JsonViewTest.php +++ b/tests/Ion/View/JsonViewTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/functionsTest.php b/tests/Ion/functionsTest.php index cae8fdab..e14759d7 100644 --- a/tests/Ion/functionsTest.php +++ b/tests/Ion/functionsTest.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ diff --git a/tests/Ion/mocks.php b/tests/Ion/mocks.php index 900325d8..b5d8b05e 100644 --- a/tests/Ion/mocks.php +++ b/tests/Ion/mocks.php @@ -4,13 +4,13 @@ * * An API client for Kitsu to manage anime and manga watch lists * - * PHP version 7.3 + * PHP version 7.4 * * @package HummingbirdAnimeClient * @author Timothy J. Warren * @copyright 2015 - 2020 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.2 + * @version 5 * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient */ From fc71007227f715ffe9e7e676fbbc92a97877b844 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Apr 2020 15:43:12 -0400 Subject: [PATCH 05/27] Remove some old frontend files --- public/css/app.min.css | 1 - public/css/dark-auto.min.css | 1 - public/es/anon.min.js | 1 - public/es/scripts.min.js | 1 - 4 files changed, 4 deletions(-) delete mode 100644 public/css/app.min.css delete mode 100644 public/css/dark-auto.min.css delete mode 100644 public/es/anon.min.js delete mode 100644 public/es/scripts.min.js diff --git a/public/css/app.min.css b/public/css/app.min.css deleted file mode 100644 index 2bd6229d..00000000 --- a/public/css/app.min.css +++ /dev/null @@ -1 +0,0 @@ -:root{--default-font-list:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;--monospace-font-list:"Anonymous Pro","Fira Code",Menlo,Monaco,Consolas,"Courier New",monospace;--serif-font-list:Georgia,Times,"Times New Roman",serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);line-height:1.4;overflow-y:scroll;-moz-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}audio:not([controls]){display:none}details{display:block}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}main{margin:0 auto;padding:0 1.6rem 1.6rem}main,pre,summary{display:block}pre{background:#efefef;color:#444;font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list);font-size:1.4em;font-size:1.4rem;margin:1.6rem 0;overflow:auto;padding:1.6rem;word-break:break-all;word-wrap:break-word}progress{display:inline-block}small{color:#777;font-size:75%}big{font-size:125%}template{display:none}textarea{border:.1rem solid #ccc;border-radius:0;display:block;margin-bottom:.8rem;overflow:auto;padding:.8rem;resize:vertical;vertical-align:middle}[hidden]{display:none}[unselectable]{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}*,:after,:before{box-sizing:inherit}*{font-size:inherit;line-height:inherit;margin:0;padding:0}:after,:before{text-decoration:inherit;vertical-align:inherit}a{-webkit-transition:.25s ease;color:#1271db;text-decoration:none;transition:.25s ease}audio,canvas,iframe,img,svg,video{vertical-align:middle}input,textarea{border:.1rem solid #ccc;color:inherit;font-family:inherit;font-style:inherit;font-weight:inherit;min-height:1.4em}code,kbd,pre,samp{font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list)}table{border-collapse:collapse;border-spacing:0;margin-bottom:1.6rem}::-moz-selection{background-color:#b3d4fc;text-shadow:none}::selection{background-color:#b3d4fc;text-shadow:none}button::-moz-focus-inner{border:0}body{color:#444;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);font-size:1.6rem;font-style:normal;font-weight:400;padding:0}p{margin:0 0 1.6rem}h1,h2,h3,h4,h5,h6{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);margin:2rem 0 1.6rem}h1{border-bottom:.1rem solid rgba(0,0,0,.2);font-size:3.6em;font-size:3.6rem}h1,h2{font-style:normal;font-weight:500}h2{font-size:3em;font-size:3rem}h3{font-size:2.4em;font-size:2.4rem;font-style:normal;font-weight:500;margin:1.6rem 0 .4rem}h4{font-size:1.8em;font-size:1.8rem}h4,h5{font-style:normal;font-weight:600;margin:1.6rem 0 .4rem}h5{font-size:1.6em;font-size:1.6rem}h6{color:#777;font-size:1.4em;font-style:normal;font-weight:600;margin:1.6rem 0 .4rem}code,h6{font-size:1.4rem}code{background:#efefef;color:#444;font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list);word-break:break-all;word-wrap:break-word}a:focus,a:hover{text-decoration:none}dl{margin-bottom:1.6rem}dd{margin-left:4rem}ol,ul{margin-bottom:.8rem;padding-left:2rem}blockquote{border-left:.2rem solid #1271db;font-style:italic;margin:1.6rem 0;padding-left:1.6rem}blockquote,figcaption{font-family:Georgia,Times,Times New Roman,serif;font-family:var(--serif-font-list)}html{font-size:62.5%}article,aside,details,footer,header,main,section,summary{display:block;height:auto;margin:0 auto;width:100%}footer{clear:both;display:inline-block;float:left;max-width:100%;padding:1rem 0;text-align:center}footer,hr{border-top:.1rem solid rgba(0,0,0,.2)}hr{display:block;margin-bottom:1.6rem;width:100%}img{height:auto;vertical-align:baseline}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{border:.1rem solid #ccc;border-radius:0;display:inline-block;padding:.8rem;vertical-align:middle}input:not([type]){-webkit-appearance:none;background-clip:padding-box;background-color:#fff;border:.1rem solid #ccc;border-radius:0;color:#444;display:inline-block;padding:.8rem;text-align:left}input[type=color]{padding:.8rem 1.6rem}input:not([type]):focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:#b3d4fc}input[type=checkbox],input[type=radio]{vertical-align:middle}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:.1rem thin solid #444}input:not([type])[disabled],input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled],textarea[disabled]{background-color:#efefef;color:#777;cursor:not-allowed}input[readonly],textarea[readonly]{background-color:#efefef;border-color:#ccc;color:#777}input:focus:invalid,textarea:focus:invalid{border-color:#e9322d;color:#b94a48}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#ff4136}select[multiple]{height:auto}label{line-height:2}fieldset{border:0;margin:0;padding:.8rem 0}legend{border-bottom:.1rem solid #ccc;color:#444;display:block;margin-bottom:.8rem;padding:.8rem 0;width:100%}button,input[type=submit]{-moz-user-select:none;-ms-user-select:none;-webkit-transition:.25s ease;-webkit-user-drag:none;-webkit-user-select:none;border:.2rem solid #444;border-radius:0;color:#444;cursor:pointer;display:inline-block;margin-bottom:.8rem;margin-right:.4rem;padding:.8rem 1.6rem;text-align:center;text-decoration:none;text-transform:uppercase;transition:.25s ease;user-select:none;vertical-align:baseline}button a,input[type=submit] a{color:#444}button::-moz-focus-inner,input[type=submit]::-moz-focus-inner{padding:0}button:hover,input[type=submit]:hover{background:#444;border-color:#444;color:#fff}button:hover a,input[type=submit]:hover a{color:#fff}button:active,input[type=submit]:active{background:#6a6a6a;border-color:#6a6a6a;color:#fff}button:active a,input[type=submit]:active a{color:#fff}button:disabled,input[type=submit]:disabled{box-shadow:none;cursor:not-allowed;opacity:.4}nav ul{list-style:none;margin:0;padding:0;text-align:center}nav ul li{display:inline}nav a{-webkit-transition:.25s ease;border-bottom:.2rem solid transparent;color:#444;padding:.8rem 1.6rem;text-decoration:none;transition:.25s ease}nav a:hover,nav li.selected a{border-color:rgba(0,0,0,.2)}nav a:active{border-color:rgba(0,0,0,.56)}caption{padding:.8rem 0}thead th{background:#efefef;color:#444}tr{background:#fff;margin-bottom:.8rem}td,th{border:.1rem solid #ccc;padding:.8rem 1.6rem;text-align:center;vertical-align:inherit}tfoot tr{background:none}tfoot td{color:#efefef;font-size:.8rem;font-style:italic;padding:1.6rem .4rem}@media screen{[hidden~=screen]{display:inherit}[hidden~=screen]:not(:active):not(:focus):not(:target){clip:rect(0)!important;position:absolute!important}}@media screen and max-width 40rem{article,aside,section{clear:both;display:block;max-width:100%}img{margin-right:1.6rem}}:root{--blue-link:#1271db;--link-shadow:1px 1px 1px #000;--white-link-shadow:1px 1px 1px #fff;--shadow:2px 2px 2px #000;--title-overlay:rgba(0,0,0,0.45);--title-overlay-fallback:#000;--text-color:#fff;--normal-padding:0.25em 0.125em;--link-hover-color:#7d12db;--edit-link-hover-color:#db7d12;--edit-link-color:#12db18;--radius:5px}.media[hidden],[hidden=hidden],template{display:none}body{margin:.5em}button{background:#fff;background:linear-gradient(#ddd,#eee,#fff,#eee,#ddd);border-radius:.5em;margin:0;text-transform:none}button,button:hover{border-color:#555;color:#555}button:hover{background:#bbb;background:linear-gradient(#cfcfcf,#dfdfdf,#efefef,#dfdfdf,#cfcfcf)}button:active{background:#ddd;background:linear-gradient(#ddd,#ddd)}.media:hover button{background:linear-gradient(#bbb,#ccc,#ddd,#ccc,#bbb)}.media:hover button:hover{background:linear-gradient(#afafaf,#bfbfbf,#cfcfcf,#bfbfbf,#afafaf)}table{box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin:0 auto}td{padding:1rem}thead td,thead th{padding:.5rem}input[type=number]{min-width:0;width:4.5em}input[type=checkbox],input[type=radio]{min-width:auto;vertical-align:inherit}input,textarea{min-width:30em;min-width:30rem}tbody>tr:nth-child(odd){background:#ddd}a:active,a:hover{color:#7d12db;color:var(--link-hover-color)}iframe{display:block;margin:0 auto}.bracketed{color:#12db18;color:var(--edit-link-color)}#main-nav a,.bracketed{text-shadow:1px 1px 1px #000;text-shadow:var(--link-shadow)}.bracketed:before{content:"[\00a0"}.bracketed:after{content:"\00a0]"}.bracketed:active,.bracketed:hover{color:#db7d12;color:var(--edit-link-hover-color)}.grow-1{flex-grow:1}.flex-wrap{flex-wrap:wrap}.flex-no-wrap{flex-wrap:nowrap}.flex-align-start{align-content:flex-start}.flex-align-end{align-items:flex-end}.flex-align-space-around{align-content:space-around}.flex-justify-start{justify-content:flex-start}.flex-justify-space-around{justify-content:space-around}.flex-center{justify-content:center}.flex-self-center{align-self:center}.flex-space-evenly{justify-content:space-evenly}.flex{display:inline-block;display:flex}.small-font{font-size:1.6rem}.justify{text-align:justify}.align-center{text-align:center!important}.align-left{text-align:left!important}.align-right{text-align:right!important}.valign-top{vertical-align:top}.no-border{border:none}.media-wrap{text-align:center;margin:0 auto;position:relative}.media-wrap-flex{display:inline-block;display:flex;flex-wrap:wrap;align-content:space-evenly;justify-content:space-between;position:relative}td .media-wrap-flex{justify-content:center}.danger{background-color:#ff4136;border-color:#924949;color:#924949}.danger:active,.danger:hover{background-color:#924949;border-color:#ff4136;color:#ff4136}td.danger,td.danger:active,td.danger:hover{background-color:transparent;color:#924949}.user-btn{background:transparent;border-color:#12db18;border-color:var(--edit-link-color);color:#12db18;color:var(--edit-link-color);text-shadow:1px 1px 1px #000;text-shadow:var(--link-shadow);padding:0 .5rem}.user-btn:active,.user-btn:hover{background:transparent;border-color:#db7d12;border-color:var(--edit-link-hover-color);color:#db7d12;color:var(--edit-link-hover-color)}.user-btn:active{background:#db7d12;background:var(--edit-link-hover-color);color:#fff}.full-width{width:100%}.full-height{max-height:none}.toph{margin-top:0}#main-nav{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);margin:2rem 0 1.6rem;border-bottom:.1rem solid rgba(0,0,0,.2);font-size:3.6em;font-size:3.6rem;font-style:normal;font-weight:500}.sorting,.sorting-asc,.sorting-desc{vertical-align:text-bottom}.sorting:before{content:" ↕\00a0"}.sorting-asc:before{content:" ↑\00a0"}.sorting-desc:before{content:" ↓\00a0"}.form thead th,.form thead tr{background:inherit;border:0}.form tr>td:nth-child(odd){text-align:right;min-width:25px;max-width:30%}.form tr>td:nth-child(2n){text-align:left}.invisible tbody>tr:nth-child(odd){background:inherit}.borderless,.borderless td,.borderless th,.borderless tr,.invisible td,.invisible th,.invisible tr{box-shadow:none;border:0}.message,.static-message{position:relative;margin:.5em auto;padding:.5em;width:95%}.message .close{width:1em;height:1em;position:absolute;right:.5em;top:.5em;text-align:center;vertical-align:middle;line-height:1em}.message:hover .close:after{content:"☒"}.message:hover{cursor:pointer}.message .icon{left:.5em;top:.5em;margin-right:1em}.message.error,.static-message.error{border:1px solid #924949;background:#f3e6e6}.message.error .icon:after{content:"✘"}.message.success,.static-message.success{border:1px solid #1f8454;background:#70dda9}.message.success .icon:after{content:"✔"}.message.info,.static-message.info{border:1px solid #bfbe3a;background:#ffc}.message.info .icon:after{content:"⚠"}.character,.media,.small-character{position:relative;vertical-align:top;display:inline-block;text-align:center;width:220px;height:312px;margin:.25em .125em;margin:var(--normal-padding);z-index:0;background:rgba(0,0,0,.15)}.details picture.cover,picture.cover{display:inline;display:initial;width:100%}.character>img,.media>img,.small-character>img{width:100%}.media .edit-buttons>button{margin:.5em auto}.media-metadata>div,.medium-metadata>div,.name,.row{text-shadow:2px 2px 2px #000;text-shadow:var(--shadow);color:#fff;color:var(--text-color);padding:.25em .125em;padding:var(--normal-padding);text-align:right;z-index:2}.age-rating,.media-type{text-align:left}.media>.media-metadata{position:absolute;bottom:0;right:0}.media>.medium-metadata{position:absolute;bottom:0;left:0}.media>.name{position:absolute;top:0}.media>.name a{display:inline-block;transition:none}.media .name a:before{content:"";display:block;height:312px;left:0;position:absolute;top:0;width:220px;z-index:-1}.media-list .media:hover .name a:before{background:rgba(0,0,0,.75)}.media>.name span.canonical{font-weight:700}.media>.name small{font-weight:400}.media:hover .name{background:rgba(0,0,0,.75)}.media-list .media>.name a:hover,.media-list .media>.name a:hover small{color:#1271db;color:var(--blue-link)}.media:hover>.edit-buttons[hidden],.media:hover>button[hidden]{transition:.25s ease;display:block}.media:hover{transition:.25s ease}.character>.name a,.character>.name a small,.media>.name a,.media>.name a small,.small-character>.name a,.small-character>.name a small{background:none;color:#fff;text-shadow:2px 2px 2px #000;text-shadow:var(--shadow)}.anime .name,.manga .name{background:#000;background:var(--title-overlay-fallback);background:rgba(0,0,0,.45);background:var(--title-overlay);text-align:center;width:100%;padding:.5em .25em}.anime .age-rating,.anime .airing-status,.anime .completion,.anime .delete,.anime .edit,.anime .media-type,.anime .user-rating{background:none;text-align:center}.anime .table,.manga .table{position:absolute;bottom:0;left:0;width:100%}.anime .row,.manga .row{width:100%;display:inline-block;display:flex;align-content:space-around;justify-content:space-around;text-align:center;padding:0 inherit}.anime .row>span,.manga .row>span{text-align:left;z-index:2}.anime .row>div,.manga .row>div{font-size:.8em;display:inline-block;display:flex-item;align-self:center;text-align:center;vertical-align:middle;z-index:2}.anime .media>button.plus-one{border-color:hsla(0,0%,100%,.65);position:absolute;top:138px;top:calc(50% - 21.2px);left:44px;left:calc(50% - 57.8px);z-index:50}.manga .row{padding:1px}.manga .media{height:310px;margin:.25em}.manga .media>.edit-buttons{position:absolute;top:86px;top:calc(50% - 21.2px);left:43.5px;left:calc(50% - 57.8px);z-index:40}.manga .media>.edit-buttons button{border-color:hsla(0,0%,100%,.65)}.media.search>.name{background-color:#555;background-color:rgba(0,0,0,.35);background-size:cover;background-size:contain;background-repeat:no-repeat}.media.search>.row{z-index:6}.big-check,.mal-check{display:none}.big-check:checked+label{transition:.25s ease;background:rgba(0,0,0,.75)}.big-check:checked+label:after{content:"✓";font-size:15em;font-size:15rem;text-align:center;color:#adff2f;position:absolute;top:147px;left:0;width:100%;z-index:5}#series-list article.media{position:relative}#series-list .name,#series-list .name label{position:absolute;display:block;top:0;left:0;height:100%;width:100%;vertical-align:middle;line-height:1.25em}#series-list .name small{color:#fff}.details{margin:1.5rem auto 0;padding:1rem;font-size:inherit}.fixed{max-width:115em;max-width:115rem;margin:0 auto}.details .cover{display:block}.details .flex>*{margin:1rem}.details .media-details td{padding:0 1.5rem}.details p{text-align:justify}.details .media-details td:nth-child(odd){width:1%;white-space:nowrap;text-align:right}.details .media-details td:nth-child(2n){text-align:left}.details a h1,.details a h2{margin-top:0}.character,.person,.small-character{width:225px;height:350px;vertical-align:middle;white-space:nowrap;position:relative}.person{width:225px;height:338px}.small-person{width:200px;height:300px}.character a{height:350px}.character:hover .name,.small-character:hover .name{background:rgba(0,0,0,.8)}.small-character a{display:inline-block;width:100%;height:100%}.character .name,.small-character .name{position:absolute;bottom:0;left:0;z-index:10}.character img,.character picture,.person img,.person picture,.small-character img,.small-character picture{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5;max-height:350px;max-width:225px}.person img,.person picture{max-height:338px}.small-person img,.small-person picture{max-height:300px;max-width:200px}.min-table{min-width:0;margin-left:0}.max-table{min-width:100%;margin:0}aside.info{max-width:33%}.fixed aside{max-width:390px}aside img,aside picture{display:block;margin:0 auto}.small-character{width:160px;height:250px}.small-character img,.small-character picture{max-height:250px;max-width:160px}.user-page .media-wrap{text-align:left}.media a{display:inline-block;width:100%;height:100%}.streaming-logo{width:50px;height:50px;vertical-align:middle}.cover-streaming-link{display:none}.media:hover .cover-streaming-link{display:block}.cover-streaming-link .streaming-logo{width:20px;height:20px;-webkit-filter:drop-shadow(0 -1px 4px #fff);filter:drop-shadow(0 -1px 4px #fff)}.settings.form .content article{margin:1em;display:inline-block;width:auto}.responsive-iframe{margin-top:1em;overflow:hidden;padding-bottom:56.25%;position:relative;height:0}.responsive-iframe iframe{left:0;top:0;height:100%;width:100%;position:absolute}.cssload-loader{position:relative;left:calc(50% - 31px);width:62px;height:62px;border-radius:50%;perspective:780px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:50%}.cssload-inner.cssload-one{left:0;top:0;-webkit-animation:cssload-rotate-one 1.15s linear infinite;animation:cssload-rotate-one 1.15s linear infinite;border-bottom:3px solid #000}.cssload-inner.cssload-two{right:0;top:0;-webkit-animation:cssload-rotate-two 1.15s linear infinite;animation:cssload-rotate-two 1.15s linear infinite;border-right:3px solid #000}.cssload-inner.cssload-three{right:0;bottom:0;-webkit-animation:cssload-rotate-three 1.15s linear infinite;animation:cssload-rotate-three 1.15s linear infinite;border-top:3px solid #000}@-webkit-keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@-webkit-keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@-webkit-keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}#loading-shadow{background:rgba(0,0,0,.8);z-index:500}#loading-shadow,#loading-shadow .loading-wrapper{position:fixed;top:0;left:0;width:100%;height:100%}#loading-shadow .loading-wrapper{z-index:501;display:flex;align-items:center;justify-content:center}#loading-shadow .loading-content{position:relative;color:#fff}.loading-content .cssload-inner.cssload-one,.loading-content .cssload-inner.cssload-three,.loading-content .cssload-inner.cssload-two{border-color:#fff}.tabs{display:inline-block;display:flex;flex-wrap:wrap;background:#efefef;box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin-top:1.5em}.tabs>label{border:1px solid #e5e5e5;width:100%;padding:20px 30px;background:#e5e5e5;cursor:pointer;font-weight:700;font-size:18px;color:#7f7f7f;transition:background .1s,color .1s}.tabs>label:hover{background:#d8d8d8}.tabs>label:active{background:#ccc}.tabs>[type=radio]:focus+label{box-shadow:inset 0 0 0 3px #2aa1c0;z-index:1}.tabs>[type=radio]{position:absolute;opacity:0}.tabs>[type=radio]:checked+label{border-bottom:1px solid #fff;background:#fff;color:#000}.tabs>[type=radio]:checked+label+.content{display:block}.tabs .content,.tabs>[type=radio]:checked+label+.content{border:1px solid #e5e5e5;border-top:0;padding:15px;background:#fff;width:100%;margin:0 auto;overflow:auto}.tabs .content{display:none;max-height:950px}.tabs .content.full-height{max-height:none}@media (min-width:800px){.tabs>label{width:auto}.tabs .content{order:99}}.vertical-tabs{border:1px solid #e5e5e5;box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin:0 auto;position:relative;width:100%}.vertical-tabs input[type=radio]{position:absolute;opacity:0}.vertical-tabs .tab{align-items:center;display:inline-block;display:flex;flex-wrap:nowrap}.vertical-tabs .tab label{align-items:center;background:#e5e5e5;border:1px solid #e5e5e5;color:#7f7f7f;cursor:pointer;font-size:18px;font-weight:700;padding:0 20px;width:28%}.vertical-tabs .tab label:hover{background:#d8d8d8}.vertical-tabs .tab label:active{background:#ccc}.vertical-tabs .tab .content{display:none;border:1px solid #e5e5e5;border-left:0;border-right:0;max-height:950px;overflow:auto}.vertical-tabs .tab .content.full-height{max-height:none}.vertical-tabs [type=radio]:checked+label{border:0;background:#fff;color:#000;width:38%}.vertical-tabs [type=radio]:focus+label{box-shadow:inset 0 0 0 3px #2aa1c0;z-index:1}.vertical-tabs [type=radio]:checked~.content{display:block}@media screen and (max-width:1100px){.flex{flex-wrap:wrap}.fixed aside.info,.fixed aside.info+article,aside.info,aside.info+article{max-width:none;width:100%}}@media screen and (max-width:800px){*{max-width:none}table{box-shadow:none}.details .flex>*,body{margin:0}table,table.align-center,table .align-right,table td,table th{border:0;margin-left:auto;margin-right:auto;text-align:left;width:100%}table td{display:inline-block}table.media-details,table tbody{width:100%}table.media-details td{display:block;text-align:left!important;width:100%}table thead{display:none}.details .media-details td:nth-child(odd){font-weight:700;width:100%}table.streaming-links tr td:not(:first-child){display:none}}@media screen and (max-width:40em){nav a{line-height:4em;line-height:4rem}img,picture{width:100%}main{padding:0 .5rem .5rem}.media{margin:2px 0}.details{padding:.5rem}.tabs>[type=radio]:checked+label{background:#fff}.vertical-tabs .tab{flex-wrap:wrap}.tabs .content,.tabs>[type=radio]:checked+label+.content,.vertical-tabs .tab .content{display:block;border:0;max-height:none}.tabs>[type=radio]:checked+label,.tabs>label,.tabs>label:active,.tabs>label:hover,.vertical-tabs .tab label,.vertical-tabs .tab label:active,.vertical-tabs .tab label:hover,.vertical-tabs [type=radio]:checked+label,.vertical-tabs [type=radio]:focus+label{background:#fff;border:0;width:100%;cursor:default;color:#000}} \ No newline at end of file diff --git a/public/css/dark-auto.min.css b/public/css/dark-auto.min.css deleted file mode 100644 index 48babca1..00000000 --- a/public/css/dark-auto.min.css +++ /dev/null @@ -1 +0,0 @@ -:root{--default-font-list:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;--monospace-font-list:"Anonymous Pro","Fira Code",Menlo,Monaco,Consolas,"Courier New",monospace;--serif-font-list:Georgia,Times,"Times New Roman",serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;cursor:default;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);line-height:1.4;overflow-y:scroll;-moz-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}audio:not([controls]){display:none}details{display:block}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}main{margin:0 auto;padding:0 1.6rem 1.6rem}main,pre,summary{display:block}pre{background:#efefef;color:#444;font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list);font-size:1.4em;font-size:1.4rem;margin:1.6rem 0;overflow:auto;padding:1.6rem;word-break:break-all;word-wrap:break-word}progress{display:inline-block}small{color:#777;font-size:75%}big{font-size:125%}template{display:none}textarea{border:.1rem solid #ccc;border-radius:0;display:block;margin-bottom:.8rem;overflow:auto;padding:.8rem;resize:vertical;vertical-align:middle}[hidden]{display:none}[unselectable]{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}*,:after,:before{box-sizing:inherit}*{font-size:inherit;line-height:inherit;margin:0;padding:0}:after,:before{text-decoration:inherit;vertical-align:inherit}a{-webkit-transition:.25s ease;color:#1271db;text-decoration:none;transition:.25s ease}audio,canvas,iframe,img,svg,video{vertical-align:middle}input,textarea{border:.1rem solid #ccc;color:inherit;font-family:inherit;font-style:inherit;font-weight:inherit;min-height:1.4em}code,kbd,pre,samp{font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list)}table{border-collapse:collapse;border-spacing:0;margin-bottom:1.6rem}::-moz-selection{background-color:#b3d4fc;text-shadow:none}::selection{background-color:#b3d4fc;text-shadow:none}button::-moz-focus-inner{border:0}body{color:#444;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);font-size:1.6rem;font-style:normal;font-weight:400;padding:0}p{margin:0 0 1.6rem}h1,h2,h3,h4,h5,h6{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);margin:2rem 0 1.6rem}h1{border-bottom:.1rem solid rgba(0,0,0,.2);font-size:3.6em;font-size:3.6rem}h1,h2{font-style:normal;font-weight:500}h2{font-size:3em;font-size:3rem}h3{font-size:2.4em;font-size:2.4rem;font-style:normal;font-weight:500;margin:1.6rem 0 .4rem}h4{font-size:1.8em;font-size:1.8rem}h4,h5{font-style:normal;font-weight:600;margin:1.6rem 0 .4rem}h5{font-size:1.6em;font-size:1.6rem}h6{color:#777;font-size:1.4em;font-style:normal;font-weight:600;margin:1.6rem 0 .4rem}code,h6{font-size:1.4rem}code{background:#efefef;color:#444;font-family:Anonymous Pro,Fira Code,Menlo,Monaco,Consolas,Courier New,monospace;font-family:var(--monospace-font-list);word-break:break-all;word-wrap:break-word}a:focus,a:hover{text-decoration:none}dl{margin-bottom:1.6rem}dd{margin-left:4rem}ol,ul{margin-bottom:.8rem;padding-left:2rem}blockquote{border-left:.2rem solid #1271db;font-style:italic;margin:1.6rem 0;padding-left:1.6rem}blockquote,figcaption{font-family:Georgia,Times,Times New Roman,serif;font-family:var(--serif-font-list)}html{font-size:62.5%}article,aside,details,footer,header,main,section,summary{display:block;height:auto;margin:0 auto;width:100%}footer{clear:both;display:inline-block;float:left;max-width:100%;padding:1rem 0;text-align:center}footer,hr{border-top:.1rem solid rgba(0,0,0,.2)}hr{display:block;margin-bottom:1.6rem;width:100%}img{height:auto;vertical-align:baseline}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{border:.1rem solid #ccc;border-radius:0;display:inline-block;padding:.8rem;vertical-align:middle}input:not([type]){-webkit-appearance:none;background-clip:padding-box;background-color:#fff;border:.1rem solid #ccc;border-radius:0;color:#444;display:inline-block;padding:.8rem;text-align:left}input[type=color]{padding:.8rem 1.6rem}input:not([type]):focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,textarea:focus{border-color:#b3d4fc}input[type=checkbox],input[type=radio]{vertical-align:middle}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:.1rem thin solid #444}input:not([type])[disabled],input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled],textarea[disabled]{background-color:#efefef;color:#777;cursor:not-allowed}input[readonly],textarea[readonly]{background-color:#efefef;border-color:#ccc;color:#777}input:focus:invalid,textarea:focus:invalid{border-color:#e9322d;color:#b94a48}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#ff4136}select[multiple]{height:auto}label{line-height:2}fieldset{border:0;margin:0;padding:.8rem 0}legend{border-bottom:.1rem solid #ccc;color:#444;display:block;margin-bottom:.8rem;padding:.8rem 0;width:100%}button,input[type=submit]{-moz-user-select:none;-ms-user-select:none;-webkit-transition:.25s ease;-webkit-user-drag:none;-webkit-user-select:none;border:.2rem solid #444;border-radius:0;color:#444;cursor:pointer;display:inline-block;margin-bottom:.8rem;margin-right:.4rem;padding:.8rem 1.6rem;text-align:center;text-decoration:none;text-transform:uppercase;transition:.25s ease;user-select:none;vertical-align:baseline}button a,input[type=submit] a{color:#444}button::-moz-focus-inner,input[type=submit]::-moz-focus-inner{padding:0}button:hover,input[type=submit]:hover{background:#444;border-color:#444;color:#fff}button:hover a,input[type=submit]:hover a{color:#fff}button:active,input[type=submit]:active{background:#6a6a6a;border-color:#6a6a6a;color:#fff}button:active a,input[type=submit]:active a{color:#fff}button:disabled,input[type=submit]:disabled{box-shadow:none;cursor:not-allowed;opacity:.4}nav ul{list-style:none;margin:0;padding:0;text-align:center}nav ul li{display:inline}nav a{-webkit-transition:.25s ease;border-bottom:.2rem solid transparent;color:#444;padding:.8rem 1.6rem;text-decoration:none;transition:.25s ease}nav a:hover,nav li.selected a{border-color:rgba(0,0,0,.2)}nav a:active{border-color:rgba(0,0,0,.56)}caption{padding:.8rem 0}thead th{background:#efefef;color:#444}tr{background:#fff;margin-bottom:.8rem}td,th{border:.1rem solid #ccc;padding:.8rem 1.6rem;text-align:center;vertical-align:inherit}tfoot tr{background:none}tfoot td{color:#efefef;font-size:.8rem;font-style:italic;padding:1.6rem .4rem}@media screen{[hidden~=screen]{display:inherit}[hidden~=screen]:not(:active):not(:focus):not(:target){clip:rect(0)!important;position:absolute!important}}@media screen and max-width 40rem{article,aside,section{clear:both;display:block;max-width:100%}img{margin-right:1.6rem}}:root{--blue-link:#1271db;--link-shadow:1px 1px 1px #000;--white-link-shadow:1px 1px 1px #fff;--shadow:2px 2px 2px #000;--title-overlay:rgba(0,0,0,0.45);--title-overlay-fallback:#000;--text-color:#fff;--normal-padding:0.25em 0.125em;--link-hover-color:#7d12db;--edit-link-hover-color:#db7d12;--edit-link-color:#12db18;--radius:5px}.media[hidden],[hidden=hidden],template{display:none}body{margin:.5em}button{background:#fff;background:linear-gradient(#ddd,#eee,#fff,#eee,#ddd);border-radius:.5em;margin:0;text-transform:none}button,button:hover{border-color:#555;color:#555}button:hover{background:#bbb;background:linear-gradient(#cfcfcf,#dfdfdf,#efefef,#dfdfdf,#cfcfcf)}button:active{background:#ddd;background:linear-gradient(#ddd,#ddd)}.media:hover button{background:linear-gradient(#bbb,#ccc,#ddd,#ccc,#bbb)}.media:hover button:hover{background:linear-gradient(#afafaf,#bfbfbf,#cfcfcf,#bfbfbf,#afafaf)}table{box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin:0 auto}td{padding:1rem}thead td,thead th{padding:.5rem}input[type=number]{min-width:0;width:4.5em}input[type=checkbox],input[type=radio]{min-width:auto;vertical-align:inherit}input,textarea{min-width:30em;min-width:30rem}tbody>tr:nth-child(odd){background:#ddd}a:active,a:hover{color:#7d12db;color:var(--link-hover-color)}iframe{display:block;margin:0 auto}.bracketed{color:#12db18;color:var(--edit-link-color)}#main-nav a,.bracketed{text-shadow:1px 1px 1px #000;text-shadow:var(--link-shadow)}.bracketed:before{content:"[\00a0"}.bracketed:after{content:"\00a0]"}.bracketed:active,.bracketed:hover{color:#db7d12;color:var(--edit-link-hover-color)}.grow-1{flex-grow:1}.flex-wrap{flex-wrap:wrap}.flex-no-wrap{flex-wrap:nowrap}.flex-align-start{align-content:flex-start}.flex-align-end{align-items:flex-end}.flex-align-space-around{align-content:space-around}.flex-justify-start{justify-content:flex-start}.flex-justify-space-around{justify-content:space-around}.flex-center{justify-content:center}.flex-self-center{align-self:center}.flex-space-evenly{justify-content:space-evenly}.flex{display:inline-block;display:flex}.small-font{font-size:1.6rem}.justify{text-align:justify}.align-center{text-align:center!important}.align-left{text-align:left!important}.align-right{text-align:right!important}.valign-top{vertical-align:top}.no-border{border:none}.media-wrap{text-align:center;margin:0 auto;position:relative}.media-wrap-flex{display:inline-block;display:flex;flex-wrap:wrap;align-content:space-evenly;justify-content:space-between;position:relative}td .media-wrap-flex{justify-content:center}.danger{background-color:#ff4136;border-color:#924949;color:#924949}.danger:active,.danger:hover{background-color:#924949;border-color:#ff4136;color:#ff4136}td.danger,td.danger:active,td.danger:hover{background-color:transparent;color:#924949}.user-btn{background:transparent;border-color:#12db18;border-color:var(--edit-link-color);color:#12db18;color:var(--edit-link-color);text-shadow:1px 1px 1px #000;text-shadow:var(--link-shadow);padding:0 .5rem}.user-btn:active,.user-btn:hover{background:transparent;border-color:#db7d12;border-color:var(--edit-link-hover-color);color:#db7d12;color:var(--edit-link-hover-color)}.user-btn:active{background:#db7d12;background:var(--edit-link-hover-color);color:#fff}.full-width{width:100%}.full-height{max-height:none}.toph{margin-top:0}#main-nav{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--default-font-list);margin:2rem 0 1.6rem;border-bottom:.1rem solid rgba(0,0,0,.2);font-size:3.6em;font-size:3.6rem;font-style:normal;font-weight:500}.sorting,.sorting-asc,.sorting-desc{vertical-align:text-bottom}.sorting:before{content:" ↕\00a0"}.sorting-asc:before{content:" ↑\00a0"}.sorting-desc:before{content:" ↓\00a0"}.form thead th,.form thead tr{background:inherit;border:0}.form tr>td:nth-child(odd){text-align:right;min-width:25px;max-width:30%}.form tr>td:nth-child(2n){text-align:left}.invisible tbody>tr:nth-child(odd){background:inherit}.borderless,.borderless td,.borderless th,.borderless tr,.invisible td,.invisible th,.invisible tr{box-shadow:none;border:0}.message,.static-message{position:relative;margin:.5em auto;padding:.5em;width:95%}.message .close{width:1em;height:1em;position:absolute;right:.5em;top:.5em;text-align:center;vertical-align:middle;line-height:1em}.message:hover .close:after{content:"☒"}.message:hover{cursor:pointer}.message .icon{left:.5em;top:.5em;margin-right:1em}.message.error,.static-message.error{border:1px solid #924949;background:#f3e6e6}.message.error .icon:after{content:"✘"}.message.success,.static-message.success{border:1px solid #1f8454;background:#70dda9}.message.success .icon:after{content:"✔"}.message.info,.static-message.info{border:1px solid #bfbe3a;background:#ffc}.message.info .icon:after{content:"⚠"}.character,.media,.small-character{position:relative;vertical-align:top;display:inline-block;text-align:center;width:220px;height:312px;margin:.25em .125em;margin:var(--normal-padding);z-index:0;background:rgba(0,0,0,.15)}.details picture.cover,picture.cover{display:inline;display:initial;width:100%}.character>img,.media>img,.small-character>img{width:100%}.media .edit-buttons>button{margin:.5em auto}.media-metadata>div,.medium-metadata>div,.name,.row{text-shadow:2px 2px 2px #000;text-shadow:var(--shadow);color:#fff;color:var(--text-color);padding:.25em .125em;padding:var(--normal-padding);text-align:right;z-index:2}.age-rating,.media-type{text-align:left}.media>.media-metadata{position:absolute;bottom:0;right:0}.media>.medium-metadata{position:absolute;bottom:0;left:0}.media>.name{position:absolute;top:0}.media>.name a{display:inline-block;transition:none}.media .name a:before{content:"";display:block;height:312px;left:0;position:absolute;top:0;width:220px;z-index:-1}.media-list .media:hover .name a:before{background:rgba(0,0,0,.75)}.media>.name span.canonical{font-weight:700}.media>.name small{font-weight:400}.media:hover .name{background:rgba(0,0,0,.75)}.media-list .media>.name a:hover,.media-list .media>.name a:hover small{color:#1271db;color:var(--blue-link)}.media:hover>.edit-buttons[hidden],.media:hover>button[hidden]{transition:.25s ease;display:block}.media:hover{transition:.25s ease}.character>.name a,.character>.name a small,.media>.name a,.media>.name a small,.small-character>.name a,.small-character>.name a small{background:none;color:#fff;text-shadow:2px 2px 2px #000;text-shadow:var(--shadow)}.anime .name,.manga .name{background:#000;background:var(--title-overlay-fallback);background:rgba(0,0,0,.45);background:var(--title-overlay);text-align:center;width:100%;padding:.5em .25em}.anime .age-rating,.anime .airing-status,.anime .completion,.anime .delete,.anime .edit,.anime .media-type,.anime .user-rating{background:none;text-align:center}.anime .table,.manga .table{position:absolute;bottom:0;left:0;width:100%}.anime .row,.manga .row{width:100%;display:inline-block;display:flex;align-content:space-around;justify-content:space-around;text-align:center;padding:0 inherit}.anime .row>span,.manga .row>span{text-align:left;z-index:2}.anime .row>div,.manga .row>div{font-size:.8em;display:inline-block;display:flex-item;align-self:center;text-align:center;vertical-align:middle;z-index:2}.anime .media>button.plus-one{border-color:hsla(0,0%,100%,.65);position:absolute;top:138px;top:calc(50% - 21.2px);left:44px;left:calc(50% - 57.8px);z-index:50}.manga .row{padding:1px}.manga .media{height:310px;margin:.25em}.manga .media>.edit-buttons{position:absolute;top:86px;top:calc(50% - 21.2px);left:43.5px;left:calc(50% - 57.8px);z-index:40}.manga .media>.edit-buttons button{border-color:hsla(0,0%,100%,.65)}.media.search>.name{background-color:#555;background-color:rgba(0,0,0,.35);background-size:cover;background-size:contain;background-repeat:no-repeat}.media.search>.row{z-index:6}.big-check,.mal-check{display:none}.big-check:checked+label{transition:.25s ease;background:rgba(0,0,0,.75)}.big-check:checked+label:after{content:"✓";font-size:15em;font-size:15rem;text-align:center;color:#adff2f;position:absolute;top:147px;left:0;width:100%;z-index:5}#series-list article.media{position:relative}#series-list .name,#series-list .name label{position:absolute;display:block;top:0;left:0;height:100%;width:100%;vertical-align:middle;line-height:1.25em}#series-list .name small{color:#fff}.details{margin:1.5rem auto 0;padding:1rem;font-size:inherit}.fixed{max-width:115em;max-width:115rem;margin:0 auto}.details .cover{display:block}.details .flex>*{margin:1rem}.details .media-details td{padding:0 1.5rem}.details p{text-align:justify}.details .media-details td:nth-child(odd){width:1%;white-space:nowrap;text-align:right}.details .media-details td:nth-child(2n){text-align:left}.details a h1,.details a h2{margin-top:0}.character,.person,.small-character{width:225px;height:350px;vertical-align:middle;white-space:nowrap;position:relative}.person{width:225px;height:338px}.small-person{width:200px;height:300px}.character a{height:350px}.character:hover .name,.small-character:hover .name{background:rgba(0,0,0,.8)}.small-character a{display:inline-block;width:100%;height:100%}.character .name,.small-character .name{position:absolute;bottom:0;left:0;z-index:10}.character img,.character picture,.person img,.person picture,.small-character img,.small-character picture{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5;max-height:350px;max-width:225px}.person img,.person picture{max-height:338px}.small-person img,.small-person picture{max-height:300px;max-width:200px}.min-table{min-width:0;margin-left:0}.max-table{min-width:100%;margin:0}aside.info{max-width:33%}.fixed aside{max-width:390px}aside img,aside picture{display:block;margin:0 auto}.small-character{width:160px;height:250px}.small-character img,.small-character picture{max-height:250px;max-width:160px}.user-page .media-wrap{text-align:left}.media a{display:inline-block;width:100%;height:100%}.streaming-logo{width:50px;height:50px;vertical-align:middle}.cover-streaming-link{display:none}.media:hover .cover-streaming-link{display:block}.cover-streaming-link .streaming-logo{width:20px;height:20px;-webkit-filter:drop-shadow(0 -1px 4px #fff);filter:drop-shadow(0 -1px 4px #fff)}.settings.form .content article{margin:1em;display:inline-block;width:auto}.responsive-iframe{margin-top:1em;overflow:hidden;padding-bottom:56.25%;position:relative;height:0}.responsive-iframe iframe{left:0;top:0;height:100%;width:100%;position:absolute}.cssload-loader{position:relative;left:calc(50% - 31px);width:62px;height:62px;border-radius:50%;perspective:780px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:50%}.cssload-inner.cssload-one{left:0;top:0;-webkit-animation:cssload-rotate-one 1.15s linear infinite;animation:cssload-rotate-one 1.15s linear infinite;border-bottom:3px solid #000}.cssload-inner.cssload-two{right:0;top:0;-webkit-animation:cssload-rotate-two 1.15s linear infinite;animation:cssload-rotate-two 1.15s linear infinite;border-right:3px solid #000}.cssload-inner.cssload-three{right:0;bottom:0;-webkit-animation:cssload-rotate-three 1.15s linear infinite;animation:cssload-rotate-three 1.15s linear infinite;border-top:3px solid #000}@-webkit-keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@-webkit-keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@-webkit-keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}#loading-shadow{background:rgba(0,0,0,.8);z-index:500}#loading-shadow,#loading-shadow .loading-wrapper{position:fixed;top:0;left:0;width:100%;height:100%}#loading-shadow .loading-wrapper{z-index:501;display:flex;align-items:center;justify-content:center}#loading-shadow .loading-content{position:relative;color:#fff}.loading-content .cssload-inner.cssload-one,.loading-content .cssload-inner.cssload-three,.loading-content .cssload-inner.cssload-two{border-color:#fff}.tabs{display:inline-block;display:flex;flex-wrap:wrap;background:#efefef;box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin-top:1.5em}.tabs>label{border:1px solid #e5e5e5;width:100%;padding:20px 30px;background:#e5e5e5;cursor:pointer;font-weight:700;font-size:18px;color:#7f7f7f;transition:background .1s,color .1s}.tabs>label:hover{background:#d8d8d8}.tabs>label:active{background:#ccc}.tabs>[type=radio]:focus+label{box-shadow:inset 0 0 0 3px #2aa1c0;z-index:1}.tabs>[type=radio]{position:absolute;opacity:0}.tabs>[type=radio]:checked+label{border-bottom:1px solid #fff;background:#fff;color:#000}.tabs>[type=radio]:checked+label+.content{display:block}.tabs .content,.tabs>[type=radio]:checked+label+.content{border:1px solid #e5e5e5;border-top:0;padding:15px;background:#fff;width:100%;margin:0 auto;overflow:auto}.tabs .content{display:none;max-height:950px}.tabs .content.full-height{max-height:none}@media (min-width:800px){.tabs>label{width:auto}.tabs .content{order:99}}.vertical-tabs{border:1px solid #e5e5e5;box-shadow:0 48px 80px -32px rgba(0,0,0,.3);margin:0 auto;position:relative;width:100%}.vertical-tabs input[type=radio]{position:absolute;opacity:0}.vertical-tabs .tab{align-items:center;display:inline-block;display:flex;flex-wrap:nowrap}.vertical-tabs .tab label{align-items:center;background:#e5e5e5;border:1px solid #e5e5e5;color:#7f7f7f;cursor:pointer;font-size:18px;font-weight:700;padding:0 20px;width:28%}.vertical-tabs .tab label:hover{background:#d8d8d8}.vertical-tabs .tab label:active{background:#ccc}.vertical-tabs .tab .content{display:none;border:1px solid #e5e5e5;border-left:0;border-right:0;max-height:950px;overflow:auto}.vertical-tabs .tab .content.full-height{max-height:none}.vertical-tabs [type=radio]:checked+label{border:0;background:#fff;color:#000;width:38%}.vertical-tabs [type=radio]:focus+label{box-shadow:inset 0 0 0 3px #2aa1c0;z-index:1}.vertical-tabs [type=radio]:checked~.content{display:block}@media screen and (max-width:1100px){.flex{flex-wrap:wrap}.fixed aside.info,.fixed aside.info+article,aside.info,aside.info+article{max-width:none;width:100%}}@media screen and (max-width:800px){*{max-width:none}table{box-shadow:none}.details .flex>*,body{margin:0}table,table.align-center,table .align-right,table td,table th{border:0;margin-left:auto;margin-right:auto;text-align:left;width:100%}table td{display:inline-block}table.media-details,table tbody{width:100%}table.media-details td{display:block;text-align:left!important;width:100%}table thead{display:none}.details .media-details td:nth-child(odd){font-weight:700;width:100%}table.streaming-links tr td:not(:first-child){display:none}}@media screen and (max-width:40em){nav a{line-height:4em;line-height:4rem}img,picture{width:100%}main{padding:0 .5rem .5rem}.media{margin:2px 0}.details{padding:.5rem}.tabs>[type=radio]:checked+label{background:#fff}.vertical-tabs .tab{flex-wrap:wrap}.tabs .content,.tabs>[type=radio]:checked+label+.content,.vertical-tabs .tab .content{display:block;border:0;max-height:none}.tabs>[type=radio]:checked+label,.tabs>label,.tabs>label:active,.tabs>label:hover,.vertical-tabs .tab label,.vertical-tabs .tab label:active,.vertical-tabs .tab label:hover,.vertical-tabs [type=radio]:checked+label,.vertical-tabs [type=radio]:focus+label{background:#fff;border:0;width:100%;cursor:default;color:#000}} @media (prefers-color-scheme: dark) { a{color:#1978e2;text-shadow:var(--link-shadow)}a:hover{color:#9e34fd}body,legend,nav ul li a{background:#333;color:#eee}nav a:hover,nav li.selected a{border-color:#fff}header button{background:transparent}table{box-shadow:none}td,th{border-color:#111}thead td,thead th{background:#333;color:#eee}tbody>tr:nth-child(2n){background:#555;color:#eee}tbody>tr:nth-child(odd){background:#333}footer,hr,legend{border-color:#ddd}small{color:#fff}input,input[type],select,textarea{border-color:#bbb;color:#bbb;background:#333;padding:.8em}button{background:#444;background:linear-gradient(#666,#555,#444,#555,#666);border-radius:.5em;margin:0;text-transform:none}button,button:hover{border-color:#ddd;color:#ddd}button:hover{background:#222;background:linear-gradient(#444,#333,#222,#333,#444)}button:active{background:#333;background:linear-gradient(#333,#333)}.media:hover button{background:linear-gradient(#666,#555,#444,#555,#666)}.media:hover button:hover{background:linear-gradient(#444,#555,#666,#555,#444)}.message,.static-message{text-shadow:var(--white-link-shadow)}.message.success,.static-message.success{background:#1f8454;border-color:#70dda9}.message.error,.static-message.error{border-color:#f3e6e6;background:#924949}.message.info,.static-message.info{border-color:#ffc;background:#bfbe3a}.invisible tbody>tr:nth-child(2n),.invisible tbody>tr:nth-child(odd),.invisible td,.invisible th,.invisible tr{background:transparent}#main-nav{border-bottom:.1rem solid #ddd}.tabs,.vertical-tabs{background:#333}.tabs>label,.vertical-tabs .tab label{background:#222;border:0;color:#eee}.vertical-tabs .tab label{width:100%}.tabs>label:hover,.vertical-tabs .tab>label:hover{background:#888}.tabs>label:active,.vertical-tabs .tab>label:active{background:#999}.tabs>[type=radio]:checked+label,.tabs>[type=radio]:checked+label+.content,.vertical-tabs [type=radio]:checked+label,.vertical-tabs [type=radio]:checked~.content{border:0;background:#666;color:#eee}.vertical-tabs{background:#222;border:1px solid #444}.vertical-tabs .tab{background:#666;border-bottom:1px solid #444}.streaming-logo{-webkit-filter:drop-shadow(0 0 2px #fff);filter:drop-shadow(0 0 2px #fff)} } \ No newline at end of file diff --git a/public/es/anon.min.js b/public/es/anon.min.js deleted file mode 100644 index 1db3b750..00000000 --- a/public/es/anon.min.js +++ /dev/null @@ -1 +0,0 @@ -const e=(t,n)=>{let o=(t.document||t.ownerDocument).querySelectorAll(n),r=e.length;for(;--r>=0&&o.item(r)!==t;);return r>-1},t={noop:()=>{},$(e,t=null){if("string"!=typeof e)return e;t=null!==t&&1===t.nodeType?t:document;let n=[];return e.match(/^#([\w]+$)/)?n.push(document.getElementById(e.split("#")[1])):n=[].slice.apply(t.querySelectorAll(e)),n},hasElement:e=>t.$(e).length>0,scrollToTop(){t.$("header")[0].scrollIntoView(!0)},hide(e){"string"==typeof e&&(e=t.$(e)),Array.isArray(e)?e.forEach(e=>e.setAttribute("hidden","hidden")):e.setAttribute("hidden","hidden")},show(e){"string"==typeof e&&(e=t.$(e)),Array.isArray(e)?e.forEach(e=>e.removeAttribute("hidden")):e.removeAttribute("hidden")},showMessage(e,n){let o=`
    \n\t\t\t\t\n\t\t\t\t${n}\n\t\t\t\t\n\t\t\t
    `,r=t.$(".message");void 0!==r[0]&&r[0].remove(),t.$("header")[0].insertAdjacentHTML("beforeend",o)},closestParent(t,n){if(void 0!==Element.prototype.closest)return t.closest(n);for(;t!==document.documentElement;){if(e(t,n))return t;t=t.parentElement}return null},url(e){let t="//"+document.location.host;return t+="/"===e.charAt(0)?e:"/"+e,t},throttle(e,t,n){let o=!1;return function(...r){const a=n||this;o||(t.apply(a,r),o=!0,setTimeout((function(){o=!1}),e))}}};function n(e,t,o){t.match(/^([\w\-]+)$/)||t.split(" ").forEach(t=>{n(e,t,o)}),e.addEventListener(t,o,!1)}function o(e){let t=[];return Object.keys(e).forEach(n=>{let o=e[n].toString();n=encodeURIComponent(n),o=encodeURIComponent(o),t.push(`${n}=${o}`)}),t.join("&")}t.on=(e,o,r,a)=>{void 0===a?(a=r,t.$(e).forEach(e=>{n(e,o,a)})):t.$(e).forEach(e=>{!function(e,o,r,a){n(e,r,n=>{t.$(o,e).forEach(e=>{n.target==e&&(a.call(e,n),n.stopPropagation())})})}(e,r,o,a)})},t.ajax=(e,n)=>{const r={data:{},type:"GET",dataType:"",success:t.noop,mimeType:"application/x-www-form-urlencoded",error:t.noop};n={...r,...n};let a=new XMLHttpRequest,s=String(n.type).toUpperCase();"GET"===s&&(e+=e.match(/\?/)?o(n.data):"?"+o(n.data)),a.open(s,e),a.onreadystatechange=()=>{if(4===a.readyState){let e="";e="json"===a.responseType?JSON.parse(a.responseText):a.responseText,a.status>299?n.error.call(null,a.status,e,a.response):n.success.call(null,e,a.status)}},"json"===n.dataType?(n.data=JSON.stringify(n.data),n.mimeType="application/json"):n.data=o(n.data),a.setRequestHeader("Content-Type",n.mimeType),"GET"===s?a.send(null):a.send(n.data)},t.get=(e,n,o=null)=>(null===o&&(o=n,n={}),t.ajax(e,{data:n,success:o})),t.on("header","click",".message",(function(e){t.hide(e.target)})),t.on("form.js-delete","submit",(function(e){!1===confirm("Are you ABSOLUTELY SURE you want to delete this item?")&&(e.preventDefault(),e.stopPropagation())})),t.on(".js-clear-cache","click",(function(){t.get("/cache_purge",()=>{t.showMessage("success","Successfully purged api cache")})})),t.on(".vertical-tabs input","change",(function(e){const t=e.currentTarget.parentElement.getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:t,behavior:"smooth"})})),t.on(".media-filter","input",(function(e){const n=e.target.value,o=new RegExp(n,"i");""!==n?(t.$("article.media").forEach(e=>{const n=t.$(".name a",e)[0],r=String(n.textContent).trim();o.test(r)?t.show(e):t.hide(e)}),t.$("table.media-wrap tbody tr").forEach(e=>{const n=t.$("td.align-left",e)[0],r=t.$("a",n)[0],a=String(r.textContent).trim(),s=String(n.textContent).trim();o.test(a)||o.test(s)?t.show(e):t.hide(e)})):(t.show("article.media"),t.show("table.media-wrap tbody tr"))})),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(e=>{console.log("Service worker registered",e.scope)}).catch(e=>{console.error("Failed to register service worker",e)}); diff --git a/public/es/scripts.min.js b/public/es/scripts.min.js deleted file mode 100644 index 5b4aefcd..00000000 --- a/public/es/scripts.min.js +++ /dev/null @@ -1 +0,0 @@ -const t=(e,a)=>{let n=(e.document||e.ownerDocument).querySelectorAll(a),s=t.length;for(;--s>=0&&n.item(s)!==e;);return s>-1},e={noop:()=>{},$(t,e=null){if("string"!=typeof t)return t;e=null!==e&&1===e.nodeType?e:document;let a=[];return t.match(/^#([\w]+$)/)?a.push(document.getElementById(t.split("#")[1])):a=[].slice.apply(e.querySelectorAll(t)),a},hasElement:t=>e.$(t).length>0,scrollToTop(){e.$("header")[0].scrollIntoView(!0)},hide(t){"string"==typeof t&&(t=e.$(t)),Array.isArray(t)?t.forEach(t=>t.setAttribute("hidden","hidden")):t.setAttribute("hidden","hidden")},show(t){"string"==typeof t&&(t=e.$(t)),Array.isArray(t)?t.forEach(t=>t.removeAttribute("hidden")):t.removeAttribute("hidden")},showMessage(t,a){let n=`
    \n\t\t\t\t\n\t\t\t\t${a}\n\t\t\t\t\n\t\t\t
    `,s=e.$(".message");void 0!==s[0]&&s[0].remove(),e.$("header")[0].insertAdjacentHTML("beforeend",n)},closestParent(e,a){if(void 0!==Element.prototype.closest)return e.closest(a);for(;e!==document.documentElement;){if(t(e,a))return e;e=e.parentElement}return null},url(t){let e="//"+document.location.host;return e+="/"===t.charAt(0)?t:"/"+t,e},throttle(t,e,a){let n=!1;return function(...s){const o=a||this;n||(e.apply(o,s),n=!0,setTimeout((function(){n=!1}),t))}}};function a(t,e,n){e.match(/^([\w\-]+)$/)||e.split(" ").forEach(e=>{a(t,e,n)}),t.addEventListener(e,n,!1)}function n(t){let e=[];return Object.keys(t).forEach(a=>{let n=t[a].toString();a=encodeURIComponent(a),n=encodeURIComponent(n),e.push(`${a}=${n}`)}),e.join("&")}e.on=(t,n,s,o)=>{void 0===o?(o=s,e.$(t).forEach(t=>{a(t,n,o)})):e.$(t).forEach(t=>{!function(t,n,s,o){a(t,s,a=>{e.$(n,t).forEach(t=>{a.target==t&&(o.call(t,a),a.stopPropagation())})})}(t,s,n,o)})},e.ajax=(t,a)=>{const s={data:{},type:"GET",dataType:"",success:e.noop,mimeType:"application/x-www-form-urlencoded",error:e.noop};a={...s,...a};let o=new XMLHttpRequest,r=String(a.type).toUpperCase();"GET"===r&&(t+=t.match(/\?/)?n(a.data):"?"+n(a.data)),o.open(r,t),o.onreadystatechange=()=>{if(4===o.readyState){let t="";t="json"===o.responseType?JSON.parse(o.responseText):o.responseText,o.status>299?a.error.call(null,o.status,t,o.response):a.success.call(null,t,o.status)}},"json"===a.dataType?(a.data=JSON.stringify(a.data),a.mimeType="application/json"):a.data=n(a.data),o.setRequestHeader("Content-Type",a.mimeType),"GET"===r?o.send(null):o.send(a.data)},e.get=(t,a,n=null)=>(null===n&&(n=a,a={}),e.ajax(t,{data:a,success:n})),e.on("header","click",".message",(function(t){e.hide(t.target)})),e.on("form.js-delete","submit",(function(t){!1===confirm("Are you ABSOLUTELY SURE you want to delete this item?")&&(t.preventDefault(),t.stopPropagation())})),e.on(".js-clear-cache","click",(function(){e.get("/cache_purge",()=>{e.showMessage("success","Successfully purged api cache")})})),e.on(".vertical-tabs input","change",(function(t){const e=t.currentTarget.parentElement.getBoundingClientRect().top+window.pageYOffset;window.scrollTo({top:e,behavior:"smooth"})})),e.on(".media-filter","input",(function(t){const a=t.target.value,n=new RegExp(a,"i");""!==a?(e.$("article.media").forEach(t=>{const a=e.$(".name a",t)[0],s=String(a.textContent).trim();n.test(s)?e.show(t):e.hide(t)}),e.$("table.media-wrap tbody tr").forEach(t=>{const a=e.$("td.align-left",t)[0],s=e.$("a",a)[0],o=String(s.textContent).trim(),r=String(a.textContent).trim();n.test(o)||n.test(r)?e.show(t):e.hide(t)})):(e.show("article.media"),e.show("table.media-wrap tbody tr"))})),"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(t=>{console.log("Service worker registered",t.scope)}).catch(t=>{console.error("Failed to register service worker",t)}),e.on("main","change",".big-check",t=>{const e=t.target.id;document.getElementById("mal_"+e).checked=!0});e.hasElement(".anime #search")&&e.on("#search","input",e.throttle(250,t=>{const a=encodeURIComponent(t.target.value);""!==a&&(t=>{e.show(".cssload-loader"),e.get(e.url("/anime-collection/search"),{query:t},(t,a)=>{t=JSON.parse(t),e.hide(".cssload-loader"),e.$("#series-list")[0].innerHTML=function(t){const e=[];return t.forEach(t=>{const a=t.attributes,n=a.titles.reduce((t,e)=>t+(e+"
    "),[]);e.push(`\n\t\t\t\n\t\t`)}),e.join("")}(t.data)})})(a)})),e.on("body.anime.list","click",".plus-one",t=>{let a=e.closestParent(t.target,"article"),n=parseInt(e.$(".completed_number",a)[0].textContent,10)||0,s=parseInt(e.$(".total_number",a)[0].textContent,10),o=e.$(".name a",a)[0].textContent,r={id:a.dataset.kitsuId,mal_id:a.dataset.malId,data:{progress:n+1}};(isNaN(n)||0===n)&&(r.data.status="current"),isNaN(n)||n+1!==s||(r.data.status="completed"),e.show("#loading-shadow"),e.ajax(e.url("/anime/increment"),{data:r,dataType:"json",type:"POST",success:t=>{const s=JSON.parse(t);if(s.errors)return e.hide("#loading-shadow"),e.showMessage("error",`Failed to update ${o}. `),void e.scrollToTop();"completed"===s.data.attributes.status&&e.hide(a),e.hide("#loading-shadow"),e.showMessage("success","Successfully updated "+o),e.$(".completed_number",a)[0].textContent=++n,e.scrollToTop()},error:()=>{e.hide("#loading-shadow"),e.showMessage("error",`Failed to update ${o}. `),e.scrollToTop()}})});e.hasElement(".manga #search")&&e.on("#search","input",e.throttle(250,t=>{let a=encodeURIComponent(t.target.value);""!==a&&(t=>{e.show(".cssload-loader"),e.get(e.url("/manga/search"),{query:t},(t,a)=>{t=JSON.parse(t),e.hide(".cssload-loader"),e.$("#series-list")[0].innerHTML=function(t){const e=[];return t.forEach(t=>{const a=t.attributes,n=a.titles.reduce((t,e)=>t+(e+"
    "),[]);e.push(`\n\t\t\t\n\t\t`)}),e.join("")}(t.data)})})(a)})),e.on(".manga.list","click",".edit-buttons button",t=>{let a=t.target,n=e.closestParent(t.target,"article"),s=a.classList.contains("plus-one-chapter")?"chapter":"volume",o=parseInt(e.$(`.${s}s_read`,n)[0].textContent,10)||0,r=parseInt(e.$(`.${s}_count`,n)[0].textContent,10),i=e.$(".name",n)[0].textContent;isNaN(o)&&(o=0);let l={id:n.dataset.kitsuId,mal_id:n.dataset.malId,data:{progress:o}};(isNaN(o)||0===o)&&(l.data.status="current"),isNaN(o)||o+1!==r||(l.data.status="completed"),l.data.progress=++o,e.show("#loading-shadow"),e.ajax(e.url("/manga/increment"),{data:l,dataType:"json",type:"POST",mimeType:"application/json",success:()=>{"completed"===l.data.status&&e.hide(n),e.hide("#loading-shadow"),e.$(`.${s}s_read`,n)[0].textContent=o,e.showMessage("success","Successfully updated "+i),e.scrollToTop()},error:()=>{e.hide("#loading-shadow"),e.showMessage("error","Failed to update "+i),e.scrollToTop()}})}); From b0a85c0b500f1d03dc2a1a8dc1c5023a34a0801f Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 10 Apr 2020 16:35:01 -0400 Subject: [PATCH 06/27] Add more types --- README.md | 6 +- composer.json | 2 +- src/AnimeClient/API/APIRequestBuilder.php | 10 +-- .../API/Anilist/AnilistRequestBuilder.php | 6 +- .../API/Kitsu/KitsuRequestBuilder.php | 4 +- .../Transformer/AnimeListTransformer.php | 3 +- .../Kitsu/Transformer/AnimeTransformer.php | 3 +- .../Transformer/MangaListTransformer.php | 7 +-- src/AnimeClient/Dispatcher.php | 13 ++-- src/AnimeClient/MenuGenerator.php | 14 ++--- src/AnimeClient/Model/Settings.php | 4 +- src/AnimeClient/RoutingBase.php | 8 +-- src/Ion/ArrayWrapper.php | 38 ------------ src/Ion/Config.php | 6 +- src/Ion/Model.php | 1 - src/Ion/StringWrapper.php | 38 ------------ src/Ion/Transformer/AbstractTransformer.php | 5 -- src/Ion/Type/ArrayType.php | 21 +++++-- src/Ion/Type/StringType.php | 11 ++++ src/Ion/View.php | 5 +- .../AnimeClient/API/APIRequestBuilderTest.php | 4 +- tests/Ion/Di/ContainerAwareTest.php | 2 +- tests/Ion/IonTestCase.php | 3 +- tests/Ion/StringWrapperTest.php | 39 ------------ tests/Ion/Type/ArrayTypeTest.php | 62 +++++++++---------- tests/Ion/Type/StringTypeTest.php | 13 ++-- 26 files changed, 108 insertions(+), 220 deletions(-) delete mode 100644 src/Ion/ArrayWrapper.php delete mode 100644 src/Ion/StringWrapper.php delete mode 100644 tests/Ion/StringWrapperTest.php diff --git a/README.md b/README.md index a43e5faa..4bf489cf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Hummingbird Anime Client -Update your anime/manga list on Kitsu.io and MyAnimeList.net +Update your anime/manga list on Kitsu.io and Anilist -[![Build Status](https://travis-ci.org/timw4mail/HummingBirdAnimeClient.svg?branch=master)](https://travis-ci.org/timw4mail/HummingBirdAnimeClient) +[![Build Status](https://travis-ci.com/timw4mail/HummingBirdAnimeClient.svg?branch=master)](https://travis-ci.com/github/timw4mail/HummingBirdAnimeClient) [![Build Status](https://jenkins.timshomepage.net/buildStatus/icon?job=timw4mail/HummingBirdAnimeClient/develop)](https://jenkins.timshomepage.net/job/timw4mail/HummingBirdAnimeClient/develop) [[Hosted Example](https://list.timshomepage.net)] @@ -31,7 +31,7 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net ### Requirements -* PHP 7.3+ +* PHP 7.4+ * PDO SQLite or PDO PostgreSQL (For collection tab) * GD extension for caching images diff --git a/composer.json b/composer.json index b166b893..875ff6cd 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "laminas/laminas-httphandlerrunner": "^1.0", "maximebf/consolekit": "^1.0", "monolog/monolog": "^2.0.1", - "php": "^7.4 || ^8", + "php": ">=7.4", "psr/container": "~1.0", "psr/http-message": "~1.0", "psr/log": "~1.0", diff --git a/src/AnimeClient/API/APIRequestBuilder.php b/src/AnimeClient/API/APIRequestBuilder.php index 1e145f5d..24ca4df4 100644 --- a/src/AnimeClient/API/APIRequestBuilder.php +++ b/src/AnimeClient/API/APIRequestBuilder.php @@ -38,31 +38,31 @@ abstract class APIRequestBuilder { * Url prefix for making url requests * @var string */ - protected $baseUrl = ''; + protected string $baseUrl = ''; /** * Url path of the request * @var string */ - protected $path = ''; + protected string $path = ''; /** * Query string for the request * @var string */ - protected $query = ''; + protected string $query = ''; /** * Default request headers * @var array */ - protected $defaultHeaders = []; + protected array $defaultHeaders = []; /** * Valid HTTP request methods * @var array */ - protected $validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']; + protected array $validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']; /** * The current request diff --git a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php index 5504c13c..d2398f91 100644 --- a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php +++ b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php @@ -26,20 +26,20 @@ final class AnilistRequestBuilder extends APIRequestBuilder { * The base url for api requests * @var string $base_url */ - protected $baseUrl = 'https://graphql.anilist.co'; + protected string $baseUrl = 'https://graphql.anilist.co'; /** * Valid HTTP request methods * @var array */ - protected $validMethods = ['POST']; + protected array $validMethods = ['POST']; /** * HTTP headers to send with every request * * @var array */ - protected $defaultHeaders = [ + protected array $defaultHeaders = [ 'User-Agent' => USER_AGENT, 'Accept' => 'application/json', 'Content-Type' => 'application/json', diff --git a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php index b933328c..aa105062 100644 --- a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php +++ b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php @@ -25,14 +25,14 @@ final class KitsuRequestBuilder extends APIRequestBuilder { * The base url for api requests * @var string $base_url */ - protected $baseUrl = 'https://kitsu.io/api/edge/'; + protected string $baseUrl = 'https://kitsu.io/api/edge/'; /** * HTTP headers to send with every request * * @var array */ - protected $defaultHeaders = [ + protected array $defaultHeaders = [ 'User-Agent' => USER_AGENT, 'Accept' => 'application/vnd.api+json', 'Content-Type' => 'application/vnd.api+json', diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php index e4942909..5c0d8ff8 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php @@ -22,6 +22,7 @@ use Aviat\AnimeClient\Types\{ AnimeListItem }; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Transformer for anime list @@ -100,7 +101,7 @@ final class AnimeListTransformer extends AbstractTransformer { 'title' => $title, 'titles' => $titles, 'slug' => $anime['slug'], - 'show_type' => (string)$this->string($anime['subtype'])->upperCaseFirst(), + 'show_type' => (string)StringType::from($anime['subtype'])->upperCaseFirst(), 'cover_image' => $anime['posterImage']['small'], 'genres' => $genres, 'streaming_links' => $streamingLinks, diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php index fc93827c..5a339567 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php @@ -19,6 +19,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; use Aviat\AnimeClient\API\{JsonAPI, Kitsu}; use Aviat\AnimeClient\Types\AnimePage; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Transformer for anime description page @@ -114,7 +115,7 @@ final class AnimeTransformer extends AbstractTransformer { 'genres' => $item['genres'], 'id' => $item['id'], 'included' => $item['included'], - 'show_type' => (string)$this->string($item['showType'])->upperCaseFirst(), + 'show_type' => (string)StringType::from($item['showType'])->upperCaseFirst(), 'slug' => $item['slug'], 'staff' => $staff, 'status' => Kitsu::getAiringStatus($item['startDate'], $item['endDate']), diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php index 83cc7d0a..e8b5570f 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php @@ -21,16 +21,13 @@ use Aviat\AnimeClient\Types\{ FormItem, FormItemData, MangaListItem, MangaListItemDetail }; -use Aviat\Ion\StringWrapper; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Data transformation class for zippered Hummingbird manga */ final class MangaListTransformer extends AbstractTransformer { - - use StringWrapper; - /** * Remap zipped anime data to a more logical form * @@ -103,7 +100,7 @@ final class MangaListTransformer extends AbstractTransformer { 'slug' => $manga['slug'], 'title' => $title, 'titles' => $titles, - 'type' => (string)$this->string($manga['subtype'])->upperCaseFirst(), + 'type' => (string)StringType::from($manga['subtype'])->upperCaseFirst(), 'url' => 'https://kitsu.io/manga/' . $manga['slug'], ]), 'reading_status' => $item['attributes']['status'], diff --git a/src/AnimeClient/Dispatcher.php b/src/AnimeClient/Dispatcher.php index 3178744d..f2eda039 100644 --- a/src/AnimeClient/Dispatcher.php +++ b/src/AnimeClient/Dispatcher.php @@ -23,8 +23,7 @@ use Aura\Router\{Matcher, Route, Rule}; use Aviat\AnimeClient\API\FailedResponseException; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Friend; -use Aviat\Ion\StringWrapper; - +use Aviat\Ion\Type\StringType; use LogicException; use ReflectionException; @@ -33,8 +32,6 @@ use ReflectionException; */ final class Dispatcher extends RoutingBase { - use StringWrapper; - /** * The route-matching object * @var object $router @@ -45,19 +42,19 @@ final class Dispatcher extends RoutingBase { * The route matcher * @var Matcher $matcher */ - protected $matcher; + protected Matcher $matcher; /** * Routing array * @var array */ - protected $routes; + protected array $routes; /** * Routes added to router * @var array $outputRoutes */ - protected $outputRoutes; + protected array $outputRoutes; /** * Constructor @@ -254,7 +251,7 @@ final class Dispatcher extends RoutingBase { foreach ($classFiles as $file) { $rawClassName = basename(str_replace('.php', '', $file)); - $path = (string)$this->string($rawClassName)->dasherize(); + $path = (string)StringType::from($rawClassName)->dasherize(); $className = trim($defaultNamespace . '\\' . $rawClassName, '\\'); $controllers[$path] = $className; diff --git a/src/AnimeClient/MenuGenerator.php b/src/AnimeClient/MenuGenerator.php index 3696f230..1839e29c 100644 --- a/src/AnimeClient/MenuGenerator.php +++ b/src/AnimeClient/MenuGenerator.php @@ -16,11 +16,12 @@ namespace Aviat\AnimeClient; -use Aviat\Ion\{ArrayWrapper, StringWrapper}; use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException}; use Aura\Html\HelperLocator; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Exception\ConfigException; +use Aviat\Ion\Type\ArrayType; +use Aviat\Ion\Type\StringType; use Psr\Http\Message\RequestInterface; /** @@ -28,9 +29,6 @@ use Psr\Http\Message\RequestInterface; */ final class MenuGenerator extends UrlGenerator { - use ArrayWrapper; - use StringWrapper; - /** * Html generation helper * @@ -74,8 +72,8 @@ final class MenuGenerator extends UrlGenerator { $parsed[$name] = []; foreach ($menu['items'] as $pathName => $partialPath) { - $title = (string)$this->string($pathName)->humanize()->titleize(); - $parsed[$name][$title] = (string)$this->string($menu['route_prefix'])->append($partialPath); + $title = (string)StringType::from($pathName)->humanize()->titleize(); + $parsed[$name][$title] = (string)StringType::from($menu['route_prefix'])->append($partialPath); } } @@ -95,7 +93,7 @@ final class MenuGenerator extends UrlGenerator { $parsedConfig = $this->parseConfig($menus); // Bail out early on invalid menu - if ( ! $this->arr($parsedConfig)->hasKey($menu)) + if ( ! ArrayType::from($parsedConfig)->hasKey($menu)) { return ''; } @@ -104,7 +102,7 @@ final class MenuGenerator extends UrlGenerator { foreach ($menuConfig as $title => $path) { - $has = $this->string($this->path())->contains($path); + $has = StringType::from($this->path())->contains($path); $selected = ($has && mb_strlen($this->path()) >= mb_strlen($path)); $link = $this->helper->a($this->url($path), $title); diff --git a/src/AnimeClient/Model/Settings.php b/src/AnimeClient/Model/Settings.php index a1beec2c..d9f76ce8 100644 --- a/src/AnimeClient/Model/Settings.php +++ b/src/AnimeClient/Model/Settings.php @@ -25,16 +25,14 @@ use Aviat\AnimeClient\Types\{Config, UndefinedPropertyException}; use Aviat\Ion\ConfigInterface; use Aviat\Ion\Di\ContainerAware; -use Aviat\Ion\StringWrapper; /** * Model for handling settings control panel */ final class Settings { use ContainerAware; - use StringWrapper; - private $config; + private ConfigInterface $config; public function __construct(ConfigInterface $config) { diff --git a/src/AnimeClient/RoutingBase.php b/src/AnimeClient/RoutingBase.php index ea55207e..e8a17290 100644 --- a/src/AnimeClient/RoutingBase.php +++ b/src/AnimeClient/RoutingBase.php @@ -21,7 +21,7 @@ use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Di\Exception\ContainerException; use Aviat\Ion\Di\Exception\NotFoundException; use Aviat\Ion\Exception\ConfigException; -use Aviat\Ion\StringWrapper; +use Aviat\Ion\Type\StringType; use Psr\Http\Message\ServerRequestInterface; /** @@ -29,13 +29,11 @@ use Psr\Http\Message\ServerRequestInterface; */ class RoutingBase { - use StringWrapper; - /** * Injection Container * @var ContainerInterface $container */ - protected $container; + protected ContainerInterface $container; /** * Config Object @@ -73,7 +71,7 @@ class RoutingBase { public function path(): string { $path = $this->request->getUri()->getPath(); - $cleanedPath = $this->string($path) + $cleanedPath = StringType::from($path) ->replace('%20', '') ->trim() ->trimRight('/') diff --git a/src/Ion/ArrayWrapper.php b/src/Ion/ArrayWrapper.php deleted file mode 100644 index 86288895..00000000 --- a/src/Ion/ArrayWrapper.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion; - -use Aviat\Ion\Type\ArrayType; - -/** - * Wrapper to shortcut creating ArrayType objects - */ -trait ArrayWrapper { - - /** - * Convenience method for wrapping an array - * with the array type class - * - * @param array $arr - * @return ArrayType - */ - public function arr(array $arr): ArrayType - { - return new ArrayType($arr); - } -} -// End of ArrayWrapper.php \ No newline at end of file diff --git a/src/Ion/Config.php b/src/Ion/Config.php index 0efa4cf1..7e2f6b8e 100644 --- a/src/Ion/Config.php +++ b/src/Ion/Config.php @@ -25,14 +25,12 @@ use InvalidArgumentException; */ class Config implements ConfigInterface { - use ArrayWrapper; - /** * Config object * * @var ArrayType */ - protected $map; + protected ArrayType $map; /** * Constructor @@ -41,7 +39,7 @@ class Config implements ConfigInterface { */ public function __construct(array $configArray = []) { - $this->map = $this->arr($configArray); + $this->map = ArrayType::from($configArray); } /** diff --git a/src/Ion/Model.php b/src/Ion/Model.php index 7ae03591..ab586b88 100644 --- a/src/Ion/Model.php +++ b/src/Ion/Model.php @@ -20,6 +20,5 @@ namespace Aviat\Ion; * Common base for all Models */ class Model { - use StringWrapper; } // End of Model.php diff --git a/src/Ion/StringWrapper.php b/src/Ion/StringWrapper.php deleted file mode 100644 index 092c5666..00000000 --- a/src/Ion/StringWrapper.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion; - -use Aviat\Ion\Type\StringType; - -/** - * Trait to add convenience method for creating StringType objects - */ -trait StringWrapper { - - /** - * Wrap the String in the Stringy class - * - * @param string $str - * @throws \InvalidArgumentException - * @return StringType - */ - public function string($str): StringType - { - return StringType::create($str); - } -} -// End of StringWrapper.php \ No newline at end of file diff --git a/src/Ion/Transformer/AbstractTransformer.php b/src/Ion/Transformer/AbstractTransformer.php index ea331b56..19076914 100644 --- a/src/Ion/Transformer/AbstractTransformer.php +++ b/src/Ion/Transformer/AbstractTransformer.php @@ -16,17 +16,12 @@ namespace Aviat\Ion\Transformer; -use Aviat\Ion\StringWrapper; - use BadMethodCallException; /** * Base class for data transformation */ abstract class AbstractTransformer implements TransformerInterface { - - use StringWrapper; - /** * Mutate the data structure * diff --git a/src/Ion/Type/ArrayType.php b/src/Ion/Type/ArrayType.php index bab03c61..21bc849c 100644 --- a/src/Ion/Type/ArrayType.php +++ b/src/Ion/Type/ArrayType.php @@ -32,14 +32,14 @@ class ArrayType { * * @var array */ - protected $arr; + protected array $arr; /** * Map generated methods to their native implementations * * @var array */ - protected $nativeMethods = [ + protected array $nativeMethods = [ 'chunk' => 'array_chunk', 'diff' => 'array_diff', 'filter' => 'array_filter', @@ -64,7 +64,7 @@ class ArrayType { * * @var array */ - protected $nativeInPlaceMethods = [ + protected array $nativeInPlaceMethods = [ 'shuffle' => 'shuffle', 'shift' => 'array_shift', 'unshift' => 'array_unshift', @@ -72,12 +72,23 @@ class ArrayType { 'pop' => 'array_pop', ]; + /** + * Create an ArrayType wrapper class from an array + * + * @param array $arr + * @return ArrayType + */ + public static function from(array $arr): ArrayType + { + return new ArrayType($arr); + } + /** * Create an ArrayType wrapper class * * @param array $arr */ - public function __construct(array &$arr) + private function __construct(array &$arr) { $this->arr =& $arr; } @@ -227,7 +238,7 @@ class ArrayType { /** * Return a reference to the value of an arbitrary key on the array * - * @example $arr = new ArrayType([0 => ['data' => ['foo' => 'bar']]]); + * @example $arr = ArrayType::from([0 => ['data' => ['foo' => 'bar']]]); * $val = $arr->getDeepKey([0, 'data', 'foo']); * // returns 'bar' * @param array $key An array of keys of the array diff --git a/src/Ion/Type/StringType.php b/src/Ion/Type/StringType.php index a7ade2d4..9e280cd3 100644 --- a/src/Ion/Type/StringType.php +++ b/src/Ion/Type/StringType.php @@ -23,6 +23,17 @@ use Stringy\Stringy; */ class StringType extends Stringy { + /** + * Alias for `create` static constructor + * + * @param string $str + * @return $this + */ + public static function from(string $str): self + { + return self::create($str); + } + /** * See if two strings match, despite being delimited differently, * such as camelCase, PascalCase, kebab-case, or snake_case. diff --git a/src/Ion/View.php b/src/Ion/View.php index f98c16ce..796f0663 100644 --- a/src/Ion/View.php +++ b/src/Ion/View.php @@ -29,14 +29,13 @@ abstract class View implements ViewInterface { use Di\ContainerAware; - use StringWrapper; /** * HTTP response Object * * @var ResponseInterface */ - public $response; + public ResponseInterface $response; /** * If the view has sent output via @@ -44,7 +43,7 @@ abstract class View * * @var boolean */ - protected $hasRendered = FALSE; + protected bool $hasRendered = FALSE; /** * Constructor diff --git a/tests/AnimeClient/API/APIRequestBuilderTest.php b/tests/AnimeClient/API/APIRequestBuilderTest.php index a73dff08..a271f236 100644 --- a/tests/AnimeClient/API/APIRequestBuilderTest.php +++ b/tests/AnimeClient/API/APIRequestBuilderTest.php @@ -30,9 +30,9 @@ class APIRequestBuilderTest extends TestCase { public function setUp(): void { $this->builder = new class extends APIRequestBuilder { - protected $baseUrl = 'https://httpbin.org/'; + protected string $baseUrl = 'https://httpbin.org/'; - protected $defaultHeaders = ['User-Agent' => "Tim's Anime Client Testsuite / 4.0"]; + protected array $defaultHeaders = ['User-Agent' => "Tim's Anime Client Testsuite / 4.0"]; }; $this->builder->setLogger(new NullLogger); diff --git a/tests/Ion/Di/ContainerAwareTest.php b/tests/Ion/Di/ContainerAwareTest.php index a8d752f4..ad51de10 100644 --- a/tests/Ion/Di/ContainerAwareTest.php +++ b/tests/Ion/Di/ContainerAwareTest.php @@ -31,7 +31,7 @@ class Aware { class ContainerAwareTest extends IonTestCase { - protected $aware; + protected Aware $aware; public function setUp(): void { diff --git a/tests/Ion/IonTestCase.php b/tests/Ion/IonTestCase.php index 6d30b374..e05fd553 100644 --- a/tests/Ion/IonTestCase.php +++ b/tests/Ion/IonTestCase.php @@ -18,6 +18,7 @@ namespace Aviat\Ion\Tests; use function Aviat\Ion\_dir; +use Aviat\Ion\Di\ContainerInterface; use PHPUnit\Framework\TestCase; use Laminas\Diactoros\ServerRequestFactory; @@ -31,7 +32,7 @@ class IonTestCase extends TestCase { public const TEST_DATA_DIR = __DIR__ . '/test_data'; public const TEST_VIEW_DIR = __DIR__ . '/test_views'; - protected $container; + protected ContainerInterface $container; protected static $staticContainer; protected static $session_handler; diff --git a/tests/Ion/StringWrapperTest.php b/tests/Ion/StringWrapperTest.php deleted file mode 100644 index fd9743ec..00000000 --- a/tests/Ion/StringWrapperTest.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion\Tests; - -use Aviat\Ion\StringWrapper; -use Aviat\Ion\Type\StringType; -use PHPUnit\Framework\TestCase; - -class StringWrapperTest extends TestCase { - - protected $wrapper; - - public function setUp(): void { - $this->wrapper = new class { - use StringWrapper; - }; - } - - public function testString() - { - $str = $this->wrapper->string('foo'); - $this->assertInstanceOf(StringType::class, $str); - } - -} \ No newline at end of file diff --git a/tests/Ion/Type/ArrayTypeTest.php b/tests/Ion/Type/ArrayTypeTest.php index e91dd6cb..7c127e34 100644 --- a/tests/Ion/Type/ArrayTypeTest.php +++ b/tests/Ion/Type/ArrayTypeTest.php @@ -16,16 +16,10 @@ namespace Aviat\Ion\Tests\Type; -use Aviat\Ion\ArrayWrapper; +use Aviat\Ion\Type\ArrayType; use Aviat\Ion\Tests\IonTestCase; class ArrayTypeTest extends IonTestCase { - use ArrayWrapper; - - public function setUp(): void { - parent::setUp(); - } - public function dataCall() { $method_map = [ @@ -88,33 +82,37 @@ class ArrayTypeTest extends IonTestCase { * Test the array methods defined for the __Call method * * @dataProvider dataCall + * @param string $method + * @param array $array + * @param array $args + * @param $expected */ - public function testCall($method, $array, $args, $expected) + public function testCall(string $method, array $array, array $args, $expected): void { - $obj = $this->arr($array); + $obj = ArrayType::from($array); $actual = $obj->__call($method, $args); $this->assertEquals($expected, $actual); } - public function testSet() + public function testSet(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $arraytype = $obj->set('foo', 'bar'); - $this->assertInstanceOf('Aviat\Ion\Type\ArrayType', $arraytype); + $this->assertInstanceOf(ArrayType::class, $arraytype); $this->assertEquals('bar', $obj->get('foo')); } - public function testGet() + public function testGet(): void { $array = [1, 2, 3, 4, 5]; - $obj = $this->arr($array); + $obj = ArrayType::from($array); $this->assertEquals($array, $obj->get()); $this->assertEquals(1, $obj->get(0)); $this->assertEquals(5, $obj->get(4)); } - public function testGetDeepKey() + public function testGetDeepKey(): void { $arr = [ 'foo' => 'bar', @@ -122,14 +120,14 @@ class ArrayTypeTest extends IonTestCase { 'bar' => 'foobar' ] ]; - $obj = $this->arr($arr); + $obj = ArrayType::from($arr); $this->assertEquals('foobar', $obj->getDeepKey(['baz', 'bar'])); $this->assertNull($obj->getDeepKey(['foo', 'bar', 'baz'])); } - public function testMap() + public function testMap(): void { - $obj = $this->arr([1, 2, 3]); + $obj = ArrayType::from([1, 2, 3]); $actual = $obj->map(function($item) { return $item * 2; }); @@ -137,9 +135,9 @@ class ArrayTypeTest extends IonTestCase { $this->assertEquals([2, 4, 6], $actual); } - public function testBadCall() + public function testBadCall(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage("Method 'foo' does not exist"); @@ -147,20 +145,20 @@ class ArrayTypeTest extends IonTestCase { $obj->foo(); } - public function testShuffle() + public function testShuffle(): void { $original = [1, 2, 3, 4]; $test = [1, 2, 3, 4]; - $obj = $this->arr($test); + $obj = ArrayType::from($test); $actual = $obj->shuffle(); //$this->assertNotEquals($actual, $original); $this->assertTrue(is_array($actual)); } - public function testHasKey() + public function testHasKey(): void { - $obj = $this->arr([ + $obj = ArrayType::from([ 'a' => 'b', 'z' => 'y' ]); @@ -168,9 +166,9 @@ class ArrayTypeTest extends IonTestCase { $this->assertFalse($obj->hasKey('b')); } - public function testHasKeyArray() + public function testHasKeyArray(): void { - $obj = $this->arr([ + $obj = ArrayType::from([ 'foo' => [ 'bar' => [ 'baz' => [ @@ -191,23 +189,23 @@ class ArrayTypeTest extends IonTestCase { $this->assertFalse($obj->hasKey(['bar', 'baz'])); } - public function testHas() + public function testHas(): void { - $obj = $this->arr([1, 2, 6, 8, 11]); + $obj = ArrayType::from([1, 2, 6, 8, 11]); $this->assertTrue($obj->has(8)); $this->assertFalse($obj->has(8745)); } - public function testSearch() + public function testSearch(): void { - $obj = $this->arr([1, 2, 5, 7, 47]); + $obj = ArrayType::from([1, 2, 5, 7, 47]); $actual = $obj->search(47); $this->assertEquals(4, $actual); } - public function testFill() + public function testFill(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $expected = ['?', '?', '?']; $actual = $obj->fill(0, 3, '?'); $this->assertEquals($actual, $expected); diff --git a/tests/Ion/Type/StringTypeTest.php b/tests/Ion/Type/StringTypeTest.php index f12bc45e..44d4f2f9 100644 --- a/tests/Ion/Type/StringTypeTest.php +++ b/tests/Ion/Type/StringTypeTest.php @@ -16,14 +16,12 @@ namespace Aviat\Ion\Tests\Type; -use Aviat\Ion\StringWrapper; +use Aviat\Ion\Type\StringType; use Aviat\Ion\Tests\IonTestCase; class StringTypeTest extends IonTestCase { - use StringWrapper; - - public function dataFuzzyCaseMatch() + public function dataFuzzyCaseMatch(): array { return [ 'space separated' => [ @@ -56,10 +54,13 @@ class StringTypeTest extends IonTestCase { /** * @dataProvider dataFuzzyCaseMatch + * @param string $str1 + * @param string $str2 + * @param bool $expected */ - public function testFuzzyCaseMatch($str1, $str2, $expected) + public function testFuzzyCaseMatch(string $str1, string $str2, bool $expected): void { - $actual = $this->string($str1)->fuzzyCaseMatch($str2); + $actual = StringType::from($str1)->fuzzyCaseMatch($str2); $this->assertEquals($expected, $actual); } From 461d074d41763d594946daa4385363725e41c3f7 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 10 Apr 2020 20:01:46 -0400 Subject: [PATCH 07/27] Type all the class attributes --- README.md | 6 +- app/bootstrap.php | 82 ++++++------------- app/views/anime/list.php | 8 +- src/AnimeClient/API/APIRequestBuilder.php | 18 ++-- .../API/Anilist/AnilistRequestBuilder.php | 6 +- src/AnimeClient/API/Anilist/AnilistTrait.php | 6 +- src/AnimeClient/API/Anilist/Model.php | 2 +- src/AnimeClient/API/CacheTrait.php | 2 +- src/AnimeClient/API/Kitsu/Auth.php | 4 +- .../API/Kitsu/KitsuRequestBuilder.php | 4 +- src/AnimeClient/API/Kitsu/KitsuTrait.php | 2 +- src/AnimeClient/API/Kitsu/Model.php | 10 +-- .../Transformer/AnimeListTransformer.php | 3 +- .../Kitsu/Transformer/AnimeTransformer.php | 3 +- .../Transformer/MangaListTransformer.php | 7 +- src/AnimeClient/API/ParallelAPIRequest.php | 2 +- src/AnimeClient/Command/BaseCommand.php | 2 +- src/AnimeClient/Command/SyncLists.php | 4 +- src/AnimeClient/Command/UpdateThumbnails.php | 8 +- src/AnimeClient/Controller.php | 18 ++-- src/AnimeClient/Controller/Anime.php | 5 +- .../Controller/AnimeCollection.php | 4 +- src/AnimeClient/Controller/Character.php | 2 +- src/AnimeClient/Controller/Manga.php | 2 +- src/AnimeClient/Controller/People.php | 2 +- src/AnimeClient/Controller/Settings.php | 11 +-- src/AnimeClient/Controller/User.php | 2 +- src/AnimeClient/Dispatcher.php | 19 ++--- src/AnimeClient/FormGenerator.php | 5 +- src/AnimeClient/MenuGenerator.php | 18 ++-- src/AnimeClient/Model/Anime.php | 6 +- src/AnimeClient/Model/AnimeCollection.php | 2 +- src/AnimeClient/Model/Collection.php | 4 +- src/AnimeClient/Model/Manga.php | 11 +-- src/AnimeClient/Model/Settings.php | 4 +- src/AnimeClient/RoutingBase.php | 20 ++--- src/AnimeClient/UrlGenerator.php | 4 +- src/AnimeClient/Util.php | 2 +- src/Ion/ArrayWrapper.php | 38 --------- src/Ion/Config.php | 6 +- src/Ion/Model.php | 1 - src/Ion/Model/DB.php | 55 ------------- src/Ion/StringWrapper.php | 38 --------- src/Ion/Transformer/AbstractTransformer.php | 5 -- src/Ion/Type/ArrayType.php | 21 +++-- src/Ion/Type/StringType.php | 11 +++ src/Ion/View.php | 5 +- .../AnimeClient/API/APIRequestBuilderTest.php | 4 +- tests/Ion/Di/ContainerAwareTest.php | 2 +- tests/Ion/IonTestCase.php | 3 +- tests/Ion/Model/BaseDBModelTest.php | 29 ------- tests/Ion/StringWrapperTest.php | 39 --------- tests/Ion/Type/ArrayTypeTest.php | 62 +++++++------- tests/Ion/Type/StringTypeTest.php | 13 +-- 54 files changed, 218 insertions(+), 434 deletions(-) delete mode 100644 src/Ion/ArrayWrapper.php delete mode 100644 src/Ion/Model/DB.php delete mode 100644 src/Ion/StringWrapper.php delete mode 100644 tests/Ion/Model/BaseDBModelTest.php delete mode 100644 tests/Ion/StringWrapperTest.php diff --git a/README.md b/README.md index a43e5faa..4bf489cf 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Hummingbird Anime Client -Update your anime/manga list on Kitsu.io and MyAnimeList.net +Update your anime/manga list on Kitsu.io and Anilist -[![Build Status](https://travis-ci.org/timw4mail/HummingBirdAnimeClient.svg?branch=master)](https://travis-ci.org/timw4mail/HummingBirdAnimeClient) +[![Build Status](https://travis-ci.com/timw4mail/HummingBirdAnimeClient.svg?branch=master)](https://travis-ci.com/github/timw4mail/HummingBirdAnimeClient) [![Build Status](https://jenkins.timshomepage.net/buildStatus/icon?job=timw4mail/HummingBirdAnimeClient/develop)](https://jenkins.timshomepage.net/job/timw4mail/HummingBirdAnimeClient/develop) [[Hosted Example](https://list.timshomepage.net)] @@ -31,7 +31,7 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net ### Requirements -* PHP 7.3+ +* PHP 7.4+ * PDO SQLite or PDO PostgreSQL (For collection tab) * GD extension for caching images diff --git a/app/bootstrap.php b/app/bootstrap.php index c641ffe0..02dd99c7 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -28,14 +28,15 @@ use Aviat\AnimeClient\Model; use Aviat\Banker\Pool; use Aviat\Ion\Config; use Aviat\Ion\Di\Container; +use Aviat\Ion\Di\ContainerInterface; +use Laminas\Diactoros\{Response, ServerRequestFactory}; use Monolog\Handler\RotatingFileHandler; use Monolog\Logger; -use Zend\Diactoros\{Response, ServerRequestFactory}; // ----------------------------------------------------------------------------- // Setup DI container // ----------------------------------------------------------------------------- -return static function ($configArray = []) { +return static function (array $configArray = []): Container { $container = new Container(); // ------------------------------------------------------------------------- @@ -60,26 +61,20 @@ return static function ($configArray = []) { // ------------------------------------------------------------------------- // Create Config Object - $container->set('config', static function() use ($configArray) { - return new Config($configArray); - }); + $container->set('config', fn () => new Config($configArray)); // Create Cache Object - $container->set('cache', static function($container): Pool { + $container->set('cache', static function(ContainerInterface $container): Pool { $logger = $container->getLogger(); $config = $container->get('config')->get('cache'); return new Pool($config, $logger); }); - // Create List Cache - // Create Aura Router Object - $container->set('aura-router', static function() { - return new RouterContainer; - }); + $container->set('aura-router', fn() => new RouterContainer); // Create Html helper Object - $container->set('html-helper', static function($container) { + $container->set('html-helper', static function(ContainerInterface $container) { $htmlHelper = (new HelperLocatorFactory)->newInstance(); $htmlHelper->set('menu', static function() use ($container) { $menuHelper = new Helper\Menu(); @@ -101,31 +96,23 @@ return static function ($configArray = []) { }); // Create Request/Response Objects - $container->set('request', static function() { - return ServerRequestFactory::fromGlobals( - $_SERVER, - $_GET, - $_POST, - $_COOKIE, - $_FILES - ); - }); - $container->set('response', static function() { - return new Response; - }); + $container->set('request', fn () => ServerRequestFactory::fromGlobals( + $_SERVER, + $_GET, + $_POST, + $_COOKIE, + $_FILES + )); + $container->set('response', fn () => new Response); // Create session Object - $container->set('session', static function() { - return (new SessionFactory())->newInstance($_COOKIE); - }); + $container->set('session', fn () => (new SessionFactory())->newInstance($_COOKIE)); // Miscellaneous helper methods - $container->set('util', static function($container): Util { - return new Util($container); - }); + $container->set('util', fn ($container) => new Util($container)); // Models - $container->set('kitsu-model', static function($container): Kitsu\Model { + $container->set('kitsu-model', static function(ContainerInterface $container): Kitsu\Model { $requestBuilder = new KitsuRequestBuilder(); $requestBuilder->setLogger($container->getLogger('kitsu-request')); @@ -141,7 +128,7 @@ return static function ($configArray = []) { $model->setCache($cache); return $model; }); - $container->set('anilist-model', static function($container): Anilist\Model { + $container->set('anilist-model', static function(ContainerInterface $container): Anilist\Model { $requestBuilder = new Anilist\AnilistRequestBuilder(); $requestBuilder->setLogger($container->getLogger('anilist-request')); @@ -155,39 +142,24 @@ return static function ($configArray = []) { return $model; }); - - $container->set('anime-model', static function($container) { - return new Model\Anime($container); - }); - $container->set('manga-model', static function($container) { - return new Model\Manga($container); - }); - $container->set('anime-collection-model', static function($container) { - return new Model\AnimeCollection($container); - }); - $container->set('manga-collection-model', static function($container) { - return new Model\MangaCollection($container); - }); + $container->set('anime-model', fn ($container) => new Model\Anime($container)); + $container->set('manga-model', fn ($container) => new Model\Manga($container)); + $container->set('anime-collection-model', fn ($container) => new Model\AnimeCollection($container)); + $container->set('manga-collection-model', fn ($container) => new Model\MangaCollection($container)); $container->set('settings-model', static function($container) { - $model = new Model\Settings($container->get('config')); + $model = new Model\Settings($container->get('config')); $model->setContainer($container); return $model; }); // Miscellaneous Classes - $container->set('auth', static function($container) { - return new Kitsu\Auth($container); - }); - $container->set('url-generator', static function($container) { - return new UrlGenerator($container); - }); + $container->set('auth', fn ($container) => new Kitsu\Auth($container)); + $container->set('url-generator', fn ($container) => new UrlGenerator($container)); // ------------------------------------------------------------------------- // Dispatcher // ------------------------------------------------------------------------- - $container->set('dispatcher', static function($container) { - return new Dispatcher($container); - }); + $container->set('dispatcher', fn ($container) => new Dispatcher($container)); return $container; }; diff --git a/app/views/anime/list.php b/app/views/anime/list.php index a6b15374..be69c273 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -75,20 +75,20 @@ - picture("images/{$link['meta']['image']}", 'svg', [ + img("/public/images/{$link['meta']['image']}", [ 'class' => 'streaming-logo', 'width' => 50, 'height' => 50, 'alt' => "{$link['meta']['name']} logo", - ]); ?> + ]) ?> - picture("images/{$link['meta']['image']}", 'svg', [ + img("/public/images/{$link['meta']['image']}", [ 'class' => 'streaming-logo', 'width' => 50, 'height' => 50, 'alt' => "{$link['meta']['name']} logo", - ]); ?> + ]) ?> diff --git a/src/AnimeClient/API/APIRequestBuilder.php b/src/AnimeClient/API/APIRequestBuilder.php index 1e145f5d..2e018fb0 100644 --- a/src/AnimeClient/API/APIRequestBuilder.php +++ b/src/AnimeClient/API/APIRequestBuilder.php @@ -38,37 +38,37 @@ abstract class APIRequestBuilder { * Url prefix for making url requests * @var string */ - protected $baseUrl = ''; + protected string $baseUrl = ''; /** * Url path of the request * @var string */ - protected $path = ''; + protected string $path = ''; /** * Query string for the request * @var string */ - protected $query = ''; + protected string $query = ''; /** * Default request headers * @var array */ - protected $defaultHeaders = []; + protected array $defaultHeaders = []; /** * Valid HTTP request methods * @var array */ - protected $validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']; + protected array $validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS']; /** * The current request * @var Request */ - protected $request; + protected Request $request; /** * Do a basic minimal GET request @@ -78,8 +78,10 @@ abstract class APIRequestBuilder { */ public static function simpleRequest(string $uri): Request { - return (new Request($uri)) - ->setHeader('User-Agent', USER_AGENT); + $request = (new Request($uri)); + $request->setHeader('User-Agent', USER_AGENT); + + return $request; } /** diff --git a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php index 5504c13c..d2398f91 100644 --- a/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php +++ b/src/AnimeClient/API/Anilist/AnilistRequestBuilder.php @@ -26,20 +26,20 @@ final class AnilistRequestBuilder extends APIRequestBuilder { * The base url for api requests * @var string $base_url */ - protected $baseUrl = 'https://graphql.anilist.co'; + protected string $baseUrl = 'https://graphql.anilist.co'; /** * Valid HTTP request methods * @var array */ - protected $validMethods = ['POST']; + protected array $validMethods = ['POST']; /** * HTTP headers to send with every request * * @var array */ - protected $defaultHeaders = [ + protected array $defaultHeaders = [ 'User-Agent' => USER_AGENT, 'Accept' => 'application/json', 'Content-Type' => 'application/json', diff --git a/src/AnimeClient/API/Anilist/AnilistTrait.php b/src/AnimeClient/API/Anilist/AnilistTrait.php index 388643d8..7a4bb5cd 100644 --- a/src/AnimeClient/API/Anilist/AnilistTrait.php +++ b/src/AnimeClient/API/Anilist/AnilistTrait.php @@ -38,20 +38,20 @@ trait AnilistTrait { * The request builder for the Anilist API * @var AnilistRequestBuilder */ - protected $requestBuilder; + protected AnilistRequestBuilder $requestBuilder; /** * The base url for api requests * @var string $base_url */ - protected $baseUrl = Anilist::BASE_URL; + protected string $baseUrl = Anilist::BASE_URL; /** * HTTP headers to send with every request * * @var array */ - protected $defaultHeaders = [ + protected array $defaultHeaders = [ 'Accept' => 'application/json', 'Accept-Encoding' => 'gzip', 'Content-type' => 'application/json', diff --git a/src/AnimeClient/API/Anilist/Model.php b/src/AnimeClient/API/Anilist/Model.php index 51b893e8..c33c0fd7 100644 --- a/src/AnimeClient/API/Anilist/Model.php +++ b/src/AnimeClient/API/Anilist/Model.php @@ -39,7 +39,7 @@ final class Model /** * @var ListItem */ - private $listItem; + private ListItem $listItem; /** * Constructor diff --git a/src/AnimeClient/API/CacheTrait.php b/src/AnimeClient/API/CacheTrait.php index 47d3db12..bc1e945d 100644 --- a/src/AnimeClient/API/CacheTrait.php +++ b/src/AnimeClient/API/CacheTrait.php @@ -26,7 +26,7 @@ trait CacheTrait { /** * @var Pool */ - protected $cache; + protected Pool $cache; /** * Inject the cache object diff --git a/src/AnimeClient/API/Kitsu/Auth.php b/src/AnimeClient/API/Kitsu/Auth.php index 2198eccd..3161e77c 100644 --- a/src/AnimeClient/API/Kitsu/Auth.php +++ b/src/AnimeClient/API/Kitsu/Auth.php @@ -42,14 +42,14 @@ final class Auth { * * @var Model */ - private $model; + private Model $model; /** * Session object * * @var Segment */ - private $segment; + private Segment $segment; /** * Constructor diff --git a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php index b933328c..aa105062 100644 --- a/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php +++ b/src/AnimeClient/API/Kitsu/KitsuRequestBuilder.php @@ -25,14 +25,14 @@ final class KitsuRequestBuilder extends APIRequestBuilder { * The base url for api requests * @var string $base_url */ - protected $baseUrl = 'https://kitsu.io/api/edge/'; + protected string $baseUrl = 'https://kitsu.io/api/edge/'; /** * HTTP headers to send with every request * * @var array */ - protected $defaultHeaders = [ + protected array $defaultHeaders = [ 'User-Agent' => USER_AGENT, 'Accept' => 'application/vnd.api+json', 'Content-Type' => 'application/vnd.api+json', diff --git a/src/AnimeClient/API/Kitsu/KitsuTrait.php b/src/AnimeClient/API/Kitsu/KitsuTrait.php index 598ff0ea..8103f5cf 100644 --- a/src/AnimeClient/API/Kitsu/KitsuTrait.php +++ b/src/AnimeClient/API/Kitsu/KitsuTrait.php @@ -38,7 +38,7 @@ trait KitsuTrait { * The request builder for the Kitsu API * @var KitsuRequestBuilder */ - protected $requestBuilder; + protected KitsuRequestBuilder $requestBuilder; /** * Set the request builder object diff --git a/src/AnimeClient/API/Kitsu/Model.php b/src/AnimeClient/API/Kitsu/Model.php index 414131a7..6dee2400 100644 --- a/src/AnimeClient/API/Kitsu/Model.php +++ b/src/AnimeClient/API/Kitsu/Model.php @@ -65,27 +65,27 @@ final class Model { * * @var AnimeListTransformer */ - private $animeListTransformer; + private AnimeListTransformer $animeListTransformer; /** * @var AnimeTransformer */ - private $animeTransformer; + private AnimeTransformer $animeTransformer; /** * @var ListItem */ - private $listItem; + private ListItem $listItem; /** * @var MangaTransformer */ - private $mangaTransformer; + private MangaTransformer $mangaTransformer; /** * @var MangaListTransformer */ - private $mangaListTransformer; + private MangaListTransformer $mangaListTransformer; /** * Constructor diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php index e4942909..5c0d8ff8 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php @@ -22,6 +22,7 @@ use Aviat\AnimeClient\Types\{ AnimeListItem }; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Transformer for anime list @@ -100,7 +101,7 @@ final class AnimeListTransformer extends AbstractTransformer { 'title' => $title, 'titles' => $titles, 'slug' => $anime['slug'], - 'show_type' => (string)$this->string($anime['subtype'])->upperCaseFirst(), + 'show_type' => (string)StringType::from($anime['subtype'])->upperCaseFirst(), 'cover_image' => $anime['posterImage']['small'], 'genres' => $genres, 'streaming_links' => $streamingLinks, diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php index fc93827c..5a339567 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php @@ -19,6 +19,7 @@ namespace Aviat\AnimeClient\API\Kitsu\Transformer; use Aviat\AnimeClient\API\{JsonAPI, Kitsu}; use Aviat\AnimeClient\Types\AnimePage; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Transformer for anime description page @@ -114,7 +115,7 @@ final class AnimeTransformer extends AbstractTransformer { 'genres' => $item['genres'], 'id' => $item['id'], 'included' => $item['included'], - 'show_type' => (string)$this->string($item['showType'])->upperCaseFirst(), + 'show_type' => (string)StringType::from($item['showType'])->upperCaseFirst(), 'slug' => $item['slug'], 'staff' => $staff, 'status' => Kitsu::getAiringStatus($item['startDate'], $item['endDate']), diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php index 83cc7d0a..e8b5570f 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php @@ -21,16 +21,13 @@ use Aviat\AnimeClient\Types\{ FormItem, FormItemData, MangaListItem, MangaListItemDetail }; -use Aviat\Ion\StringWrapper; use Aviat\Ion\Transformer\AbstractTransformer; +use Aviat\Ion\Type\StringType; /** * Data transformation class for zippered Hummingbird manga */ final class MangaListTransformer extends AbstractTransformer { - - use StringWrapper; - /** * Remap zipped anime data to a more logical form * @@ -103,7 +100,7 @@ final class MangaListTransformer extends AbstractTransformer { 'slug' => $manga['slug'], 'title' => $title, 'titles' => $titles, - 'type' => (string)$this->string($manga['subtype'])->upperCaseFirst(), + 'type' => (string)StringType::from($manga['subtype'])->upperCaseFirst(), 'url' => 'https://kitsu.io/manga/' . $manga['slug'], ]), 'reading_status' => $item['attributes']['status'], diff --git a/src/AnimeClient/API/ParallelAPIRequest.php b/src/AnimeClient/API/ParallelAPIRequest.php index 771006ba..83389c92 100644 --- a/src/AnimeClient/API/ParallelAPIRequest.php +++ b/src/AnimeClient/API/ParallelAPIRequest.php @@ -33,7 +33,7 @@ final class ParallelAPIRequest { * * @var array */ - private $requests = []; + private array $requests = []; /** * Add a request diff --git a/src/AnimeClient/Command/BaseCommand.php b/src/AnimeClient/Command/BaseCommand.php index 6fc64487..17e65b24 100644 --- a/src/AnimeClient/Command/BaseCommand.php +++ b/src/AnimeClient/Command/BaseCommand.php @@ -29,9 +29,9 @@ use Aviat\Ion\Config; use Aviat\Ion\Di\{Container, ContainerAware}; use ConsoleKit\{Command, ConsoleException}; use ConsoleKit\Widgets\Box; +use Laminas\Diactoros\{Response, ServerRequestFactory}; use Monolog\Handler\RotatingFileHandler; use Monolog\Logger; -use Zend\Diactoros\{Response, ServerRequestFactory}; /** * Base class for console command setup diff --git a/src/AnimeClient/Command/SyncLists.php b/src/AnimeClient/Command/SyncLists.php index e0c53da2..510cb352 100644 --- a/src/AnimeClient/Command/SyncLists.php +++ b/src/AnimeClient/Command/SyncLists.php @@ -44,13 +44,13 @@ final class SyncLists extends BaseCommand { * Model for making requests to Anilist API * @var AnilistModel */ - protected $anilistModel; + protected AnilistModel $anilistModel; /** * Model for making requests to Kitsu API * @var KitsuModel */ - protected $kitsuModel; + protected KitsuModel $kitsuModel; /** * Run the Kitsu <=> Anilist sync script diff --git a/src/AnimeClient/Command/UpdateThumbnails.php b/src/AnimeClient/Command/UpdateThumbnails.php index 909db166..8c2a3014 100644 --- a/src/AnimeClient/Command/UpdateThumbnails.php +++ b/src/AnimeClient/Command/UpdateThumbnails.php @@ -17,7 +17,7 @@ namespace Aviat\AnimeClient\Command; use Aviat\AnimeClient\API\JsonAPI; -use Aviat\AnimeClient\API\Kitsu\Model; +use Aviat\AnimeClient\API\Kitsu\Model as KitsuModel; use Aviat\AnimeClient\Controller\Images; /** @@ -27,14 +27,14 @@ use Aviat\AnimeClient\Controller\Images; final class UpdateThumbnails extends ClearThumbnails { /** * Model for making requests to Kitsu API - * @var Model + * @var KitsuModel */ - protected $kitsuModel; + protected KitsuModel $kitsuModel; /** * The default controller, which has the method to cache the images */ - protected $controller; + protected Images $controller; public function execute(array $args, array $options = []): void { diff --git a/src/AnimeClient/Controller.php b/src/AnimeClient/Controller.php index db726cb3..46ae7e4f 100644 --- a/src/AnimeClient/Controller.php +++ b/src/AnimeClient/Controller.php @@ -47,55 +47,55 @@ class Controller { * The authentication object * @var Auth $auth ; */ - protected $auth; + protected Auth $auth; /** * Cache manager * @var CacheItemPoolInterface */ - protected $cache; + protected CacheItemPoolInterface $cache; /** * The global configuration object * @var ConfigInterface $config */ - public $config; + public ConfigInterface $config; /** * Request object * @var ServerRequestInterface $request */ - protected $request; + protected ServerRequestInterface $request; /** * Response object * @var ResponseInterface $response */ - public $response; + public ResponseInterface $response; /** * Url generation class * @var UrlGenerator */ - protected $urlGenerator; + protected UrlGenerator $urlGenerator; /** * Aura url generator * @var Generator */ - protected $url; + protected Generator $url; /** * Session segment * @var Segment */ - protected $session; + protected Segment $session; /** * Common data to be sent to views * @var array */ - protected $baseData = []; + protected array $baseData = []; /** * Controller constructor. diff --git a/src/AnimeClient/Controller/Anime.php b/src/AnimeClient/Controller/Anime.php index a53ced6c..a3222530 100644 --- a/src/AnimeClient/Controller/Anime.php +++ b/src/AnimeClient/Controller/Anime.php @@ -21,6 +21,7 @@ use Aviat\AnimeClient\Controller as BaseController; use Aviat\AnimeClient\API\Kitsu\Transformer\AnimeListTransformer; use Aviat\AnimeClient\API\Enum\AnimeWatchingStatus\Kitsu as KitsuWatchingStatus; use Aviat\AnimeClient\API\Mapping\AnimeWatchingStatus; +use Aviat\AnimeClient\Model\Anime as AnimeModel; use Aviat\AnimeClient\Types\FormItem; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Di\Exception\ContainerException; @@ -37,9 +38,9 @@ final class Anime extends BaseController { /** * The anime list model - * @var \Aviat\AnimeClient\Model\Anime $model + * @var AnimeModel $model */ - protected $model; + protected AnimeModel $model; /** * Constructor diff --git a/src/AnimeClient/Controller/AnimeCollection.php b/src/AnimeClient/Controller/AnimeCollection.php index 62efaad7..f8650c27 100644 --- a/src/AnimeClient/Controller/AnimeCollection.php +++ b/src/AnimeClient/Controller/AnimeCollection.php @@ -38,13 +38,13 @@ final class AnimeCollection extends BaseController { * The anime collection model * @var AnimeCollectionModel $animeCollectionModel */ - private $animeCollectionModel; + private AnimeCollectionModel $animeCollectionModel; /** * The anime API model * @var AnimeModel $animeModel */ - private $animeModel; + private AnimeModel $animeModel; /** * Constructor diff --git a/src/AnimeClient/Controller/Character.php b/src/AnimeClient/Controller/Character.php index 84048b4c..755e6824 100644 --- a/src/AnimeClient/Controller/Character.php +++ b/src/AnimeClient/Controller/Character.php @@ -32,7 +32,7 @@ class Character extends BaseController { /** * @var Model */ - private $model; + private Model $model; /** * Character constructor. diff --git a/src/AnimeClient/Controller/Manga.php b/src/AnimeClient/Controller/Manga.php index de3e8550..190a6f3d 100644 --- a/src/AnimeClient/Controller/Manga.php +++ b/src/AnimeClient/Controller/Manga.php @@ -38,7 +38,7 @@ final class Manga extends Controller { * The manga model * @var MangaModel $model */ - protected $model; + protected MangaModel $model; /** * Constructor diff --git a/src/AnimeClient/Controller/People.php b/src/AnimeClient/Controller/People.php index 38adec25..d1718c5b 100644 --- a/src/AnimeClient/Controller/People.php +++ b/src/AnimeClient/Controller/People.php @@ -32,7 +32,7 @@ final class People extends BaseController { /** * @var Model */ - private $model; + private Model $model; /** * People constructor. diff --git a/src/AnimeClient/Controller/Settings.php b/src/AnimeClient/Controller/Settings.php index e44d7cda..c951d79a 100644 --- a/src/AnimeClient/Controller/Settings.php +++ b/src/AnimeClient/Controller/Settings.php @@ -17,8 +17,9 @@ namespace Aviat\AnimeClient\Controller; use Aura\Router\Exception\RouteNotFound; -use Aviat\AnimeClient\API\Anilist\Model; +use Aviat\AnimeClient\API\Anilist\Model as AnilistModel; use Aviat\AnimeClient\Controller as BaseController; +use Aviat\AnimeClient\Model\Settings as SettingsModel; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Di\Exception\ContainerException; use Aviat\Ion\Di\Exception\NotFoundException; @@ -29,14 +30,14 @@ use Aviat\Ion\Di\Exception\NotFoundException; final class Settings extends BaseController { /** - * @var Model + * @var AnilistModel */ - private $anilistModel; + private AnilistModel $anilistModel; /** - * @var \Aviat\AnimeClient\Model\Settings + * @var SettingsModel */ - private $settingsModel; + private SettingsModel $settingsModel; /** * Settings constructor. diff --git a/src/AnimeClient/Controller/User.php b/src/AnimeClient/Controller/User.php index b00fc9b7..7237ac38 100644 --- a/src/AnimeClient/Controller/User.php +++ b/src/AnimeClient/Controller/User.php @@ -32,7 +32,7 @@ final class User extends BaseController { /** * @var Model */ - private $kitsuModel; + private Model $kitsuModel; /** * User constructor. diff --git a/src/AnimeClient/Dispatcher.php b/src/AnimeClient/Dispatcher.php index 3178744d..ecb650a3 100644 --- a/src/AnimeClient/Dispatcher.php +++ b/src/AnimeClient/Dispatcher.php @@ -18,13 +18,12 @@ namespace Aviat\AnimeClient; use function Aviat\Ion\_dir; -use Aura\Router\{Matcher, Route, Rule}; +use Aura\Router\{Map, Matcher, Route, Rule}; use Aviat\AnimeClient\API\FailedResponseException; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Friend; -use Aviat\Ion\StringWrapper; - +use Aviat\Ion\Type\StringType; use LogicException; use ReflectionException; @@ -33,31 +32,29 @@ use ReflectionException; */ final class Dispatcher extends RoutingBase { - use StringWrapper; - /** * The route-matching object - * @var object $router + * @var Map $router */ - protected $router; + protected Map $router; /** * The route matcher * @var Matcher $matcher */ - protected $matcher; + protected Matcher $matcher; /** * Routing array * @var array */ - protected $routes; + protected array $routes; /** * Routes added to router * @var array $outputRoutes */ - protected $outputRoutes; + protected array $outputRoutes; /** * Constructor @@ -254,7 +251,7 @@ final class Dispatcher extends RoutingBase { foreach ($classFiles as $file) { $rawClassName = basename(str_replace('.php', '', $file)); - $path = (string)$this->string($rawClassName)->dasherize(); + $path = (string)StringType::from($rawClassName)->dasherize(); $className = trim($defaultNamespace . '\\' . $rawClassName, '\\'); $controllers[$path] = $className; diff --git a/src/AnimeClient/FormGenerator.php b/src/AnimeClient/FormGenerator.php index fe04838f..b6e9cd4f 100644 --- a/src/AnimeClient/FormGenerator.php +++ b/src/AnimeClient/FormGenerator.php @@ -30,7 +30,7 @@ final class FormGenerator { * * @var HelperLocator */ - private $helper; + private HelperLocator $helper; /** * FormGenerator constructor. @@ -93,6 +93,9 @@ final class FormGenerator { $params['type'] = 'select'; $params['options'] = array_flip($form['options']); break; + + default: + break; } foreach (['readonly', 'disabled'] as $key) diff --git a/src/AnimeClient/MenuGenerator.php b/src/AnimeClient/MenuGenerator.php index 3696f230..a42a9787 100644 --- a/src/AnimeClient/MenuGenerator.php +++ b/src/AnimeClient/MenuGenerator.php @@ -16,11 +16,12 @@ namespace Aviat\AnimeClient; -use Aviat\Ion\{ArrayWrapper, StringWrapper}; use Aviat\Ion\Di\Exception\{ContainerException, NotFoundException}; use Aura\Html\HelperLocator; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Exception\ConfigException; +use Aviat\Ion\Type\ArrayType; +use Aviat\Ion\Type\StringType; use Psr\Http\Message\RequestInterface; /** @@ -28,22 +29,19 @@ use Psr\Http\Message\RequestInterface; */ final class MenuGenerator extends UrlGenerator { - use ArrayWrapper; - use StringWrapper; - /** * Html generation helper * * @var HelperLocator */ - protected $helper; + protected HelperLocator $helper; /** * Request object * * @var RequestInterface */ - protected $request; + protected RequestInterface $request; /** * MenuGenerator constructor. @@ -74,8 +72,8 @@ final class MenuGenerator extends UrlGenerator { $parsed[$name] = []; foreach ($menu['items'] as $pathName => $partialPath) { - $title = (string)$this->string($pathName)->humanize()->titleize(); - $parsed[$name][$title] = (string)$this->string($menu['route_prefix'])->append($partialPath); + $title = (string)StringType::from($pathName)->humanize()->titleize(); + $parsed[$name][$title] = (string)StringType::from($menu['route_prefix'])->append($partialPath); } } @@ -95,7 +93,7 @@ final class MenuGenerator extends UrlGenerator { $parsedConfig = $this->parseConfig($menus); // Bail out early on invalid menu - if ( ! $this->arr($parsedConfig)->hasKey($menu)) + if ( ! ArrayType::from($parsedConfig)->hasKey($menu)) { return ''; } @@ -104,7 +102,7 @@ final class MenuGenerator extends UrlGenerator { foreach ($menuConfig as $title => $path) { - $has = $this->string($this->path())->contains($path); + $has = StringType::from($this->path())->contains($path); $selected = ($has && mb_strlen($this->path()) >= mb_strlen($path)); $link = $this->helper->a($this->url($path), $title); diff --git a/src/AnimeClient/Model/Anime.php b/src/AnimeClient/Model/Anime.php index 55d31726..ab055376 100644 --- a/src/AnimeClient/Model/Anime.php +++ b/src/AnimeClient/Model/Anime.php @@ -40,21 +40,21 @@ class Anime extends API { * * @var boolean */ - protected $anilistEnabled; + protected bool $anilistEnabled; /** * Model for making requests to Anilist API * * @var AnilistModel */ - protected $anilistModel; + protected AnilistModel $anilistModel; /** * Model for making requests to Kitsu API * * @var KitsuModel */ - protected $kitsuModel; + protected KitsuModel $kitsuModel; /** * Anime constructor. diff --git a/src/AnimeClient/Model/AnimeCollection.php b/src/AnimeClient/Model/AnimeCollection.php index f2322c08..33cf0d30 100644 --- a/src/AnimeClient/Model/AnimeCollection.php +++ b/src/AnimeClient/Model/AnimeCollection.php @@ -29,7 +29,7 @@ final class AnimeCollection extends Collection { * Anime API Model * @var Anime $animeModel */ - protected $animeModel; + protected Anime $animeModel; /** * Create the collection model diff --git a/src/AnimeClient/Model/Collection.php b/src/AnimeClient/Model/Collection.php index 5cb1c032..b44cb196 100644 --- a/src/AnimeClient/Model/Collection.php +++ b/src/AnimeClient/Model/Collection.php @@ -31,13 +31,13 @@ class Collection extends DB { * The query builder object * @var Query_Builder_Interface */ - protected $db; + protected Query_Builder_Interface $db; /** * Whether the database is valid for querying * @var boolean */ - protected $validDatabase = FALSE; + protected bool $validDatabase = FALSE; /** * Create a new collection object diff --git a/src/AnimeClient/Model/Manga.php b/src/AnimeClient/Model/Manga.php index 61116861..baddff43 100644 --- a/src/AnimeClient/Model/Manga.php +++ b/src/AnimeClient/Model/Manga.php @@ -26,6 +26,7 @@ use Aviat\AnimeClient\Types\{ MangaListItem, MangaPage }; +use Aviat\AnimeClient\API\{Anilist, Kitsu}; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Json; @@ -40,19 +41,19 @@ class Manga extends API { * * @var boolean */ - protected $anilistEnabled; + protected bool $anilistEnabled; /** * Model for making requests to the Anilist API - * @var \Aviat\AnimeClient\API\Anilist\Model + * @var Anilist\Model */ - protected $anilistModel; + protected Anilist\Model $anilistModel; /** * Model for making requests to Kitsu API - * @var \Aviat\AnimeClient\API\Kitsu\Model + * @var Kitsu\Model */ - protected $kitsuModel; + protected Kitsu\Model $kitsuModel; /** * Constructor diff --git a/src/AnimeClient/Model/Settings.php b/src/AnimeClient/Model/Settings.php index a1beec2c..d9f76ce8 100644 --- a/src/AnimeClient/Model/Settings.php +++ b/src/AnimeClient/Model/Settings.php @@ -25,16 +25,14 @@ use Aviat\AnimeClient\Types\{Config, UndefinedPropertyException}; use Aviat\Ion\ConfigInterface; use Aviat\Ion\Di\ContainerAware; -use Aviat\Ion\StringWrapper; /** * Model for handling settings control panel */ final class Settings { use ContainerAware; - use StringWrapper; - private $config; + private ConfigInterface $config; public function __construct(ConfigInterface $config) { diff --git a/src/AnimeClient/RoutingBase.php b/src/AnimeClient/RoutingBase.php index ea55207e..de9e250f 100644 --- a/src/AnimeClient/RoutingBase.php +++ b/src/AnimeClient/RoutingBase.php @@ -16,38 +16,36 @@ namespace Aviat\AnimeClient; -use Aviat\Ion\Config; +use Aviat\Ion\ConfigInterface; use Aviat\Ion\Di\ContainerInterface; use Aviat\Ion\Di\Exception\ContainerException; use Aviat\Ion\Di\Exception\NotFoundException; use Aviat\Ion\Exception\ConfigException; -use Aviat\Ion\StringWrapper; -use Psr\Http\Message\ServerRequestInterface; +use Aviat\Ion\Type\StringType; +use Psr\Http\Message\RequestInterface; /** * Base for routing/url classes */ class RoutingBase { - use StringWrapper; - /** * Injection Container * @var ContainerInterface $container */ - protected $container; + protected ContainerInterface $container; /** * Config Object - * @var Config + * @var ConfigInterface */ - protected $config; + protected ConfigInterface $config; /** * Class wrapper for input superglobals - * @var ServerRequestInterface + * @var RequestInterface */ - protected $request; + protected RequestInterface $request; /** * Constructor @@ -73,7 +71,7 @@ class RoutingBase { public function path(): string { $path = $this->request->getUri()->getPath(); - $cleanedPath = $this->string($path) + $cleanedPath = StringType::from($path) ->replace('%20', '') ->trim() ->trimRight('/') diff --git a/src/AnimeClient/UrlGenerator.php b/src/AnimeClient/UrlGenerator.php index c8edb2b5..ccf8b179 100644 --- a/src/AnimeClient/UrlGenerator.php +++ b/src/AnimeClient/UrlGenerator.php @@ -30,7 +30,7 @@ class UrlGenerator extends RoutingBase { * The current HTTP host * @var string */ - protected $host; + protected string $host; /** * Constructor @@ -49,7 +49,7 @@ class UrlGenerator extends RoutingBase { /** * Get the base url for css/js/images * - * @param string ...$args + * @param array $args * @return string */ public function assetUrl(string ...$args): string diff --git a/src/AnimeClient/Util.php b/src/AnimeClient/Util.php index f29af0ba..7e4d6f37 100644 --- a/src/AnimeClient/Util.php +++ b/src/AnimeClient/Util.php @@ -30,7 +30,7 @@ class Util { * Routes that don't require a second navigation level * @var array */ - private static $formPages = [ + private static array $formPages = [ 'edit', 'add', 'update', diff --git a/src/Ion/ArrayWrapper.php b/src/Ion/ArrayWrapper.php deleted file mode 100644 index 86288895..00000000 --- a/src/Ion/ArrayWrapper.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion; - -use Aviat\Ion\Type\ArrayType; - -/** - * Wrapper to shortcut creating ArrayType objects - */ -trait ArrayWrapper { - - /** - * Convenience method for wrapping an array - * with the array type class - * - * @param array $arr - * @return ArrayType - */ - public function arr(array $arr): ArrayType - { - return new ArrayType($arr); - } -} -// End of ArrayWrapper.php \ No newline at end of file diff --git a/src/Ion/Config.php b/src/Ion/Config.php index 0efa4cf1..7e2f6b8e 100644 --- a/src/Ion/Config.php +++ b/src/Ion/Config.php @@ -25,14 +25,12 @@ use InvalidArgumentException; */ class Config implements ConfigInterface { - use ArrayWrapper; - /** * Config object * * @var ArrayType */ - protected $map; + protected ArrayType $map; /** * Constructor @@ -41,7 +39,7 @@ class Config implements ConfigInterface { */ public function __construct(array $configArray = []) { - $this->map = $this->arr($configArray); + $this->map = ArrayType::from($configArray); } /** diff --git a/src/Ion/Model.php b/src/Ion/Model.php index 7ae03591..ab586b88 100644 --- a/src/Ion/Model.php +++ b/src/Ion/Model.php @@ -20,6 +20,5 @@ namespace Aviat\Ion; * Common base for all Models */ class Model { - use StringWrapper; } // End of Model.php diff --git a/src/Ion/Model/DB.php b/src/Ion/Model/DB.php deleted file mode 100644 index a77ce12e..00000000 --- a/src/Ion/Model/DB.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion\Model; - -use Aviat\Ion\ConfigInterface; -use Aviat\Ion\Model as BaseModel; - -/** - * Base model for database interaction - */ -class DB extends BaseModel { - /** - * The query builder object - * @var object $db - */ - protected $db; - - /** - * The config manager - * @var ConfigInterface - */ - protected $config; - - /** - * The database connection information array - * @var array $db_config - */ - protected $db_config; - - /** - * Constructor - * - * @param ConfigInterface $config - */ - public function __construct(ConfigInterface $config) - { - $this->config = $config; - $this->db_config = (array)$config->get('database'); - } -} -// End of DB.php diff --git a/src/Ion/StringWrapper.php b/src/Ion/StringWrapper.php deleted file mode 100644 index 092c5666..00000000 --- a/src/Ion/StringWrapper.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion; - -use Aviat\Ion\Type\StringType; - -/** - * Trait to add convenience method for creating StringType objects - */ -trait StringWrapper { - - /** - * Wrap the String in the Stringy class - * - * @param string $str - * @throws \InvalidArgumentException - * @return StringType - */ - public function string($str): StringType - { - return StringType::create($str); - } -} -// End of StringWrapper.php \ No newline at end of file diff --git a/src/Ion/Transformer/AbstractTransformer.php b/src/Ion/Transformer/AbstractTransformer.php index ea331b56..19076914 100644 --- a/src/Ion/Transformer/AbstractTransformer.php +++ b/src/Ion/Transformer/AbstractTransformer.php @@ -16,17 +16,12 @@ namespace Aviat\Ion\Transformer; -use Aviat\Ion\StringWrapper; - use BadMethodCallException; /** * Base class for data transformation */ abstract class AbstractTransformer implements TransformerInterface { - - use StringWrapper; - /** * Mutate the data structure * diff --git a/src/Ion/Type/ArrayType.php b/src/Ion/Type/ArrayType.php index bab03c61..21bc849c 100644 --- a/src/Ion/Type/ArrayType.php +++ b/src/Ion/Type/ArrayType.php @@ -32,14 +32,14 @@ class ArrayType { * * @var array */ - protected $arr; + protected array $arr; /** * Map generated methods to their native implementations * * @var array */ - protected $nativeMethods = [ + protected array $nativeMethods = [ 'chunk' => 'array_chunk', 'diff' => 'array_diff', 'filter' => 'array_filter', @@ -64,7 +64,7 @@ class ArrayType { * * @var array */ - protected $nativeInPlaceMethods = [ + protected array $nativeInPlaceMethods = [ 'shuffle' => 'shuffle', 'shift' => 'array_shift', 'unshift' => 'array_unshift', @@ -72,12 +72,23 @@ class ArrayType { 'pop' => 'array_pop', ]; + /** + * Create an ArrayType wrapper class from an array + * + * @param array $arr + * @return ArrayType + */ + public static function from(array $arr): ArrayType + { + return new ArrayType($arr); + } + /** * Create an ArrayType wrapper class * * @param array $arr */ - public function __construct(array &$arr) + private function __construct(array &$arr) { $this->arr =& $arr; } @@ -227,7 +238,7 @@ class ArrayType { /** * Return a reference to the value of an arbitrary key on the array * - * @example $arr = new ArrayType([0 => ['data' => ['foo' => 'bar']]]); + * @example $arr = ArrayType::from([0 => ['data' => ['foo' => 'bar']]]); * $val = $arr->getDeepKey([0, 'data', 'foo']); * // returns 'bar' * @param array $key An array of keys of the array diff --git a/src/Ion/Type/StringType.php b/src/Ion/Type/StringType.php index a7ade2d4..9e280cd3 100644 --- a/src/Ion/Type/StringType.php +++ b/src/Ion/Type/StringType.php @@ -23,6 +23,17 @@ use Stringy\Stringy; */ class StringType extends Stringy { + /** + * Alias for `create` static constructor + * + * @param string $str + * @return $this + */ + public static function from(string $str): self + { + return self::create($str); + } + /** * See if two strings match, despite being delimited differently, * such as camelCase, PascalCase, kebab-case, or snake_case. diff --git a/src/Ion/View.php b/src/Ion/View.php index f98c16ce..796f0663 100644 --- a/src/Ion/View.php +++ b/src/Ion/View.php @@ -29,14 +29,13 @@ abstract class View implements ViewInterface { use Di\ContainerAware; - use StringWrapper; /** * HTTP response Object * * @var ResponseInterface */ - public $response; + public ResponseInterface $response; /** * If the view has sent output via @@ -44,7 +43,7 @@ abstract class View * * @var boolean */ - protected $hasRendered = FALSE; + protected bool $hasRendered = FALSE; /** * Constructor diff --git a/tests/AnimeClient/API/APIRequestBuilderTest.php b/tests/AnimeClient/API/APIRequestBuilderTest.php index a73dff08..a271f236 100644 --- a/tests/AnimeClient/API/APIRequestBuilderTest.php +++ b/tests/AnimeClient/API/APIRequestBuilderTest.php @@ -30,9 +30,9 @@ class APIRequestBuilderTest extends TestCase { public function setUp(): void { $this->builder = new class extends APIRequestBuilder { - protected $baseUrl = 'https://httpbin.org/'; + protected string $baseUrl = 'https://httpbin.org/'; - protected $defaultHeaders = ['User-Agent' => "Tim's Anime Client Testsuite / 4.0"]; + protected array $defaultHeaders = ['User-Agent' => "Tim's Anime Client Testsuite / 4.0"]; }; $this->builder->setLogger(new NullLogger); diff --git a/tests/Ion/Di/ContainerAwareTest.php b/tests/Ion/Di/ContainerAwareTest.php index a8d752f4..ad51de10 100644 --- a/tests/Ion/Di/ContainerAwareTest.php +++ b/tests/Ion/Di/ContainerAwareTest.php @@ -31,7 +31,7 @@ class Aware { class ContainerAwareTest extends IonTestCase { - protected $aware; + protected Aware $aware; public function setUp(): void { diff --git a/tests/Ion/IonTestCase.php b/tests/Ion/IonTestCase.php index 6d30b374..e05fd553 100644 --- a/tests/Ion/IonTestCase.php +++ b/tests/Ion/IonTestCase.php @@ -18,6 +18,7 @@ namespace Aviat\Ion\Tests; use function Aviat\Ion\_dir; +use Aviat\Ion\Di\ContainerInterface; use PHPUnit\Framework\TestCase; use Laminas\Diactoros\ServerRequestFactory; @@ -31,7 +32,7 @@ class IonTestCase extends TestCase { public const TEST_DATA_DIR = __DIR__ . '/test_data'; public const TEST_VIEW_DIR = __DIR__ . '/test_views'; - protected $container; + protected ContainerInterface $container; protected static $staticContainer; protected static $session_handler; diff --git a/tests/Ion/Model/BaseDBModelTest.php b/tests/Ion/Model/BaseDBModelTest.php deleted file mode 100644 index 29cbcb5c..00000000 --- a/tests/Ion/Model/BaseDBModelTest.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion\Tests\Model; - -use Aviat\Ion\Model\DB as BaseDBModel; -use Aviat\Ion\Tests\IonTestCase; - -class BaseDBModelTest extends IonTestCase { - - public function testBaseDBModelSanity() - { - $baseDBModel = new BaseDBModel($this->container->get('config')); - $this->assertTrue(is_object($baseDBModel)); - } -} \ No newline at end of file diff --git a/tests/Ion/StringWrapperTest.php b/tests/Ion/StringWrapperTest.php deleted file mode 100644 index fd9743ec..00000000 --- a/tests/Ion/StringWrapperTest.php +++ /dev/null @@ -1,39 +0,0 @@ - - * @copyright 2015 - 2020 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 5 - * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\Ion\Tests; - -use Aviat\Ion\StringWrapper; -use Aviat\Ion\Type\StringType; -use PHPUnit\Framework\TestCase; - -class StringWrapperTest extends TestCase { - - protected $wrapper; - - public function setUp(): void { - $this->wrapper = new class { - use StringWrapper; - }; - } - - public function testString() - { - $str = $this->wrapper->string('foo'); - $this->assertInstanceOf(StringType::class, $str); - } - -} \ No newline at end of file diff --git a/tests/Ion/Type/ArrayTypeTest.php b/tests/Ion/Type/ArrayTypeTest.php index e91dd6cb..7c127e34 100644 --- a/tests/Ion/Type/ArrayTypeTest.php +++ b/tests/Ion/Type/ArrayTypeTest.php @@ -16,16 +16,10 @@ namespace Aviat\Ion\Tests\Type; -use Aviat\Ion\ArrayWrapper; +use Aviat\Ion\Type\ArrayType; use Aviat\Ion\Tests\IonTestCase; class ArrayTypeTest extends IonTestCase { - use ArrayWrapper; - - public function setUp(): void { - parent::setUp(); - } - public function dataCall() { $method_map = [ @@ -88,33 +82,37 @@ class ArrayTypeTest extends IonTestCase { * Test the array methods defined for the __Call method * * @dataProvider dataCall + * @param string $method + * @param array $array + * @param array $args + * @param $expected */ - public function testCall($method, $array, $args, $expected) + public function testCall(string $method, array $array, array $args, $expected): void { - $obj = $this->arr($array); + $obj = ArrayType::from($array); $actual = $obj->__call($method, $args); $this->assertEquals($expected, $actual); } - public function testSet() + public function testSet(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $arraytype = $obj->set('foo', 'bar'); - $this->assertInstanceOf('Aviat\Ion\Type\ArrayType', $arraytype); + $this->assertInstanceOf(ArrayType::class, $arraytype); $this->assertEquals('bar', $obj->get('foo')); } - public function testGet() + public function testGet(): void { $array = [1, 2, 3, 4, 5]; - $obj = $this->arr($array); + $obj = ArrayType::from($array); $this->assertEquals($array, $obj->get()); $this->assertEquals(1, $obj->get(0)); $this->assertEquals(5, $obj->get(4)); } - public function testGetDeepKey() + public function testGetDeepKey(): void { $arr = [ 'foo' => 'bar', @@ -122,14 +120,14 @@ class ArrayTypeTest extends IonTestCase { 'bar' => 'foobar' ] ]; - $obj = $this->arr($arr); + $obj = ArrayType::from($arr); $this->assertEquals('foobar', $obj->getDeepKey(['baz', 'bar'])); $this->assertNull($obj->getDeepKey(['foo', 'bar', 'baz'])); } - public function testMap() + public function testMap(): void { - $obj = $this->arr([1, 2, 3]); + $obj = ArrayType::from([1, 2, 3]); $actual = $obj->map(function($item) { return $item * 2; }); @@ -137,9 +135,9 @@ class ArrayTypeTest extends IonTestCase { $this->assertEquals([2, 4, 6], $actual); } - public function testBadCall() + public function testBadCall(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage("Method 'foo' does not exist"); @@ -147,20 +145,20 @@ class ArrayTypeTest extends IonTestCase { $obj->foo(); } - public function testShuffle() + public function testShuffle(): void { $original = [1, 2, 3, 4]; $test = [1, 2, 3, 4]; - $obj = $this->arr($test); + $obj = ArrayType::from($test); $actual = $obj->shuffle(); //$this->assertNotEquals($actual, $original); $this->assertTrue(is_array($actual)); } - public function testHasKey() + public function testHasKey(): void { - $obj = $this->arr([ + $obj = ArrayType::from([ 'a' => 'b', 'z' => 'y' ]); @@ -168,9 +166,9 @@ class ArrayTypeTest extends IonTestCase { $this->assertFalse($obj->hasKey('b')); } - public function testHasKeyArray() + public function testHasKeyArray(): void { - $obj = $this->arr([ + $obj = ArrayType::from([ 'foo' => [ 'bar' => [ 'baz' => [ @@ -191,23 +189,23 @@ class ArrayTypeTest extends IonTestCase { $this->assertFalse($obj->hasKey(['bar', 'baz'])); } - public function testHas() + public function testHas(): void { - $obj = $this->arr([1, 2, 6, 8, 11]); + $obj = ArrayType::from([1, 2, 6, 8, 11]); $this->assertTrue($obj->has(8)); $this->assertFalse($obj->has(8745)); } - public function testSearch() + public function testSearch(): void { - $obj = $this->arr([1, 2, 5, 7, 47]); + $obj = ArrayType::from([1, 2, 5, 7, 47]); $actual = $obj->search(47); $this->assertEquals(4, $actual); } - public function testFill() + public function testFill(): void { - $obj = $this->arr([]); + $obj = ArrayType::from([]); $expected = ['?', '?', '?']; $actual = $obj->fill(0, 3, '?'); $this->assertEquals($actual, $expected); diff --git a/tests/Ion/Type/StringTypeTest.php b/tests/Ion/Type/StringTypeTest.php index f12bc45e..44d4f2f9 100644 --- a/tests/Ion/Type/StringTypeTest.php +++ b/tests/Ion/Type/StringTypeTest.php @@ -16,14 +16,12 @@ namespace Aviat\Ion\Tests\Type; -use Aviat\Ion\StringWrapper; +use Aviat\Ion\Type\StringType; use Aviat\Ion\Tests\IonTestCase; class StringTypeTest extends IonTestCase { - use StringWrapper; - - public function dataFuzzyCaseMatch() + public function dataFuzzyCaseMatch(): array { return [ 'space separated' => [ @@ -56,10 +54,13 @@ class StringTypeTest extends IonTestCase { /** * @dataProvider dataFuzzyCaseMatch + * @param string $str1 + * @param string $str2 + * @param bool $expected */ - public function testFuzzyCaseMatch($str1, $str2, $expected) + public function testFuzzyCaseMatch(string $str1, string $str2, bool $expected): void { - $actual = $this->string($str1)->fuzzyCaseMatch($str2); + $actual = StringType::from($str1)->fuzzyCaseMatch($str2); $this->assertEquals($expected, $actual); } From 2d7d511ab1d5c7f14e8e90cf38a058e06a6c4c35 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Mon, 13 Apr 2020 09:20:05 -0400 Subject: [PATCH 08/27] More types --- composer.json | 2 +- tests/AnimeClient/RequirementsTest.php | 6 +++--- tests/AnimeClient/mocks.php | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index b166b893..875ff6cd 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "laminas/laminas-httphandlerrunner": "^1.0", "maximebf/consolekit": "^1.0", "monolog/monolog": "^2.0.1", - "php": "^7.4 || ^8", + "php": ">=7.4", "psr/container": "~1.0", "psr/http-message": "~1.0", "psr/log": "~1.0", diff --git a/tests/AnimeClient/RequirementsTest.php b/tests/AnimeClient/RequirementsTest.php index 22b2372a..20034ed9 100644 --- a/tests/AnimeClient/RequirementsTest.php +++ b/tests/AnimeClient/RequirementsTest.php @@ -20,17 +20,17 @@ use PDO; class RequirementsTest extends AnimeClientTestCase { - public function testPHPVersion() + public function testPHPVersion(): void { $this->assertTrue(version_compare(PHP_VERSION, "5.4", "ge")); } - public function testHasPDO() + public function testHasPDO(): void { $this->assertTrue(class_exists('PDO')); } - public function testHasPDOSqlite() + public function testHasPDOSqlite(): void { $drivers = PDO::getAvailableDrivers(); $this->assertTrue(in_array('sqlite', $drivers)); diff --git a/tests/AnimeClient/mocks.php b/tests/AnimeClient/mocks.php index 2584a1dd..270d49d2 100644 --- a/tests/AnimeClient/mocks.php +++ b/tests/AnimeClient/mocks.php @@ -32,24 +32,24 @@ class TestEnum extends Enum { } class FriendGrandParentTestClass { - protected $grandParentProtected = 84; + protected int $grandParentProtected = 84; } class FriendParentTestClass extends FriendGrandParentTestClass { - protected $parentProtected = 47; - private $parentPrivate = 654; + protected int $parentProtected = 47; + private int $parentPrivate = 654; } class FriendTestClass extends FriendParentTestClass { - protected $protected = 356; - private $private = 486; + protected int $protected = 356; + private int $private = 486; - protected function getProtected() + protected function getProtected(): int { return 4; } - private function getPrivate() + private function getPrivate(): int { return 23; } @@ -57,7 +57,7 @@ class FriendTestClass extends FriendParentTestClass { class TestTransformer extends AbstractTransformer { - public function transform($item) + public function transform($item): array { $out = []; $genre_list = (array) $item; @@ -95,7 +95,7 @@ trait MockViewOutputTrait { } class MockUtil { - public function get_cached_image($api_path, $series_slug, $type = "anime") + public function get_cached_image($api_path, $series_slug, $type = "anime"): string { return "/public/images/{$type}/{$series_slug}.jpg"; } @@ -144,7 +144,7 @@ trait MockInjectionTrait { class MockBaseApiModel extends BaseApiModel { use MockInjectionTrait; - protected $base_url = 'https://httpbin.org/'; + protected string $base_url = 'https://httpbin.org/'; protected function _get_list_from_api(string $status): array { From 9ba4354d29424374bea42d2efc0bb5d8fbc63d49 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 17 Apr 2020 13:19:43 -0400 Subject: [PATCH 09/27] Temporarily require develop of Query --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 875ff6cd..1126b89c 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "aura/router": "^3.0", "aura/session": "^2.0", "aviat/banker": "^2.0.0", - "aviat/query": "^2.5.1", + "aviat/query": "dev-develop", "danielstjules/stringy": "^3.1.0", "ext-dom": "*", "ext-iconv": "*", From 17fb2b4db492aa214f7bd60323b655f32cba4c75 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Fri, 17 Apr 2020 13:34:36 -0400 Subject: [PATCH 10/27] Update outdated interface reference --- src/AnimeClient/Model/Collection.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AnimeClient/Model/Collection.php b/src/AnimeClient/Model/Collection.php index b44cb196..c0c71b36 100644 --- a/src/AnimeClient/Model/Collection.php +++ b/src/AnimeClient/Model/Collection.php @@ -19,7 +19,7 @@ namespace Aviat\AnimeClient\Model; use Aviat\Ion\Di\ContainerInterface; use PDOException; -use Query\Query_Builder_Interface; +use Query\QueryBuilder; use function Query; /** @@ -29,9 +29,9 @@ class Collection extends DB { /** * The query builder object - * @var Query_Builder_Interface + * @var QueryBuilder */ - protected Query_Builder_Interface $db; + protected QueryBuilder $db; /** * Whether the database is valid for querying From da570d51678ff96441470bb3c763231ec9e3c35c Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Tue, 21 Apr 2020 19:22:56 -0400 Subject: [PATCH 11/27] Big Work in progress commit --- app/appConf/routes.php | 10 + app/views/history/anime.php | 20 ++ app/views/main-menu.php | 4 +- frontEndSrc/css/src/general.css | 5 + public/css/auto.min.css | 2 +- public/css/dark.min.css | 2 +- public/css/light.min.css | 2 +- src/AnimeClient/API/JsonAPI.php | 10 +- src/AnimeClient/API/Kitsu.php | 4 +- src/AnimeClient/API/Kitsu/Auth.php | 6 +- src/AnimeClient/API/Kitsu/KitsuTrait.php | 2 +- src/AnimeClient/API/Kitsu/Model.php | 110 ++++++++- .../Transformer/AnimeHistoryTransformer.php | 210 ++++++++++++++++++ src/AnimeClient/AnimeClient.php | 6 +- src/AnimeClient/Controller/Anime.php | 13 +- src/AnimeClient/Controller/History.php | 84 +++++++ src/AnimeClient/Controller/Manga.php | 11 +- src/AnimeClient/Model/Anime.php | 13 +- src/AnimeClient/Model/AnimeCollection.php | 11 +- src/AnimeClient/Model/Collection.php | 6 +- src/AnimeClient/Model/Manga.php | 12 +- src/AnimeClient/Types/AbstractType.php | 38 +++- src/AnimeClient/Types/Anime.php | 36 +-- src/AnimeClient/Types/HistoryItem.php | 51 +++++ src/Ion/View.php | 12 +- src/Ion/View/HtmlView.php | 6 +- src/Ion/View/HttpView.php | 2 +- src/Ion/View/JsonView.php | 5 +- 28 files changed, 601 insertions(+), 92 deletions(-) create mode 100644 app/views/history/anime.php create mode 100644 src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php create mode 100644 src/AnimeClient/Controller/History.php create mode 100644 src/AnimeClient/Types/HistoryItem.php diff --git a/app/appConf/routes.php b/app/appConf/routes.php index ba17aa55..6534c171 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -193,6 +193,16 @@ $routes = [ 'username' => '.*?' ] ], + 'anime_history' => [ + 'controller' => 'history', + 'path' => '/history/anime', + 'action' => 'anime', + ], + 'manga_history' => [ + 'controller' => 'history', + 'path' => '/history/manga', + 'action' => 'manga', + ], // --------------------------------------------------------------------- // Default / Shared routes // --------------------------------------------------------------------- diff --git a/app/views/history/anime.php b/app/views/history/anime.php new file mode 100644 index 00000000..826e267e --- /dev/null +++ b/app/views/history/anime.php @@ -0,0 +1,20 @@ +
    + +

    No recent watch history.

    + +
    + $item): ?> +
    +
    picture( + $item['coverImg'], + 'jpg', + ['width' => '110px', 'height' => '156px'], + ['width' => '110px', 'height' => '156px'] + ) ?>
    +
    +
    + +
    +
    + +
    diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 70059648..f38082d3 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -5,8 +5,8 @@ namespace Aviat\AnimeClient; $whose = $config->get('whose_list') . "'s "; $lastSegment = $urlGenerator->lastSegment(); $extraSegment = $lastSegment === 'list' ? '/list' : ''; -$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') !== FALSE; -$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') !== FALSE; +$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') === 1; +$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') === 1; ?>
    -
    diff --git a/src/AnimeClient/Types/Anime.php b/src/AnimeClient/Types/Anime.php index c1c95710..b848669c 100644 --- a/src/AnimeClient/Types/Anime.php +++ b/src/AnimeClient/Types/Anime.php @@ -25,7 +25,7 @@ class Anime extends AbstractType { /** * @var string */ - public string $age_rating = ''; + public ?string $age_rating = ''; /** * @var string @@ -53,9 +53,9 @@ class Anime extends AbstractType { public array $genres = []; /** - * @var string + * @var string|int */ - public string $id = ''; + public $id = ''; /** * @var array diff --git a/tests/AnimeClient/DispatcherTest.php b/tests/AnimeClient/DispatcherTest.php index 3f16fd78..91832a1d 100644 --- a/tests/AnimeClient/DispatcherTest.php +++ b/tests/AnimeClient/DispatcherTest.php @@ -216,6 +216,7 @@ class DispatcherTest extends AnimeClientTestCase { 'settings' => Controller\Settings::class, 'user' => Controller\User::class, 'images' => Controller\Images::class, + 'history' => Controller\History::class, ]; return [ From 3f2c23ab967c3a95e70c927d1b018b4ee8b9c982 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Tue, 21 Apr 2020 20:10:01 -0400 Subject: [PATCH 13/27] Fix aggregation of anime watch history items --- CHANGELOG.md | 2 ++ .../API/Kitsu/Transformer/AnimeHistoryTransformer.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ddbd71..2a39f112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,12 @@ ## Version 5 * Updated PHP requirement to 7.4 +* Added anime history view ## Version 4.2 * Updated dependencies * Updated PHP requirement to 7.3 +* Added option to automatically set dark mode based on the OS setting ## Version 4.1 * Added optional dark theme diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php index f8af2635..588008a2 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php @@ -69,12 +69,12 @@ class AnimeHistoryTransformer { protected function aggregate (array $singles): array { $output = []; - $prevTitle = ''; $count = count($singles); for ($i = 0; $i < $count; $i++) { $entry = $singles[$i]; + $prevTitle = $entry['title']; $nextId = $i + 1; if ($nextId < $count) { From 12be7b8a1eddf1d66d0d708c9742aff35a6e72d5 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Tue, 21 Apr 2020 20:37:42 -0400 Subject: [PATCH 14/27] Fix off-by-one errors --- .../Transformer/AnimeHistoryTransformer.php | 43 ++++++++----------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php index 588008a2..e5e8a8fd 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php @@ -73,30 +73,26 @@ class AnimeHistoryTransformer { $count = count($singles); for ($i = 0; $i < $count; $i++) { + $entries = []; $entry = $singles[$i]; $prevTitle = $entry['title']; - $nextId = $i + 1; - if ($nextId < $count) - { - $entries = []; - $next = $singles[$nextId]; - while ( - $next['kind'] === 'progressed' && - $next['title'] === $prevTitle - ) { - $entries[] = $next; - $prevTitle = $next['title']; + $nextId = $i; + $next = $singles[$nextId]; + while ( + $next['kind'] === 'progressed' && + $next['title'] === $prevTitle + ) { + $entries[] = $next; + $prevTitle = $next['title']; - if ($nextId + 1 < $count) - { - $nextId++; - $next = $singles[$nextId]; - } - else - { - break; - } + if ($nextId + 1 < $count) + { + $nextId++; + $next = $singles[$nextId]; + continue; } + + break; } if (count($entries) > 1) @@ -112,9 +108,6 @@ class AnimeHistoryTransformer { $title = $entries[0]['title']; - // Get rid of the single entry added before aggregating - // array_pop($output); - $action = (count($entries) > 3) ? "Marathoned episodes {$firstEpisode}-{$lastEpisode} of {$title}" : "Watched episodes {$firstEpisode}-{$lastEpisode} of {$title}"; @@ -128,13 +121,11 @@ class AnimeHistoryTransformer { ]); // Skip the rest of the aggregate in the main loop - $i += count($entries); - $prevTitle = $title; + $i += count($entries) - 1; continue; } else { - $prevTitle = $entry['title']; $output[] = $entry; } From f2991cd4169fa2fe8136194d9eabd1533e3f722a Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 22 Apr 2020 07:53:52 -0400 Subject: [PATCH 15/27] Convert Type constructors to static methods --- index.php | 2 +- src/AnimeClient/API/Anilist/ListItem.php | 12 ++++++------ .../API/Anilist/MissingIdException.php | 4 +++- .../Transformer/AnimeListTransformer.php | 2 +- .../Transformer/MangaListTransformer.php | 4 ++-- src/AnimeClient/API/Kitsu/Model.php | 13 +++++++++---- .../Transformer/AnimeHistoryTransformer.php | 7 ++++--- .../Kitsu/Transformer/AnimeListTransformer.php | 4 ++-- .../API/Kitsu/Transformer/AnimeTransformer.php | 2 +- .../Kitsu/Transformer/CharacterTransformer.php | 2 +- .../Kitsu/Transformer/MangaListTransformer.php | 8 ++++---- .../API/Kitsu/Transformer/MangaTransformer.php | 2 +- .../Kitsu/Transformer/PersonTransformer.php | 2 +- .../API/Kitsu/Transformer/UserTransformer.php | 2 +- src/AnimeClient/Command/SyncLists.php | 18 ++++++++++-------- src/AnimeClient/Controller/Anime.php | 5 ++--- src/AnimeClient/Controller/Character.php | 2 +- src/AnimeClient/Controller/Manga.php | 4 ++-- src/AnimeClient/Model/Anime.php | 2 +- src/AnimeClient/Types/AbstractType.php | 13 ++++++++++++- src/AnimeClient/Types/AnimeListItem.php | 2 +- src/AnimeClient/Types/Character.php | 2 +- src/AnimeClient/Types/Config.php | 6 +++--- src/AnimeClient/Types/FormItem.php | 2 +- src/AnimeClient/Types/Person.php | 2 +- .../Transformer/MangaListTransformerTest.php | 4 ++-- 26 files changed, 74 insertions(+), 54 deletions(-) diff --git a/index.php b/index.php index ad20d92f..1b2a30d1 100644 --- a/index.php +++ b/index.php @@ -61,7 +61,7 @@ $overrideConfig = file_exists($overrideFile) $configArray = array_replace_recursive($baseConfig, $config, $overrideConfig); -$checkedConfig = (new ConfigType($configArray))->toArray(); +$checkedConfig = ConfigType::check($configArray); $container = $di($checkedConfig); // Unset 'constants' diff --git a/src/AnimeClient/API/Anilist/ListItem.php b/src/AnimeClient/API/Anilist/ListItem.php index 8bf67fd1..43daab9e 100644 --- a/src/AnimeClient/API/Anilist/ListItem.php +++ b/src/AnimeClient/API/Anilist/ListItem.php @@ -37,7 +37,7 @@ final class ListItem extends AbstractListItem { */ public function create(array $data): Request { - $checkedData = (new Types\MediaListEntry($data))->toArray(); + $checkedData = Types\MediaListEntry::check($data); return $this->mutateRequest('CreateMediaListEntry', $checkedData); } @@ -49,7 +49,7 @@ final class ListItem extends AbstractListItem { */ public function createFull(array $data): Request { - $checkedData = (new Types\MediaListEntry($data))->toArray(); + $checkedData = Types\MediaListEntry::check($data); return $this->mutateRequest('CreateFullMediaListEntry', $checkedData); } @@ -85,10 +85,10 @@ final class ListItem extends AbstractListItem { */ public function increment(string $id, FormItemData $data): Request { - $checkedData = (new Types\MediaListEntry([ + $checkedData = Types\MediaListEntry::check([ 'id' => $id, 'progress' => $data->progress, - ]))->toArray(); + ]); return $this->mutateRequest('IncrementMediaListEntry', $checkedData); } @@ -110,7 +110,7 @@ final class ListItem extends AbstractListItem { ? AnilistStatus::REPEATING : AnimeWatchingStatus::KITSU_TO_ANILIST[$data->status]; - $updateData = (new Types\MediaListEntry([ + $updateData = Types\MediaListEntry::check([ 'id' => (int)$id, 'status' => $status, 'score' => $rating * 5, @@ -118,7 +118,7 @@ final class ListItem extends AbstractListItem { 'repeat' => (int)$data['reconsumeCount'], 'private' => $private, 'notes' => $notes, - ]))->toArray(); + ]); return $this->mutateRequest('UpdateMediaListEntry', $updateData); } diff --git a/src/AnimeClient/API/Anilist/MissingIdException.php b/src/AnimeClient/API/Anilist/MissingIdException.php index e83cac8c..afe86847 100644 --- a/src/AnimeClient/API/Anilist/MissingIdException.php +++ b/src/AnimeClient/API/Anilist/MissingIdException.php @@ -16,4 +16,6 @@ namespace Aviat\AnimeClient\API\Anilist; -class MissingIdException extends \InvalidArgumentException {} \ No newline at end of file +use InvalidArgumentException; + +class MissingIdException extends InvalidArgumentException {} \ No newline at end of file diff --git a/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php index 51429387..464d423c 100644 --- a/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Anilist/Transformer/AnimeListTransformer.php @@ -42,7 +42,7 @@ class AnimeListTransformer extends AbstractTransformer { { $reconsuming = $item['status'] === AnilistStatus::REPEATING; - return new FormItem([ + return FormItem::from([ 'id' => $item['id'], 'mal_id' => $item['media']['idMal'], 'data' => [ diff --git a/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php index f7ca4073..184dd73a 100644 --- a/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Anilist/Transformer/MangaListTransformer.php @@ -29,7 +29,7 @@ class MangaListTransformer extends AbstractTransformer { public function transform($item) { - return new MangaListItem([]); + return MangaListItem::from([]); } /** @@ -40,7 +40,7 @@ class MangaListTransformer extends AbstractTransformer { */ public function untransform(array $item): FormItem { - return new FormItem([ + return FormItem::from([ 'id' => $item['id'], 'mal_id' => $item['media']['idMal'], 'data' => [ diff --git a/src/AnimeClient/API/Kitsu/Model.php b/src/AnimeClient/API/Kitsu/Model.php index f8dc19d2..867bbd3a 100644 --- a/src/AnimeClient/API/Kitsu/Model.php +++ b/src/AnimeClient/API/Kitsu/Model.php @@ -184,7 +184,9 @@ final class Model { public function getAnimeHistory(): array { $raw = $this->getRawHistoryList('anime'); - $organized = JsonAPI::organizeData($raw); + $organized = (array)JsonAPI::organizeData($raw); + + $organized = array_filter($organized, fn ($item) => array_key_exists('relationships', $item)); $transformer = new AnimeHistoryTransformer(); $transformer->setContainer($this->getContainer()); @@ -202,8 +204,11 @@ final class Model { public function getMangaHistory(): array { $raw = $this->getRawHistoryList('manga'); + $organized = (array)JsonAPI::organizeData($raw); - return JsonAPI::organizeData($raw); + $organized = array_filter($organized, fn ($item) => array_key_exists('relationships', $item)); + + return $organized; } /** @@ -413,7 +418,7 @@ final class Model { if (empty($baseData)) { - return (new Anime([]))->toArray(); + return Anime::from([]); } return $this->animeTransformer->transform($baseData); @@ -669,7 +674,7 @@ final class Model { if (empty($baseData)) { - return new MangaPage([]); + return MangaPage::from([]); } return $this->mangaTransformer->transform($baseData); diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php index e5e8a8fd..f6a00817 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeHistoryTransformer.php @@ -47,11 +47,13 @@ class AnimeHistoryTransformer { continue; } - if ($entry['attributes']['kind'] === 'progressed') + $kind = $entry['attributes']['kind']; + + if ($kind === 'progressed') { $output[] = $this->transformProgress($entry); } - else if ($entry['attributes']['kind'] === 'updated') + else if ($kind === 'updated') { $output[] = $this->transformUpdated($entry); } @@ -128,7 +130,6 @@ class AnimeHistoryTransformer { { $output[] = $entry; } - } return $output; diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php index 5c0d8ff8..6db15c4a 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeListTransformer.php @@ -80,7 +80,7 @@ final class AnimeListTransformer extends AbstractTransformer { $titles = Kitsu::filterTitles($anime); $title = array_shift($titles); - return new AnimeListItem([ + return AnimeListItem::from([ 'id' => $item['id'], 'mal_id' => $MALid, 'episodes' => [ @@ -127,7 +127,7 @@ final class AnimeListTransformer extends AbstractTransformer { $privacy = (array_key_exists('private', $item) && $item['private']); $rewatching = (array_key_exists('rewatching', $item) && $item['rewatching']); - $untransformed = new FormItem([ + $untransformed = FormItem::from([ 'id' => $item['id'], 'anilist_item_id' => $item['anilist_item_id'] ?? NULL, 'mal_id' => $item['mal_id'] ?? NULL, diff --git a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php index 5a339567..e0b049b0 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/AnimeTransformer.php @@ -105,7 +105,7 @@ final class AnimeTransformer extends AbstractTransformer { ksort($characters); ksort($staff); - return new AnimePage([ + return AnimePage::from([ 'age_rating' => $item['ageRating'], 'age_rating_guide' => $item['ageRatingGuide'], 'characters' => $characters, diff --git a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php index 41b3e509..17a259fc 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/CharacterTransformer.php @@ -66,7 +66,7 @@ final class CharacterTransformer extends AbstractTransformer { } } - return new Character([ + return Character::from([ 'castings' => $castings, 'description' => $attributes['description'], 'id' => $data[0]['id'], diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php index e8b5570f..2dc0f527 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaListTransformer.php @@ -82,7 +82,7 @@ final class MangaListTransformer extends AbstractTransformer { $titles = Kitsu::filterTitles($manga); $title = array_shift($titles); - return new MangaListItem([ + return MangaListItem::from([ 'id' => $item['id'], 'mal_id' => $MALid, 'chapters' => [ @@ -93,7 +93,7 @@ final class MangaListTransformer extends AbstractTransformer { 'read' => '-', //$item['attributes']['volumes_read'], 'total' => $totalVolumes ], - 'manga' => new MangaListItemDetail([ + 'manga' => MangaListItemDetail::from([ 'genres' => $genres, 'id' => $mangaId, 'image' => $manga['posterImage']['small'], @@ -121,10 +121,10 @@ final class MangaListTransformer extends AbstractTransformer { { $rereading = array_key_exists('rereading', $item) && (bool)$item['rereading']; - $map = new FormItem([ + $map = FormItem::from([ 'id' => $item['id'], 'mal_id' => $item['mal_id'], - 'data' => new FormItemData([ + 'data' => FormItemData::from([ 'status' => $item['status'], 'reconsuming' => $rereading, 'reconsumeCount' => (int)$item['reread_count'], diff --git a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php index 3d2d4e08..c5018318 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/MangaTransformer.php @@ -113,7 +113,7 @@ final class MangaTransformer extends AbstractTransformer { ksort($characters); ksort($staff); - return new MangaPage([ + return MangaPage::from([ 'characters' => $characters, 'chapter_count' => $this->count($item['chapterCount']), 'cover_image' => $item['posterImage']['small'], diff --git a/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php index 93fb6e21..6b2daa8d 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/PersonTransformer.php @@ -36,7 +36,7 @@ final class PersonTransformer extends AbstractTransformer { $orgData = $this->organizeData($included); - return new Person([ + return Person::from([ 'id' => $data['id'], 'name' => $data['attributes']['name'], 'characters' => $orgData['characters'], diff --git a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php index 4af2896f..44424413 100644 --- a/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php +++ b/src/AnimeClient/API/Kitsu/Transformer/UserTransformer.php @@ -55,7 +55,7 @@ final class UserTransformer extends AbstractTransformer { ]; } - return new User([ + return User::from([ 'about' => $attributes['about'], 'avatar' => getLocalImg($attributes['avatar']['original'], FALSE), 'favorites' => $this->organizeFavorites($favorites), diff --git a/src/AnimeClient/Command/SyncLists.php b/src/AnimeClient/Command/SyncLists.php index 510cb352..b29e1226 100644 --- a/src/AnimeClient/Command/SyncLists.php +++ b/src/AnimeClient/Command/SyncLists.php @@ -34,6 +34,8 @@ use Aviat\Ion\Di\Exception\ContainerException; use Aviat\Ion\Di\Exception\NotFoundException; use Aviat\Ion\Json; use DateTime; +use Throwable; +use function in_array; /** * Syncs list data between Anilist and Kitsu @@ -59,7 +61,7 @@ final class SyncLists extends BaseCommand { * @param array $options * @throws ContainerException * @throws NotFoundException - * @throws \Throwable + * @throws Throwable */ public function execute(array $args, array $options = []): void { @@ -88,7 +90,7 @@ final class SyncLists extends BaseCommand { * Attempt to synchronize external APIs * * @param string $type - * @throws \Throwable + * @throws Throwable */ protected function sync(string $type): void { @@ -344,12 +346,12 @@ final class SyncLists extends BaseCommand { continue; } - if (\in_array('kitsu', $item['updateType'], TRUE)) + if (in_array('kitsu', $item['updateType'], TRUE)) { $kitsuUpdateItems[] = $item['data']; } - if (\in_array('anilist', $item['updateType'], TRUE)) + if (in_array('anilist', $item['updateType'], TRUE)) { $anilistUpdateItems[] = $item['data']; } @@ -589,7 +591,7 @@ final class SyncLists extends BaseCommand { * @param array $itemsToUpdate * @param string $action * @param string $type - * @throws \Throwable + * @throws Throwable */ protected function updateKitsuListItems(array $itemsToUpdate, string $action = 'update', string $type = 'anime'): void { @@ -599,7 +601,7 @@ final class SyncLists extends BaseCommand { if ($action === 'update') { $requester->addRequest( - $this->kitsuModel->updateListItem(new FormItem($item)) + $this->kitsuModel->updateListItem(FormItem::from($item)) ); } else if ($action === 'create') @@ -653,7 +655,7 @@ final class SyncLists extends BaseCommand { * @param array $itemsToUpdate * @param string $action * @param string $type - * @throws \Throwable + * @throws Throwable */ protected function updateAnilistListItems(array $itemsToUpdate, string $action = 'update', string $type = 'anime'): void { @@ -664,7 +666,7 @@ final class SyncLists extends BaseCommand { if ($action === 'update') { $requester->addRequest( - $this->anilistModel->updateListItem(new FormItem($item), $type) + $this->anilistModel->updateListItem(FormItem::from($item), $type) ); } else if ($action === 'create') diff --git a/src/AnimeClient/Controller/Anime.php b/src/AnimeClient/Controller/Anime.php index 2e99c30f..6000fd3b 100644 --- a/src/AnimeClient/Controller/Anime.php +++ b/src/AnimeClient/Controller/Anime.php @@ -179,7 +179,6 @@ final class Anime extends BaseController { * * @param string $id * @param string $status - * @throws RouteNotFound */ public function edit(string $id, $status = 'all'): void { @@ -231,7 +230,7 @@ final class Anime extends BaseController { // large form-based updates $transformer = new AnimeListTransformer(); $postData = $transformer->untransform($data); - $fullResult = $this->model->updateLibraryItem(new FormItem($postData)); + $fullResult = $this->model->updateLibraryItem(FormItem::from($postData)); if ($fullResult['statusCode'] === 200) { @@ -271,7 +270,7 @@ final class Anime extends BaseController { die(); } - $response = $this->model->incrementLibraryItem(new FormItem($data)); + $response = $this->model->incrementLibraryItem(FormItem::from($data)); $this->cache->clear(); $this->outputJSON($response['body'], $response['statusCode']); diff --git a/src/AnimeClient/Controller/Character.php b/src/AnimeClient/Controller/Character.php index 755e6824..1cad4244 100644 --- a/src/AnimeClient/Controller/Character.php +++ b/src/AnimeClient/Controller/Character.php @@ -27,7 +27,7 @@ use Aviat\Ion\Di\Exception\NotFoundException; /** * Controller for character description pages */ -class Character extends BaseController { +final class Character extends BaseController { /** * @var Model diff --git a/src/AnimeClient/Controller/Manga.php b/src/AnimeClient/Controller/Manga.php index 65754ba1..7e3c88e8 100644 --- a/src/AnimeClient/Controller/Manga.php +++ b/src/AnimeClient/Controller/Manga.php @@ -231,7 +231,7 @@ final class Manga extends Controller { // large form-based updates $transformer = new MangaListTransformer(); $post_data = $transformer->untransform($data); - $full_result = $this->model->updateLibraryItem(new FormItem($post_data)); + $full_result = $this->model->updateLibraryItem(FormItem::from($post_data)); if ($full_result['statusCode'] === 200) { @@ -264,7 +264,7 @@ final class Manga extends Controller { $data = $this->request->getParsedBody(); } - $response = $this->model->incrementLibraryItem(new FormItem($data)); + $response = $this->model->incrementLibraryItem(FormItem::from($data)); $this->cache->clear(); $this->outputJSON($response['body'], $response['statusCode']); diff --git a/src/AnimeClient/Model/Anime.php b/src/AnimeClient/Model/Anime.php index e89eed2d..cdaeb93b 100644 --- a/src/AnimeClient/Model/Anime.php +++ b/src/AnimeClient/Model/Anime.php @@ -167,7 +167,7 @@ class Anime extends API { $array['notes'] = ''; } - return new AnimeListItem($array); + return AnimeListItem::from($array); } /** diff --git a/src/AnimeClient/Types/AbstractType.php b/src/AnimeClient/Types/AbstractType.php index 07acea1d..69094237 100644 --- a/src/AnimeClient/Types/AbstractType.php +++ b/src/AnimeClient/Types/AbstractType.php @@ -49,12 +49,23 @@ abstract class AbstractType implements ArrayAccess, Countable { return NULL; } + /** + * Static constructor + * + * @param mixed $data + * @return static + */ + final public static function from($data): self + { + return new static($data); + } + /** * Sets the properties by using the constructor * * @param mixed $data */ - final public function __construct($data = []) + final private function __construct($data = []) { $typeKeys = array_keys((array)$this); $dataKeys = array_keys((array)$data); diff --git a/src/AnimeClient/Types/AnimeListItem.php b/src/AnimeClient/Types/AnimeListItem.php index a77675a4..8144159c 100644 --- a/src/AnimeClient/Types/AnimeListItem.php +++ b/src/AnimeClient/Types/AnimeListItem.php @@ -92,6 +92,6 @@ final class AnimeListItem extends AbstractType { public function setAnime($anime): void { - $this->anime = new Anime($anime); + $this->anime = Anime::from($anime); } } diff --git a/src/AnimeClient/Types/Character.php b/src/AnimeClient/Types/Character.php index d509f58d..8dc9d43a 100644 --- a/src/AnimeClient/Types/Character.php +++ b/src/AnimeClient/Types/Character.php @@ -62,6 +62,6 @@ final class Character extends AbstractType { public function setMedia ($media): void { - $this->media = new Media($media); + $this->media = Media::from($media); } } \ No newline at end of file diff --git a/src/AnimeClient/Types/Config.php b/src/AnimeClient/Types/Config.php index 99ce5d42..6a6f4d59 100644 --- a/src/AnimeClient/Types/Config.php +++ b/src/AnimeClient/Types/Config.php @@ -162,16 +162,16 @@ class Config extends AbstractType { public function setAnilist ($data): void { - $this->anilist = new Config\Anilist($data); + $this->anilist = Config\Anilist::from($data); } public function setCache ($data): void { - $this->cache = new Config\Cache($data); + $this->cache = Config\Cache::from($data); } public function setDatabase ($data): void { - $this->database = new Config\Database($data); + $this->database = Config\Database::from($data); } } \ No newline at end of file diff --git a/src/AnimeClient/Types/FormItem.php b/src/AnimeClient/Types/FormItem.php index ff7651d6..8bf00e62 100644 --- a/src/AnimeClient/Types/FormItem.php +++ b/src/AnimeClient/Types/FormItem.php @@ -42,7 +42,7 @@ class FormItem extends AbstractType { public function setData($value): void { - $this->data = new FormItemData($value); + $this->data = FormItemData::from($value); } } diff --git a/src/AnimeClient/Types/Person.php b/src/AnimeClient/Types/Person.php index b7606a0c..2865d12a 100644 --- a/src/AnimeClient/Types/Person.php +++ b/src/AnimeClient/Types/Person.php @@ -42,6 +42,6 @@ final class Person extends AbstractType { public function setCharacters($characters): void { - $this->characters = new Characters($characters); + $this->characters = Characters::from($characters); } } \ No newline at end of file diff --git a/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php b/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php index b99809d2..100a9f50 100644 --- a/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php +++ b/tests/AnimeClient/API/Kitsu/Transformer/MangaListTransformerTest.php @@ -85,10 +85,10 @@ class MangaListTransformerTest extends AnimeClientTestCase { ]; $actual = $this->transformer->untransform($input); - $expected = new FormItem([ + $expected = FormItem::from([ 'id' => '15084773', 'mal_id' => '26769', - 'data' => new FormItemData([ + 'data' => FormItemData::from([ 'status' => 'current', 'progress' => 67, 'reconsuming' => false, From 4d6c15b0309f320bf0e56e12d8c1cb160f9b695a Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 22 Apr 2020 11:39:44 -0400 Subject: [PATCH 16/27] Add menu items for history, add manga reading history --- app/appConf/menus.toml | 30 +-- app/appConf/routes.php | 17 +- app/views/history.php | 45 ++++ app/views/history/anime.php | 19 -- app/views/main-menu.php | 6 +- index.php | 27 ++- src/AnimeClient/API/Kitsu/Model.php | 12 +- .../Transformer/AnimeHistoryTransformer.php | 56 +++-- .../Transformer/MangaHistoryTransformer.php | 218 ++++++++++++++++++ src/AnimeClient/Controller/History.php | 40 +++- src/AnimeClient/Model/Settings.php | 7 +- src/AnimeClient/Types/Config.php | 5 + src/AnimeClient/Types/HistoryItem.php | 16 +- src/AnimeClient/constants.php | 6 + 14 files changed, 415 insertions(+), 89 deletions(-) create mode 100644 app/views/history.php delete mode 100644 app/views/history/anime.php create mode 100644 src/AnimeClient/API/Kitsu/Transformer/MangaHistoryTransformer.php diff --git a/app/appConf/menus.toml b/app/appConf/menus.toml index fd1df9fa..0f7df3b6 100644 --- a/app/appConf/menus.toml +++ b/app/appConf/menus.toml @@ -1,19 +1,21 @@ [anime_list] - route_prefix = "/anime" + route_prefix = "" [anime_list.items] - watching = '/watching' - plan_to_watch = '/plan_to_watch' - on_hold = '/on_hold' - dropped = '/dropped' - completed = '/completed' - all = '/all' + watch_history = '/history/anime' + watching = '/anime/watching' + plan_to_watch = '/anime/plan_to_watch' + on_hold = '/anime/on_hold' + dropped = '/anime/dropped' + completed = '/anime/completed' + all = '/anime/all' [manga_list] - route_prefix = "/manga" + route_prefix = "" [manga_list.items] - reading = '/reading' - plan_to_read = '/plan_to_read' - on_hold = '/on_hold' - dropped = '/dropped' - completed = '/completed' - all = '/all' \ No newline at end of file + reading_history = '/history/manga' + reading = '/manga/reading' + plan_to_read = '/manga/plan_to_read' + on_hold = '/manga/on_hold' + dropped = '/manga/dropped' + completed = '/manga/completed' + all = '/manga/all' \ No newline at end of file diff --git a/app/appConf/routes.php b/app/appConf/routes.php index 6534c171..3f7c62ab 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -193,16 +193,6 @@ $routes = [ 'username' => '.*?' ] ], - 'anime_history' => [ - 'controller' => 'history', - 'path' => '/history/anime', - 'action' => 'anime', - ], - 'manga_history' => [ - 'controller' => 'history', - 'path' => '/history/manga', - 'action' => 'manga', - ], // --------------------------------------------------------------------- // Default / Shared routes // --------------------------------------------------------------------- @@ -289,6 +279,13 @@ $routes = [ 'view' => ALPHA_SLUG_PATTERN, ], ], + 'history' => [ + 'controller' => 'history', + 'path' => '/history/{type}', + 'tokens' => [ + 'type' => SLUG_PATTERN + ] + ], 'index_redirect' => [ 'path' => '/', 'action' => 'redirectToDefaultRoute', diff --git a/app/views/history.php b/app/views/history.php new file mode 100644 index 00000000..a1783f65 --- /dev/null +++ b/app/views/history.php @@ -0,0 +1,45 @@ +
    + +

    No recent history.

    + +
    + $item): ?> +
    +
    picture( + $item['coverImg'], + 'jpg', + ['width' => '110px', 'height' => '156px'], + ['width' => '110px', 'height' => '156px'] + ) ?>
    +
    + +
    +
    + +
    + + $date->format('l, F d'), + $item['dateRange'] + ); + [$startTime, $endTime] = array_map( + fn ($date) => $date->format('h:i:s A'), + $item['dateRange'] + ); + ?> + + + + + + + format('l, F d h:i:s A') ?> + + +
    +
    + +
    + +
    diff --git a/app/views/history/anime.php b/app/views/history/anime.php deleted file mode 100644 index 4d12b7bf..00000000 --- a/app/views/history/anime.php +++ /dev/null @@ -1,19 +0,0 @@ -
    - -

    No recent watch history.

    - -
    - $item): ?> -
    -
    picture( - $item['coverImg'], - 'jpg', - ['width' => '110px', 'height' => '156px'], - ['width' => '110px', 'height' => '156px'] - ) ?>
    -
    -
    - -
    - -
    diff --git a/app/views/main-menu.php b/app/views/main-menu.php index f38082d3..0a3524d6 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -5,8 +5,8 @@ namespace Aviat\AnimeClient; $whose = $config->get('whose_list') . "'s "; $lastSegment = $urlGenerator->lastSegment(); $extraSegment = $lastSegment === 'list' ? '/list' : ''; -$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') === 1; -$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') === 1; +$hasAnime = stripos($_SERVER['REQUEST_URI'], 'anime') !== FALSE; +$hasManga = stripos($_SERVER['REQUEST_URI'], 'manga') !== FALSE; ?>