From c44c5f88a93b922b41061e20805ff4cba569e9f1 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 12 Dec 2023 08:56:26 +0100 Subject: [PATCH 1/6] add gh workflows --- .github/workflows/lint-info-xml.yml | 14 +++----- .github/workflows/lint-php.yml | 54 +++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/lint-php.yml diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml index 8f024cfc..bf6f1787 100644 --- a/.github/workflows/lint-info-xml.yml +++ b/.github/workflows/lint-info-xml.yml @@ -3,15 +3,9 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: Lint +name: Lint info.xml -on: - pull_request: - push: - branches: - - main - - master - - stable* +on: pull_request permissions: contents: read @@ -27,13 +21,13 @@ jobs: name: info.xml lint steps: - name: Checkout - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Download schema run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd - name: Lint info.xml - uses: ChristophWurst/xmllint-action@d18a551aab4728e4af449617638600634d7a48cb # v1 + uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2 with: xml-file: ./appinfo/info.xml xml-schema-file: ./info.xsd diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 00000000..dfe72467 --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -0,0 +1,54 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint php + +on: pull_request + +permissions: + contents: read + +concurrency: + group: lint-php-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + php-lint: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: [ '8.0', '8.1', '8.2', '8.3' ] + + name: php-lint + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + ini-file: development + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Lint + run: composer run lint + + summary: + permissions: + contents: none + runs-on: ubuntu-latest + needs: php-lint + + if: always() + + name: php-lint-summary + + steps: + - name: Summary status + run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi From 64789ba4f8a7ad800aa7e5fd1c00c4711a7b9ee7 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 12 Dec 2023 08:56:41 +0100 Subject: [PATCH 2/6] add release script --- .nextcloudignore | 39 ++++++++++++++++++++ .scripts/release.sh | 87 +++++++++++++++++++++++++++++++++++++++++++++ krankerl.toml | 6 ++++ 3 files changed, 132 insertions(+) create mode 100644 .nextcloudignore create mode 100755 .scripts/release.sh create mode 100644 krankerl.toml diff --git a/.nextcloudignore b/.nextcloudignore new file mode 100644 index 00000000..2c8756c6 --- /dev/null +++ b/.nextcloudignore @@ -0,0 +1,39 @@ +/build/ +/.git +/.github +/docs/ +/tests +/babel.config.js +/.editorconfig +/.eslintrc.js +/.nextcloudignore +/webpack.*.js +/.codecov.yml +/composer.json +/composer.lock +/_config.yml +/.drone.yml +/.travis.yml +/.eslintignore +/.eslintrc.yml +/.gitignore +/issue_template.md +/krankerl.toml +/Makefile +/mkdocs.yml +/run-eslint.sh +/package.json +/package-lock.json +/node_modules/ +/src/ +.gitattributes +.l10nignore +.php-cs-fixer.dist.php +.tx +phpunit.integration.xml +phpunit.xml +psalm.xml +stylelint.config.js +webpack.js +releaseNotes.md +/.scripts diff --git a/.scripts/release.sh b/.scripts/release.sh new file mode 100755 index 00000000..50324783 --- /dev/null +++ b/.scripts/release.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash + +cd .. + +echo +echo "πŸš€ Lets make a new release!" +echo "===========================" +echo +echo "Preparation steps:" +echo " 🚨 Run this from inside the folder .scripts" +echo " πŸ§‘β€πŸ’» krankerl is installed" +echo " πŸ” Sign keys are under '~/.nextcloud'" +echo +echo " βœ… All code changes are committed and merged" +echo " πŸ€ CI is green" +echo +echo " πŸ’― Version number bumped" +echo " πŸ’¬ File 'releaseNotes.md' is up to date" +echo " πŸ“Ί Update screenshots if needed" +echo +read -r -p "Are all the prepare steps done? [y/N] " CONFIRMATION + +if [[ "$CONFIRMATION" == "n" || "$CONFIRMATION" == "N" || -z "$CONFIRMATION" ]]; then + echo + echo "Aboard, please prepare carefully." + exit 1 +fi + +echo +read -r -p "Give me the release name (eg 'v0.6.0' or 'v0.6.0-beta.1'): " NAME + +if [[ -z "$NAME" ]]; then + echo + echo "πŸ™„ Aboard, you have to give me a name." + exit 1 +fi + +echo +echo "# Build package" +echo "krankerl package" +echo "=========================" +krankerl package + +echo +echo "# create tag for this release" +echo "git tag -a $NAME -m '$NAME'" +echo "=========================" +git tag -a "$NAME" -m "$NAME" + +echo +echo "# push tag to repo origin" +echo "git push -u origin $NAME" +echo "=========================" +git push -u origin "$NAME" + +# echo +# echo "# push tag to repo releases" +# echo "git push -u releases $NAME" +# echo "=========================" +# git push -u releases "$NAME" + +echo +echo "# publish at github repo origin" +echo "gh release --repo nextcloud/health create '$NAME' ./build/artifacts/health.tar.gz --notes-file releaseNotes.md -t 'Nextcloud health $NAME'" +echo "=========================" +gh release --repo nextcloud/health create "$NAME" ./build/artifacts/health.tar.gz --notes-file releaseNotes.md -t "Nextcloud health $NAME" + +# echo +# echo "# publish at github repo releases" +# echo "gh release --repo nextcloud-releases/health create '$NAME' ./build/artifacts/health.tar.gz --notes-file releaseNotes.md -t 'Nextcloud health $NAME'" +# echo "=========================" +# gh release --repo nextcloud-releases/health create "$NAME" ./build/artifacts/health.tar.gz --notes-file releaseNotes.md -t "Nextcloud health $NAME" + + +echo +echo "# publish at appstore" +echo "krankerl publish https://github.com/nextcloud/health/releases/download/$NAME/health.tar.gz" +echo "=========================" +bash -c "krankerl publish https://github.com/nextcloud/health/releases/download/$NAME/health.tar.gz" + +echo +echo "Maybe you should create a stable-branch..." + +echo +echo "🍻 Cheers" +echo +exit 1 diff --git a/krankerl.toml b/krankerl.toml new file mode 100644 index 00000000..9a02b733 --- /dev/null +++ b/krankerl.toml @@ -0,0 +1,6 @@ +[package] +before_cmds = [ + "composer install --no-dev", + "npm install", + "npm run build" +] From 0fb73de8044c858c1632c0306e1f9177a80e1be7 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 12 Dec 2023 08:56:56 +0100 Subject: [PATCH 3/6] add gh workflow sync script --- .scripts/sync-gh-workflows.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 .scripts/sync-gh-workflows.sh diff --git a/.scripts/sync-gh-workflows.sh b/.scripts/sync-gh-workflows.sh new file mode 100755 index 00000000..035767e7 --- /dev/null +++ b/.scripts/sync-gh-workflows.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Update GitHub workflows from the Nextcloud template repository. +# This script is meant to be run from the root of the repository. + +# Sanity check +[ ! -d ./.github/workflows/ ] && echo "Error: .github/workflows does not exist" && exit 1 + +# Clone template repository +temp="$(mktemp -d)" +git clone --depth=1 https://github.com/nextcloud/.github.git "$temp" + +# Update workflows +rsync -vr \ + --existing \ + --include='*/' \ + --include='*.yml' \ + --exclude='*' \ + "$temp/workflow-templates/" \ + ./.github/workflows/ + +# Cleanup +rm -rf "$temp" From 3670c5287461d5bc0b849c5057a3b03e79c3e3a8 Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 12 Dec 2023 09:16:26 +0100 Subject: [PATCH 4/6] setup and adjust lint and lint-fix --- .php-cs-fixer.dist.php | 18 + Makefile | 10 +- composer.json | 40 +- composer.lock | 4321 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 4372 insertions(+), 17 deletions(-) create mode 100644 .php-cs-fixer.dist.php diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000..3ec96a55 --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,18 @@ +getFinder() + ->notPath('node_modules') + ->notPath('build') + ->notPath('l10n') + ->notPath('src') + ->notPath('vendor') + ->in(__DIR__); +return $config; diff --git a/Makefile b/Makefile index c66cd27a..0c7055d2 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ app_name=health project_dir=$(CURDIR)/../$(app_name) build_dir=$(CURDIR)/build/artifacts cert_dir=$(HOME)/.nextcloud/certificates -php_dirs=appinfo/ lib/ tests/api/ +# php_dirs=appinfo/ lib/ tests/api/ +php_dirs=appinfo/ lib/ appstore_build_directory=$(CURDIR)/build/artifacts/appstore appstore_package_name=$(appstore_build_directory)/$(app_name) @@ -124,16 +125,12 @@ lint: lint-php lint-js lint-css lint-xml lint-php: lint-phpfast lint-php-phan -lint-phpfast: lint-php-lint lint-php-ncversion lint-php-cs-fixer lint-php-phpcs +lint-phpfast: lint-php-lint lint-php-cs-fixer lint-php-phpcs lint-php-lint: # Check PHP syntax errors @! find $(php_dirs) -name "*.php" | xargs -I{} php -l '{}' | grep -v "No syntax errors detected" -lint-php-ncversion: - # Check min-version consistency - php tests/nextcloud-version.php - lint-php-phan: # PHAN vendor/bin/phan --allow-polyfill-parser -k tests/phan-config.php --no-progress-bar -m checkstyle | vendor/bin/cs2pr --graceful-warnings --colorize @@ -165,7 +162,6 @@ lint-xml: lint-fix: lint-php-fix lint-js-fix lint-css-fix lint-php-fix: - vendor/bin/phpcbf --standard=tests/phpcs.xml $(php_dirs) vendor/bin/php-cs-fixer fix lint-js-fix: diff --git a/composer.json b/composer.json index b036a92e..9c15a8f4 100644 --- a/composer.json +++ b/composer.json @@ -1,15 +1,43 @@ { "name": "datenangebot/health", "description": "Lint config for datenangebot/health", - "license": "MIT", + "type": "project", + "license": "AGPL", + "authors": [ + { + "name": "Florian Steffens", + "email": "flost-dev@mailbox.org" + } + ], "config": { "optimize-autoloader": true, - "classmap-authoritative": true + "classmap-authoritative": true, + "platform": { + "php": "8.1" + } }, "scripts": { - "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;" + "test": [ + "@test:unit" + ], + "test:unit": "./vendor/bin/phpunit -c tests/unit/phpunit.xml", + "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", + "cs:check": "php-cs-fixer fix --dry-run --diff", + "cs:fix": "php-cs-fixer fix", + "psalm": "./vendor/bin/psalm --show-info=true --no-cache", + "psalm:update-baseline": "./vendor/bin/psalm --update-baseline", + "psalm:fix": "./vendor/bin/psalm --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType", + "psalm:fix:dry": "./vendor/bin/psalm --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType --dry-run" }, - "require": { - "ext-json": "*" - } + "require": { + "ext-json": "*" + }, + "require-dev": { + "nextcloud/coding-standard": "^v1.0.0", + "vimeo/psalm": "^5.6.0", + "nextcloud/ocp": "dev-master", + "phan/phan": "5.x", + "staabm/annotate-pull-request-from-checkstyle": "^1.8", + "phpunit/phpunit": "^9" + } } diff --git a/composer.lock b/composer.lock index 9af17260..6c564884 100644 --- a/composer.lock +++ b/composer.lock @@ -4,17 +4,4330 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "15ce2348a5b9ff19554575ed3cbdabe4", + "content-hash": "cad2f7ce7d5ecf5c2bde0cdd025f606f", "packages": [], - "packages-dev": [], + "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ], + "psr-4": { + "Amp\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-02-20T17:52:18+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, + { + "name": "composer/pcre", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-10-11T07:11:09+00:00" + }, + { + "name": "composer/semver", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-08-31T09:50:34+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.2" + }, + "time": "2023-09-27T20:04:15+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "v1.5.2", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + }, + "time": "2022-03-02T22:36:06+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.26 || ^8.5.31", + "theofidry/php-cs-fixer-config": "^1.0", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "ThΓ©o FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2022-12-24T12:35:10+00:00" + }, + { + "name": "microsoft/tolerant-php-parser", + "version": "v0.1.2", + "source": { + "type": "git", + "url": "https://github.com/microsoft/tolerant-php-parser.git", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/microsoft/tolerant-php-parser/zipball/3eccfd273323aaf69513e2f1c888393f5947804b", + "reference": "3eccfd273323aaf69513e2f1c888393f5947804b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Microsoft\\PhpParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Lourens", + "email": "roblou@microsoft.com" + } + ], + "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", + "support": { + "issues": "https://github.com/microsoft/tolerant-php-parser/issues", + "source": "https://github.com/microsoft/tolerant-php-parser/tree/v0.1.2" + }, + "time": "2022-10-05T17:30:19+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/f60565f8c0566a31acf06884cdaa591867ecc956", + "reference": "f60565f8c0566a31acf06884cdaa591867ecc956", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.2.0" + }, + "time": "2023-04-09T17:37:40+00:00" + }, + { + "name": "nextcloud/coding-standard", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/nextcloud/coding-standard.git", + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb", + "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0", + "php-cs-fixer/shim": "^3.17" + }, + "type": "library", + "autoload": { + "psr-4": { + "Nextcloud\\CodingStandard\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" + } + ], + "description": "Nextcloud coding standards for the php cs fixer", + "support": { + "issues": "https://github.com/nextcloud/coding-standard/issues", + "source": "https://github.com/nextcloud/coding-standard/tree/v1.1.1" + }, + "time": "2023-06-01T12:05:01+00:00" + }, + { + "name": "nextcloud/ocp", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "24c85e19a9d8f576dacffd07910ec9d4cc070050" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/24c85e19a9d8f576dacffd07910ec9d4cc070050", + "reference": "24c85e19a9d8f576dacffd07910ec9d4cc070050", + "shasum": "" + }, + "require": { + "php": "~8.0 || ~8.1 || ~8.2 || ~8.3", + "psr/clock": "^1.0", + "psr/container": "^2.0.2", + "psr/event-dispatcher": "^1.0", + "psr/log": "^1.1.4" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "29.0.0-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" + } + ], + "description": "Composer package containing Nextcloud's public API (classes, interfaces)", + "support": { + "issues": "https://github.com/nextcloud-deps/ocp/issues", + "source": "https://github.com/nextcloud-deps/ocp/tree/master" + }, + "time": "2023-12-09T00:33:05+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.18.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + }, + "time": "2023-12-10T21:03:43+00:00" + }, + { + "name": "phan/phan", + "version": "5.4.2", + "source": { + "type": "git", + "url": "https://github.com/phan/phan.git", + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phan/phan/zipball/4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4|^2.0|^3.0", + "composer/xdebug-handler": "^2.0|^3.0", + "ext-filter": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.4", + "microsoft/tolerant-php-parser": "0.1.2", + "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", + "php": "^7.2.0|^8.0.0", + "sabre/event": "^5.1.3", + "symfony/console": "^3.2|^4.0|^5.0|^6.0", + "symfony/polyfill-mbstring": "^1.11.0", + "symfony/polyfill-php80": "^1.20.0", + "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-ast": "Needed for parsing ASTs (unless --use-fallback-parser is used). 1.0.1+ is needed, 1.0.16+ is recommended.", + "ext-iconv": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-igbinary": "Improves performance of polyfill when ext-ast is unavailable", + "ext-mbstring": "Either iconv or mbstring is needed to ensure issue messages are valid utf-8", + "ext-tokenizer": "Needed for fallback/polyfill parser support and file/line-based suppressions.", + "ext-var_representation": "Suggested for converting values to strings in issue messages" + }, + "bin": [ + "phan", + "phan_client", + "tocheckstyle" + ], + "type": "project", + "autoload": { + "psr-4": { + "Phan\\": "src/Phan" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + }, + { + "name": "Rasmus Lerdorf" + }, + { + "name": "Andrew S. Morrison" + } + ], + "description": "A static analyzer for PHP", + "keywords": [ + "analyzer", + "php", + "static" + ], + "support": { + "issues": "https://github.com/phan/phan/issues", + "source": "https://github.com/phan/phan/tree/5.4.2" + }, + "time": "2023-03-03T17:20:24+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "php-cs-fixer/shim", + "version": "v3.41.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/shim.git", + "reference": "01cea2dca727100537bd63e28e06e49a475b54e9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/01cea2dca727100537bd63e28e06e49a475b54e9", + "reference": "01cea2dca727100537bd63e28e06e49a475b54e9", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "replace": { + "friendsofphp/php-cs-fixer": "self.version" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer", + "php-cs-fixer.phar" + ], + "type": "application", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiΕ„ski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/PHP-CS-Fixer/shim/issues", + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.41.1" + }, + "time": "2023-12-10T19:59:57+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" + }, + "time": "2021-10-19T17:43:47+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.7.3", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" + }, + "require-dev": { + "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" + }, + "time": "2023-08-12T11:01:26+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.24.4", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" + }, + "time": "2023-11-26T18:29:22+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.29", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-09-19T04:57:46+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.6.15", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1", + "reference": "05017b80304e0eb3f31d90194a563fd53a6021f1", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1 || ^2", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.28", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.6-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-12-01T16:55:19+00:00" + }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sabre/event", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/event.git", + "reference": "d7da22897125d34d7eddf7977758191c06a74497" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/event/zipball/d7da22897125d34d7eddf7977758191c06a74497", + "reference": "d7da22897125d34d7eddf7977758191c06a74497", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.17.1", + "phpstan/phpstan": "^0.12", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.0" + }, + "type": "library", + "autoload": { + "files": [ + "lib/coroutine.php", + "lib/Loop/functions.php", + "lib/Promise/functions.php" + ], + "psr-4": { + "Sabre\\Event\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "sabre/event is a library for lightweight event-based programming", + "homepage": "http://sabre.io/event/", + "keywords": [ + "EventEmitter", + "async", + "coroutine", + "eventloop", + "events", + "hooks", + "plugin", + "promise", + "reactor", + "signal" + ], + "support": { + "forum": "https://groups.google.com/group/sabredav-discuss", + "issues": "https://github.com/sabre-io/event/issues", + "source": "https://github.com/fruux/sabre-event" + }, + "time": "2021-11-04T06:51:17+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:35:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:03:51+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bde739e7565280bda77be70044ac1047bc007e34" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:26:13+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:07:39+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:13:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "spatie/array-to-xml", + "version": "3.2.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-11-14T14:08:51+00:00" + }, + { + "name": "staabm/annotate-pull-request-from-checkstyle", + "version": "1.8.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/annotate-pull-request-from-checkstyle.git", + "reference": "082e7f859860f6e79094b6ec86606bd6d0fe9014" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/annotate-pull-request-from-checkstyle/zipball/082e7f859860f6e79094b6ec86606bd6d0fe9014", + "reference": "082e7f859860f6e79094b6ec86606bd6d0fe9014", + "shasum": "" + }, + "require": { + "ext-libxml": "*", + "ext-simplexml": "*", + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16.1" + }, + "bin": [ + "cs2pr" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Markus Staab" + } + ], + "keywords": [ + "Github Actions", + "continous integration", + "dev" + ], + "support": { + "issues": "https://github.com/staabm/annotate-pull-request-from-checkstyle/issues", + "source": "https://github.com/staabm/annotate-pull-request-from-checkstyle/tree/1.8.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2023-05-08T15:56:45+00:00" + }, + { + "name": "symfony/console", + "version": "v6.4.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.4.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-30T10:54:28+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "reference": "952a8cb588c3bc6ce76f6023000fb932f16a6e59", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-26T17:27:13+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "875e90aeea2777b6f135677f618529449334a612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-28T09:04:16+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-07-30T20:28:31+00:00" + }, + { + "name": "symfony/string", + "version": "v6.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", + "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0|^7.0", + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-11-28T20:41:49+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2023-11-20T00:12:19+00:00" + }, + { + "name": "tysonandre/var_representation_polyfill", + "version": "0.1.3", + "source": { + "type": "git", + "url": "https://github.com/TysonAndre/var_representation_polyfill.git", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TysonAndre/var_representation_polyfill/zipball/e9116c2c352bb0835ca428b442dde7767c11ad32", + "reference": "e9116c2c352bb0835ca428b442dde7767c11ad32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.2.0|^8.0.0" + }, + "provide": { + "ext-var_representation": "*" + }, + "require-dev": { + "phan/phan": "^5.4.1", + "phpunit/phpunit": "^8.5.0" + }, + "suggest": { + "ext-var_representation": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.3-dev" + } + }, + "autoload": { + "files": [ + "src/var_representation.php" + ], + "psr-4": { + "VarRepresentation\\": "src/VarRepresentation" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tyson Andre" + } + ], + "description": "Polyfill for var_representation: convert a variable to a string in a way that fixes the shortcomings of var_export", + "keywords": [ + "var_export", + "var_representation" + ], + "support": { + "issues": "https://github.com/TysonAndre/var_representation_polyfill/issues", + "source": "https://github.com/TysonAndre/var_representation_polyfill/tree/0.1.3" + }, + "time": "2022-08-31T12:59:22+00:00" + }, + { + "name": "vimeo/psalm", + "version": "5.17.0", + "source": { + "type": "git", + "url": "https://github.com/vimeo/psalm.git", + "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/c620f6e80d0abfca532b00bda366062aaedf6e5d", + "reference": "c620f6e80d0abfca532b00bda366062aaedf6e5d", + "shasum": "" + }, + "require": { + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer-runtime-api": "^2", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "sebastian/diff": "^4.0 || ^5.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" + }, + "conflict": { + "nikic/php-parser": "4.17.0" + }, + "provide": { + "psalm/psalm": "self.version" + }, + "require-dev": { + "amphp/phpunit-util": "^2.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.9", + "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.6", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" + }, + "suggest": { + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" + }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], + "type": "project", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\": "src/Psalm/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown" + } + ], + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php", + "static analysis" + ], + "support": { + "docs": "https://psalm.dev/docs", + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm" + }, + "time": "2023-12-03T20:21:41+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "nextcloud/ocp": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "platform-overrides": { + "php": "8.1" + }, + "plugin-api-version": "2.3.0" } From b4ee705081b264ecc3a02158b65738e3cefd884a Mon Sep 17 00:00:00 2001 From: Florian Steffens Date: Tue, 12 Dec 2023 09:17:02 +0100 Subject: [PATCH 5/6] linting --- appinfo/routes.php | 12 +- .../ActivitiesdataApiController.php | 17 +- lib/Controller/ActivitiesdataController.php | 17 +- lib/Controller/FeelingdataApiController.php | 17 +- lib/Controller/FeelingdataController.php | 17 +- .../MeasurementdataApiController.php | 17 +- lib/Controller/MeasurementdataController.php | 17 +- .../MedicationdataApiController.php | 33 ++- lib/Controller/MedicationdataController.php | 33 ++- lib/Controller/PageController.php | 5 +- lib/Controller/PersonsApiController.php | 30 ++- lib/Controller/PersonsController.php | 24 +- lib/Controller/SleepdataApiController.php | 17 +- lib/Controller/SleepdataController.php | 17 +- lib/Controller/SmokingdataApiController.php | 17 +- lib/Controller/SmokingdataController.php | 17 +- lib/Controller/WeightdataApiController.php | 19 +- lib/Controller/WeightdataController.php | 19 +- lib/Db/Acl.php | 9 +- lib/Db/AclMapper.php | 15 +- lib/Db/Activitiesdata.php | 25 +- lib/Db/ActivitiesdataMapper.php | 46 ++-- lib/Db/Feelingdata.php | 21 +- lib/Db/FeelingdataMapper.php | 42 ++-- lib/Db/Measurementdata.php | 31 ++- lib/Db/MeasurementdataMapper.php | 42 ++-- lib/Db/MedicationPlan.php | 15 +- lib/Db/MedicationPlanMapper.php | 58 ++--- lib/Db/Medicationdata.php | 23 +- lib/Db/MedicationdataMapper.php | 44 ++-- lib/Db/Person.php | 113 +++++---- lib/Db/PersonMapper.php | 22 +- lib/Db/Sleepdata.php | 19 +- lib/Db/SleepdataMapper.php | 46 ++-- lib/Db/Smokingdata.php | 19 +- lib/Db/SmokingdataMapper.php | 44 ++-- lib/Db/Weightdata.php | 67 +++--- lib/Db/WeightdataMapper.php | 60 ++--- .../Version0023Date20200903130000.php | 221 +++++++++--------- .../Version0123Date20201028200000.php | 50 ++-- .../Version0140Date20201117200000.php | 46 ++-- .../Version0142Date20201104200000.php | 42 ++-- .../Version0230Date20210107000000.php | 64 +++-- .../Version0230Date20210110000000.php | 64 +++-- .../Version0300Date20210119000000.php | 23 +- .../Version0310Date20210130000000.php | 23 +- .../Version1100Date20210414000000.php | 23 +- .../Version1200Date20210429000000.php | 15 +- .../Version1500Date20220416000000.php | 15 +- .../Version1600Date20220715000000.php | 9 +- lib/Services/ActivitiesdataService.php | 24 +- lib/Services/FeelingdataService.php | 24 +- lib/Services/FormatHelperService.php | 81 ++++--- lib/Services/MeasurementdataService.php | 26 +-- lib/Services/MedicationdataService.php | 54 ++--- lib/Services/PermissionHelperService.php | 2 +- lib/Services/PermissionService.php | 25 +- lib/Services/PersonsService.php | 59 +++-- lib/Services/SleepdataService.php | 24 +- lib/Services/SmokingdataService.php | 24 +- lib/Services/WeightdataService.php | 20 +- src/general/Chart.vue | 4 +- src/general/DataTable.vue | 4 +- src/modules/medication/MedicationContent.vue | 52 ++--- 64 files changed, 995 insertions(+), 1129 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 3f87bbab..a2923fed 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -23,16 +23,16 @@ return [ 'resources' => [ - 'persons' => ['url' => '/persons'], - ], - 'routes' => [ + 'persons' => ['url' => '/persons'], + ], + 'routes' => [ // enable CORS for api calls (API version 1) ['name' => 'weightdata_api#preflighted_cors', 'url' => '/api/1/{path}', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']], - // main - ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], + // main + ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], ['name' => 'persons#data', 'url' => '/person/{personId}/data', 'verb' => 'GET'], ['name' => 'persons_api#data', 'url' => '/api/1/person/{personId}/data', 'verb' => 'GET'], @@ -127,5 +127,5 @@ ['name' => 'medicationdata_api#createMedication', 'url' => 'api/1/medication/medication/plan/{planId}', 'verb' => 'POST'], ['name' => 'medicationdata_api#deleteMedication', 'url' => 'api/1/medication/medication/{id}', 'verb' => 'DELETE'], ['name' => 'medicationdata_api#updateMedication', 'url' => 'api/1/medication/medication/{id}', 'verb' => 'PUT'], - ] + ] ]; diff --git a/lib/Controller/ActivitiesdataApiController.php b/lib/Controller/ActivitiesdataApiController.php index a1319b53..4c8d991e 100644 --- a/lib/Controller/ActivitiesdataApiController.php +++ b/lib/Controller/ActivitiesdataApiController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\ActivitiesdataService; -use OCP\IRequest; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class ActivitiesdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, ActivitiesdataService $ * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->activitiesdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->activitiesdataService->getAllByPersonId($personId)); } /** @@ -69,8 +69,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse { return new DataResponse($this->activitiesdataService->create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment)); } @@ -82,8 +81,7 @@ public function create(int $personId, string $datetime, int $calories = null, fl * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->activitiesdataService->delete($id)); } @@ -103,8 +101,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse { return new DataResponse($this->activitiesdataService->update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment)); } } diff --git a/lib/Controller/ActivitiesdataController.php b/lib/Controller/ActivitiesdataController.php index 673b5a86..67d355e8 100644 --- a/lib/Controller/ActivitiesdataController.php +++ b/lib/Controller/ActivitiesdataController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\ActivitiesdataService; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class ActivitiesdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, ActivitiesdataService $ * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->activitiesdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->activitiesdataService->getAllByPersonId($personId)); } /** @@ -66,8 +66,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse { return new DataResponse($this->activitiesdataService->create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment)); } @@ -77,8 +76,7 @@ public function create(int $personId, string $datetime, int $calories = null, fl * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->activitiesdataService->delete($id)); } @@ -96,8 +94,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, int $calories = null, float $duration = null, int $category = null, int $feeling = null, int $intensity = null, float $distance = null, string $comment = ''): DataResponse { return new DataResponse($this->activitiesdataService->update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment)); } } diff --git a/lib/Controller/FeelingdataApiController.php b/lib/Controller/FeelingdataApiController.php index e85060c7..705e7911 100644 --- a/lib/Controller/FeelingdataApiController.php +++ b/lib/Controller/FeelingdataApiController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\FeelingdataService; -use OCP\IRequest; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class FeelingdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, FeelingdataService $mS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->feelingdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->feelingdataService->getAllByPersonId($personId)); } /** @@ -70,8 +70,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse { return new DataResponse($this->feelingdataService->create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment)); } @@ -83,8 +82,7 @@ public function create(int $personId, string $datetime, int $mood = null, int $s * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->feelingdataService->delete($id)); } @@ -105,8 +103,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse { return new DataResponse($this->feelingdataService->update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment)); } } diff --git a/lib/Controller/FeelingdataController.php b/lib/Controller/FeelingdataController.php index ad2b96da..f7f174a1 100644 --- a/lib/Controller/FeelingdataController.php +++ b/lib/Controller/FeelingdataController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\FeelingdataService; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class FeelingdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, FeelingdataService $mS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->feelingdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->feelingdataService->getAllByPersonId($personId)); } /** @@ -67,8 +67,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse { return new DataResponse($this->feelingdataService->create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment)); } @@ -78,8 +77,7 @@ public function create(int $personId, string $datetime, int $mood = null, int $s * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->feelingdataService->delete($id)); } @@ -98,8 +96,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, int $mood = null, int $sadnessLevel = null, string $symptoms = null, string $attacks = null, string $medication = null, int $pain = null, int $energy = null, string $comment = ''): DataResponse { return new DataResponse($this->feelingdataService->update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment)); } } diff --git a/lib/Controller/MeasurementdataApiController.php b/lib/Controller/MeasurementdataApiController.php index 5028f8ba..ab3246aa 100644 --- a/lib/Controller/MeasurementdataApiController.php +++ b/lib/Controller/MeasurementdataApiController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\MeasurementdataService; -use OCP\IRequest; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class MeasurementdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, MeasurementdataService * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->measurementdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->measurementdataService->getAllByPersonId($personId)); } /** @@ -74,8 +74,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse { return new DataResponse($this->measurementdataService->create($personId, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment)); } @@ -87,8 +86,7 @@ public function create(int $personId, string $datetime, float $temperature = nul * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->measurementdataService->delete($id)); } @@ -113,8 +111,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse { return new DataResponse($this->measurementdataService->update($id, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment)); } } diff --git a/lib/Controller/MeasurementdataController.php b/lib/Controller/MeasurementdataController.php index 90dd5293..d1be9277 100644 --- a/lib/Controller/MeasurementdataController.php +++ b/lib/Controller/MeasurementdataController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\MeasurementdataService; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class MeasurementdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, MeasurementdataService * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->measurementdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->measurementdataService->getAllByPersonId($personId)); } /** @@ -71,8 +71,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse { return new DataResponse($this->measurementdataService->create($personId, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment)); } @@ -82,8 +81,7 @@ public function create(int $personId, string $datetime, float $temperature = nul * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->measurementdataService->delete($id)); } @@ -106,8 +104,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse - { + public function update(int $id, string $datetime, float $temperature = null, int $heartRate = null, int $bloodPressureS = null, int $bloodPressureD = null, float $bloodSugar = null, float $oxygenSat = null, int $defecation = null, int $appetite = null, int $allergies = null, int $cigarettes = null, int $alcohol = null, string $comment = ''): DataResponse { return new DataResponse($this->measurementdataService->update($id, $datetime, $temperature, $heartRate, $bloodPressureS, $bloodPressureD, $bloodSugar, $oxygenSat, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment)); } } diff --git a/lib/Controller/MedicationdataApiController.php b/lib/Controller/MedicationdataApiController.php index e213bc4c..afa280f1 100644 --- a/lib/Controller/MedicationdataApiController.php +++ b/lib/Controller/MedicationdataApiController.php @@ -1,4 +1,5 @@ @@ -26,8 +27,8 @@ use OCA\Health\Services\MedicationdataService; use OCP\AppFramework\ApiController; -use OCP\IRequest; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class MedicationdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, MedicationdataService $ * @param int $personId * @return DataResponse */ - public function findPlanByPerson(int $personId): DataResponse - { - return new DataResponse($this->medicationdataService->getAllPlansByPersonId($personId)); + public function findPlanByPerson(int $personId): DataResponse { + return new DataResponse($this->medicationdataService->getAllPlansByPersonId($personId)); } /** @@ -61,9 +61,8 @@ public function findPlanByPerson(int $personId): DataResponse * @param int $planId * @return DataResponse */ - public function findMedicationByPlan(int $planId): DataResponse - { - return new DataResponse($this->medicationdataService->getAllMedicationByPlan($planId)); + public function findMedicationByPlan(int $planId): DataResponse { + return new DataResponse($this->medicationdataService->getAllMedicationByPlan($planId)); } /** @@ -77,8 +76,7 @@ public function findMedicationByPlan(int $planId): DataResponse * @param bool $takeOver * @return DataResponse */ - public function createPlan(int $personId, string $date, string $comment = '', bool $takeOver = true): DataResponse - { + public function createPlan(int $personId, string $date, string $comment = '', bool $takeOver = true): DataResponse { return new DataResponse($this->medicationdataService->createPlan($personId, $date, $comment, $takeOver)); } @@ -92,13 +90,12 @@ public function createPlan(int $personId, string $date, string $comment = '', bo * @param string $identifier * @param int|null $morning * @param int|null $noon - * @param int|null $evening + * @param int|null $evening * @param int|null $night * @param string $comment * @return DataResponse */ - public function createMedication(int $planId, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse - { + public function createMedication(int $planId, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->createMedication($planId, $name, $identifier, $morning, $noon, $evening, $night, $comment)); } @@ -110,8 +107,7 @@ public function createMedication(int $planId, string $name, string $identifier, * @param int $id * @return DataResponse */ - public function deleteMedication(int $id): DataResponse - { + public function deleteMedication(int $id): DataResponse { return new DataResponse($this->medicationdataService->deleteMedication($id)); } @@ -123,8 +119,7 @@ public function deleteMedication(int $id): DataResponse * @param int $id * @return DataResponse */ - public function deletePlan(int $id): DataResponse - { + public function deletePlan(int $id): DataResponse { return new DataResponse($this->medicationdataService->deletePlan($id)); } @@ -143,8 +138,7 @@ public function deletePlan(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function updateMedication(int $id, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse - { + public function updateMedication(int $id, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->updateMedication($id, $name, $identifier, $morning, $noon, $evening, $night, $comment)); } @@ -158,8 +152,7 @@ public function updateMedication(int $id, string $name, string $identifier, int * @param string $comment * @return DataResponse */ - public function updatePlan(int $id, string $date, string $comment = ''): DataResponse - { + public function updatePlan(int $id, string $date, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->updatePlan($id, $date, $comment)); } } diff --git a/lib/Controller/MedicationdataController.php b/lib/Controller/MedicationdataController.php index 9d5fe551..95d27c94 100644 --- a/lib/Controller/MedicationdataController.php +++ b/lib/Controller/MedicationdataController.php @@ -1,4 +1,5 @@ @@ -26,8 +27,8 @@ use OCA\Health\Services\MedicationdataService; use OCP\AppFramework\ApiController; -use OCP\IRequest; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class MedicationdataController extends ApiController { @@ -46,9 +47,8 @@ public function __construct($appName, IRequest $request, MedicationdataService $ * @param int $personId * @return DataResponse */ - public function findPlanByPerson(int $personId): DataResponse - { - return new DataResponse($this->medicationdataService->getAllPlansByPersonId($personId)); + public function findPlanByPerson(int $personId): DataResponse { + return new DataResponse($this->medicationdataService->getAllPlansByPersonId($personId)); } /** @@ -57,9 +57,8 @@ public function findPlanByPerson(int $personId): DataResponse * @param int $planId * @return DataResponse */ - public function findMedicationByPlan(int $planId): DataResponse - { - return new DataResponse($this->medicationdataService->getAllMedicationByPlan($planId)); + public function findMedicationByPlan(int $planId): DataResponse { + return new DataResponse($this->medicationdataService->getAllMedicationByPlan($planId)); } /** @@ -71,8 +70,7 @@ public function findMedicationByPlan(int $planId): DataResponse * @param bool $takeOver * @return DataResponse */ - public function createPlan(int $personId, string $date, string $comment = '', bool $takeOver = true): DataResponse - { + public function createPlan(int $personId, string $date, string $comment = '', bool $takeOver = true): DataResponse { return new DataResponse($this->medicationdataService->createPlan($personId, $date, $comment, $takeOver)); } @@ -84,13 +82,12 @@ public function createPlan(int $personId, string $date, string $comment = '', bo * @param string $identifier * @param int|null $morning * @param int|null $noon - * @param int|null $evening + * @param int|null $evening * @param int|null $night * @param string $comment * @return DataResponse */ - public function createMedication(int $planId, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse - { + public function createMedication(int $planId, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->createMedication($planId, $name, $identifier, $morning, $noon, $evening, $night, $comment)); } @@ -100,8 +97,7 @@ public function createMedication(int $planId, string $name, string $identifier, * @param int $id * @return DataResponse */ - public function deleteMedication(int $id): DataResponse - { + public function deleteMedication(int $id): DataResponse { return new DataResponse($this->medicationdataService->deleteMedication($id)); } @@ -111,8 +107,7 @@ public function deleteMedication(int $id): DataResponse * @param int $id * @return DataResponse */ - public function deletePlan(int $id): DataResponse - { + public function deletePlan(int $id): DataResponse { return new DataResponse($this->medicationdataService->deletePlan($id)); } @@ -129,8 +124,7 @@ public function deletePlan(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function updateMedication(int $id, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse - { + public function updateMedication(int $id, string $name, string $identifier, int $morning = null, int $noon = null, int $evening = null, int $night = null, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->updateMedication($id, $name, $identifier, $morning, $noon, $evening, $night, $comment)); } @@ -142,8 +136,7 @@ public function updateMedication(int $id, string $name, string $identifier, int * @param string $comment * @return DataResponse */ - public function updatePlan(int $id, string $date, string $comment = ''): DataResponse - { + public function updatePlan(int $id, string $date, string $comment = ''): DataResponse { return new DataResponse($this->medicationdataService->updatePlan($id, $date, $comment)); } } diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 10d4df91..789f478b 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -1,4 +1,5 @@ @@ -24,9 +25,9 @@ namespace OCA\Health\Controller; -use OCP\IRequest; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\IRequest; use OCP\Util; class PageController extends Controller { diff --git a/lib/Controller/PersonsApiController.php b/lib/Controller/PersonsApiController.php index 307bf30c..fadafde4 100644 --- a/lib/Controller/PersonsApiController.php +++ b/lib/Controller/PersonsApiController.php @@ -1,4 +1,5 @@ @@ -24,10 +25,10 @@ namespace OCA\Health\Controller; -use OCP\IRequest; +use OCA\Health\Services\PersonsService; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; -use OCA\Health\Services\PersonsService; +use OCP\IRequest; class PersonsApiController extends ApiController { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, $userId, PersonsService * * @return DataResponse */ - public function index(): DataResponse - { - return new DataResponse($this->personsService->getAllPersons()); + public function index(): DataResponse { + return new DataResponse($this->personsService->getAllPersons()); } /** @@ -61,9 +61,8 @@ public function index(): DataResponse * * @return DataResponse */ - public function data(int $personId): DataResponse - { - return new DataResponse($this->personsService->getData($personId)); + public function data(int $personId): DataResponse { + return new DataResponse($this->personsService->getData($personId)); } /** @@ -75,8 +74,7 @@ public function data(int $personId): DataResponse * * @return DataResponse */ - public function create(string $name): DataResponse - { + public function create(string $name): DataResponse { return new DataResponse($this->personsService->createPerson($name)); } @@ -89,8 +87,7 @@ public function create(string $name): DataResponse * * @return DataResponse */ - public function destroy(int $id): DataResponse - { + public function destroy(int $id): DataResponse { return new DataResponse($this->personsService->deletePerson($id)); } @@ -105,8 +102,7 @@ public function destroy(int $id): DataResponse * * @return DataResponse */ - public function update(int $id, string $key, string $value): DataResponse - { + public function update(int $id, string $key, string $value): DataResponse { return new DataResponse($this->personsService->updatePerson($id, $key, $value)); } @@ -114,7 +110,7 @@ public function update(int $id, string $key, string $value): DataResponse * @NoAdminRequired * @CORS * @NoCSRFRequired - + * * @param $personId * @param $type * @param $participant @@ -130,7 +126,7 @@ public function addAcl(int $personId, int $type, string $participant, bool $perm * @NoAdminRequired * @CORS * @NoCSRFRequired - + * * @param $personId * @param $aclId * @param $permissionEdit @@ -145,7 +141,7 @@ public function updateAcl(int $personId, int $aclId, bool $permissionEdit, bool * @NoAdminRequired * @CORS * @NoCSRFRequired - + * * @param $personId * @param $aclId * @return DataResponse diff --git a/lib/Controller/PersonsController.php b/lib/Controller/PersonsController.php index 86845f94..786bce1a 100644 --- a/lib/Controller/PersonsController.php +++ b/lib/Controller/PersonsController.php @@ -1,4 +1,5 @@ @@ -24,10 +25,10 @@ namespace OCA\Health\Controller; -use OCP\IRequest; +use OCA\Health\Services\PersonsService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; -use OCA\Health\Services\PersonsService; +use OCP\IRequest; class PersonsController extends Controller { @@ -46,9 +47,8 @@ public function __construct($appName, IRequest $request, $userId, PersonsService * * @return DataResponse */ - public function index(): DataResponse - { - return new DataResponse($this->personsService->getAllPersons()); + public function index(): DataResponse { + return new DataResponse($this->personsService->getAllPersons()); } /** @@ -59,9 +59,8 @@ public function index(): DataResponse * * @return DataResponse */ - public function data(int $personId): DataResponse - { - return new DataResponse($this->personsService->getData($personId)); + public function data(int $personId): DataResponse { + return new DataResponse($this->personsService->getData($personId)); } /** @@ -71,8 +70,7 @@ public function data(int $personId): DataResponse * * @return DataResponse */ - public function create(string $name): DataResponse - { + public function create(string $name): DataResponse { return new DataResponse($this->personsService->createPerson($name)); } @@ -83,8 +81,7 @@ public function create(string $name): DataResponse * * @return DataResponse */ - public function destroy(int $id): DataResponse - { + public function destroy(int $id): DataResponse { return new DataResponse($this->personsService->deletePerson($id)); } @@ -97,8 +94,7 @@ public function destroy(int $id): DataResponse * * @return DataResponse */ - public function update(int $id, string $key, string $value): DataResponse - { + public function update(int $id, string $key, string $value): DataResponse { return new DataResponse($this->personsService->updatePerson($id, $key, $value)); } diff --git a/lib/Controller/SleepdataApiController.php b/lib/Controller/SleepdataApiController.php index a2bc7e8d..104f1cae 100644 --- a/lib/Controller/SleepdataApiController.php +++ b/lib/Controller/SleepdataApiController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\SleepdataService; -use OCP\IRequest; use OCP\AppFramework\ApiController; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class SleepdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, SleepdataService $mS, $ * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->sleepdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->sleepdataService->getAllByPersonId($personId)); } /** @@ -67,8 +67,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse { return new DataResponse($this->sleepdataService->create($personId, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment)); } @@ -80,8 +79,7 @@ public function create(int $personId, string $asleep = null, string $wakeup = nu * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->sleepdataService->delete($id)); } @@ -99,8 +97,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse - { + public function update(int $id, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse { return new DataResponse($this->sleepdataService->update($id, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment)); } } diff --git a/lib/Controller/SleepdataController.php b/lib/Controller/SleepdataController.php index 803dc5c0..11026d2f 100644 --- a/lib/Controller/SleepdataController.php +++ b/lib/Controller/SleepdataController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\SleepdataService; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class SleepdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, SleepdataService $mS, $ * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->sleepdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->sleepdataService->getAllByPersonId($personId)); } /** @@ -64,8 +64,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse { return new DataResponse($this->sleepdataService->create($personId, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment)); } @@ -75,8 +74,7 @@ public function create(int $personId, string $asleep = null, string $wakeup = nu * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->sleepdataService->delete($id)); } @@ -92,8 +90,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse - { + public function update(int $id, string $asleep = null, string $wakeup = null, int $quality = null, int $countedWakeups = null, float $durationWakeups = null, string $comment = ''): DataResponse { return new DataResponse($this->sleepdataService->update($id, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment)); } } diff --git a/lib/Controller/SmokingdataApiController.php b/lib/Controller/SmokingdataApiController.php index 3b1e0cd4..e7c35c8c 100644 --- a/lib/Controller/SmokingdataApiController.php +++ b/lib/Controller/SmokingdataApiController.php @@ -1,4 +1,5 @@ @@ -26,8 +27,8 @@ use OCA\Health\Services\SmokingdataService; use OCP\AppFramework\ApiController; -use OCP\IRequest; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class SmokingdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, SmokingdataService $mS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->smokingdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->smokingdataService->getAllByPersonId($personId)); } /** @@ -65,8 +65,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse { return new DataResponse($this->smokingdataService->create($personId, $date, $cigarettes, $desireLevel, $comment)); } @@ -78,8 +77,7 @@ public function create(int $personId, string $date, int $cigarettes = null, int * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->smokingdataService->delete($id)); } @@ -95,8 +93,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse - { + public function update(int $id, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse { return new DataResponse($this->smokingdataService->update($id, $date, $cigarettes, $desireLevel, $comment)); } } diff --git a/lib/Controller/SmokingdataController.php b/lib/Controller/SmokingdataController.php index e6373d2e..254b9dad 100644 --- a/lib/Controller/SmokingdataController.php +++ b/lib/Controller/SmokingdataController.php @@ -1,4 +1,5 @@ @@ -25,9 +26,9 @@ namespace OCA\Health\Controller; use OCA\Health\Services\SmokingdataService; -use OCP\IRequest; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; +use OCP\IRequest; class SmokingdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, SmokingdataService $mS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->smokingdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->smokingdataService->getAllByPersonId($personId)); } /** @@ -62,8 +62,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse { return new DataResponse($this->smokingdataService->create($personId, $date, $cigarettes, $desireLevel, $comment)); } @@ -73,8 +72,7 @@ public function create(int $personId, string $date, int $cigarettes = null, int * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->smokingdataService->delete($id)); } @@ -88,8 +86,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse - { + public function update(int $id, string $date, int $cigarettes = null, int $desireLevel = null, string $comment = ''): DataResponse { return new DataResponse($this->smokingdataService->update($id, $date, $cigarettes, $desireLevel, $comment)); } } diff --git a/lib/Controller/WeightdataApiController.php b/lib/Controller/WeightdataApiController.php index 16e9f26b..d5630961 100644 --- a/lib/Controller/WeightdataApiController.php +++ b/lib/Controller/WeightdataApiController.php @@ -1,4 +1,5 @@ @@ -24,10 +25,10 @@ namespace OCA\Health\Controller; +use OCA\Health\Services\WeightdataService; use OCP\AppFramework\ApiController; -use OCP\IRequest; use OCP\AppFramework\Http\DataResponse; -use OCA\Health\Services\WeightdataService; +use OCP\IRequest; class WeightdataApiController extends ApiController { @@ -48,9 +49,8 @@ public function __construct($appName, IRequest $request, WeightdataService $wS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->weightdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->weightdataService->getAllByPersonId($personId)); } /** @@ -69,8 +69,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse { return new DataResponse($this->weightdataService->create($personId, $weight, $measurement, $bodyfat, $date, $waistSize, $hipSize, $musclePart, $comment)); } @@ -82,8 +81,7 @@ public function create(int $personId, string $date, $weight = null, $measurement * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->weightdataService->delete($id)); } @@ -103,8 +101,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse - { + public function update(int $id, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse { return new DataResponse($this->weightdataService->update($id, $date, $weight, $measurement, $bodyfat, $waistSize, $hipSize, $musclePart, $comment)); } } diff --git a/lib/Controller/WeightdataController.php b/lib/Controller/WeightdataController.php index 45fcf987..dd1bd49e 100644 --- a/lib/Controller/WeightdataController.php +++ b/lib/Controller/WeightdataController.php @@ -1,4 +1,5 @@ @@ -24,10 +25,10 @@ namespace OCA\Health\Controller; -use OCP\IRequest; +use OCA\Health\Services\WeightdataService; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\DataResponse; -use OCA\Health\Services\WeightdataService; +use OCP\IRequest; class WeightdataController extends Controller { @@ -47,9 +48,8 @@ public function __construct($appName, IRequest $request, WeightdataService $wS, * @param int $personId * @return DataResponse */ - public function findByPerson(int $personId): DataResponse - { - return new DataResponse($this->weightdataService->getAllByPersonId($personId)); + public function findByPerson(int $personId): DataResponse { + return new DataResponse($this->weightdataService->getAllByPersonId($personId)); } /** @@ -66,8 +66,7 @@ public function findByPerson(int $personId): DataResponse * @param string $comment * @return DataResponse */ - public function create(int $personId, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse - { + public function create(int $personId, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse { return new DataResponse($this->weightdataService->create($personId, $weight, $measurement, $bodyfat, $date, $waistSize, $hipSize, $musclePart, $comment)); } @@ -77,8 +76,7 @@ public function create(int $personId, string $date, $weight = null, $measurement * @param int $id * @return DataResponse */ - public function delete(int $id): DataResponse - { + public function delete(int $id): DataResponse { return new DataResponse($this->weightdataService->delete($id)); } @@ -96,8 +94,7 @@ public function delete(int $id): DataResponse * @param string $comment * @return DataResponse */ - public function update(int $id, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse - { + public function update(int $id, string $date, $weight = null, $measurement = null, $bodyfat = null, $waistSize = null, $hipSize = null, $musclePart = null, string $comment = ''): DataResponse { return new DataResponse($this->weightdataService->update($id, $date, $weight, $measurement, $bodyfat, $waistSize, $hipSize, $musclePart, $comment)); } } diff --git a/lib/Db/Acl.php b/lib/Db/Acl.php index 7600d1b9..2fc08b2a 100644 --- a/lib/Db/Acl.php +++ b/lib/Db/Acl.php @@ -61,15 +61,14 @@ public function getPermission($permission) { return false; } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'permissionEdit' => $this->permissionEdit, 'permissionManage' => $this->permissionManage, 'type' => $this->type, 'participant' => $this->participant - ]; - } + ]; + } } diff --git a/lib/Db/AclMapper.php b/lib/Db/AclMapper.php index bbc80bad..548c4181 100644 --- a/lib/Db/AclMapper.php +++ b/lib/Db/AclMapper.php @@ -23,13 +23,10 @@ namespace OCA\Health\Db; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\AppFramework\Db\QBMapper; use OCP\IDBConnection; -use OCP\IUserManager; use OCP\IGroupManager; -use OCP\AppFramework\Db\QBMapper; +use OCP\IUserManager; class AclMapper extends QBMapper { @@ -65,7 +62,7 @@ public function findAllByPerson($personId) { public function findAll() { $qb = $this->db->getQueryBuilder(); - $qb->select('*') + $qb->select('*') ->from($this->getTableName()); $entities = $this->findEntities($qb); @@ -76,7 +73,7 @@ public function findAll() { } public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + $qb = $this->db->getQueryBuilder(); $qb->select('*') ->from($this->getTableName()) @@ -84,8 +81,8 @@ public function find(int $id) { $qb->expr()->eq('id', $qb->createNamedParameter($id)) ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } public function mapParticipant(Acl $acl) { if ($acl->getType() === Acl::PERMISSION_TYPE_USER) { diff --git a/lib/Db/Activitiesdata.php b/lib/Db/Activitiesdata.php index 30fbe4f3..cd5a18d6 100644 --- a/lib/Db/Activitiesdata.php +++ b/lib/Db/Activitiesdata.php @@ -39,19 +39,18 @@ class Activitiesdata extends Entity implements JsonSerializable { protected $distance; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('personId','integer'); - $this->addType('duration','float'); - $this->addType('category','integer'); - $this->addType('feeling','integer'); - $this->addType('intensity','integer'); - $this->addType('distance','float'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('personId', 'integer'); + $this->addType('duration', 'float'); + $this->addType('category', 'integer'); + $this->addType('feeling', 'integer'); + $this->addType('intensity', 'integer'); + $this->addType('distance', 'float'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'datetime' => $this->datetime, @@ -62,6 +61,6 @@ public function jsonSerialize(): array 'intensity' => $this->intensity, 'distance' => $this->distance, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/ActivitiesdataMapper.php b/lib/Db/ActivitiesdataMapper.php index 23c82c5a..b9683fe0 100644 --- a/lib/Db/ActivitiesdataMapper.php +++ b/lib/Db/ActivitiesdataMapper.php @@ -24,39 +24,37 @@ namespace OCA\Health\Db; use OCP\AppFramework\Db\Entity; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class ActivitiesdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_activitiesdata', Activitiesdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_activitiesdata', Activitiesdata::class); + } - public function find(int $id): Entity - { - $qb = $this->db->getQueryBuilder(); + public function find(int $id): Entity { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findAll(int $personId): array - { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId): array { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/Feelingdata.php b/lib/Db/Feelingdata.php index 53c12b17..bd7cafcb 100644 --- a/lib/Db/Feelingdata.php +++ b/lib/Db/Feelingdata.php @@ -40,17 +40,16 @@ class Feelingdata extends Entity implements JsonSerializable { protected $energy; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('mood','integer'); - $this->addType('sadnessLevel','integer'); - $this->addType('pain','integer'); - $this->addType('energy','integer'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('mood', 'integer'); + $this->addType('sadnessLevel', 'integer'); + $this->addType('pain', 'integer'); + $this->addType('energy', 'integer'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'datetime' => $this->datetime, @@ -62,6 +61,6 @@ public function jsonSerialize(): array 'pain' => $this->pain, 'energy' => $this->energy, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/FeelingdataMapper.php b/lib/Db/FeelingdataMapper.php index bd80c1ae..fedcefcd 100644 --- a/lib/Db/FeelingdataMapper.php +++ b/lib/Db/FeelingdataMapper.php @@ -25,24 +25,23 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class FeelingdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_feelingdata', Feelingdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_feelingdata', Feelingdata::class); + } - public function find(int $id): ?\OCP\AppFramework\Db\Entity - { - $qb = $this->db->getQueryBuilder(); + public function find(int $id): ?\OCP\AppFramework\Db\Entity { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); try { return $this->findEntity($qb); @@ -51,17 +50,16 @@ public function find(int $id): ?\OCP\AppFramework\Db\Entity } } - public function findAll(int $personId): array - { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId): array { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/Measurementdata.php b/lib/Db/Measurementdata.php index ef092d3b..f9daf5a5 100644 --- a/lib/Db/Measurementdata.php +++ b/lib/Db/Measurementdata.php @@ -44,22 +44,21 @@ class Measurementdata extends Entity implements JsonSerializable { protected $alcohol; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('temperature','float'); - $this->addType('heartRate','integer'); - $this->addType('bloodPressureS','integer'); - $this->addType('bloodPressureD','integer'); - $this->addType('bloodSugar','float'); - $this->addType('oxygenSat','float'); - $this->addType('defecation','integer'); - $this->addType('cigarettes','integer'); - $this->addType('alcohol','integer'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('temperature', 'float'); + $this->addType('heartRate', 'integer'); + $this->addType('bloodPressureS', 'integer'); + $this->addType('bloodPressureD', 'integer'); + $this->addType('bloodSugar', 'float'); + $this->addType('oxygenSat', 'float'); + $this->addType('defecation', 'integer'); + $this->addType('cigarettes', 'integer'); + $this->addType('alcohol', 'integer'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'datetime' => $this->datetime, @@ -75,6 +74,6 @@ public function jsonSerialize(): array 'cigarettes' => $this->cigarettes, 'alcohol' => $this->alcohol, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/MeasurementdataMapper.php b/lib/Db/MeasurementdataMapper.php index 8b5538ab..40f894f2 100644 --- a/lib/Db/MeasurementdataMapper.php +++ b/lib/Db/MeasurementdataMapper.php @@ -26,24 +26,23 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\Entity; use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class MeasurementdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_measurementdata', Measurementdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_measurementdata', Measurementdata::class); + } - public function find(int $id): ?Entity - { - $qb = $this->db->getQueryBuilder(); + public function find(int $id): ?Entity { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); try { return $this->findEntity($qb); @@ -52,17 +51,16 @@ public function find(int $id): ?Entity } } - public function findAll(int $personId): array - { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId): array { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/MedicationPlan.php b/lib/Db/MedicationPlan.php index 4288ff9f..e2fb4f95 100644 --- a/lib/Db/MedicationPlan.php +++ b/lib/Db/MedicationPlan.php @@ -33,18 +33,17 @@ class MedicationPlan extends Entity implements JsonSerializable { protected $date; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('personId','integer'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('personId', 'integer'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'date' => $this->date, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/MedicationPlanMapper.php b/lib/Db/MedicationPlanMapper.php index 8d516eed..ae151624 100644 --- a/lib/Db/MedicationPlanMapper.php +++ b/lib/Db/MedicationPlanMapper.php @@ -25,49 +25,49 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class MedicationPlanMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_medicationplans', MedicationPlan::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_medicationplans', MedicationPlan::class); + } - public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + public function find(int $id) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findAll(int $personId) { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } public function findLast(int $personId) { $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ) - ->orderBy('date', 'desc') - ->setMaxResults(1); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ) + ->orderBy('date', 'desc') + ->setMaxResults(1); try { return $this->findEntity($qb); } catch (DoesNotExistException $e) { diff --git a/lib/Db/Medicationdata.php b/lib/Db/Medicationdata.php index 6a1e66bb..33884787 100644 --- a/lib/Db/Medicationdata.php +++ b/lib/Db/Medicationdata.php @@ -38,18 +38,17 @@ class Medicationdata extends Entity implements JsonSerializable { protected $night; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('planId','integer'); - $this->addType('morning','integer'); - $this->addType('noon','integer'); - $this->addType('evening','integer'); - $this->addType('night','integer'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('planId', 'integer'); + $this->addType('morning', 'integer'); + $this->addType('noon', 'integer'); + $this->addType('evening', 'integer'); + $this->addType('night', 'integer'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'planId' => $this->planId, 'name' => $this->name, @@ -59,6 +58,6 @@ public function jsonSerialize(): array 'evening' => $this->evening, 'night' => $this->night, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/MedicationdataMapper.php b/lib/Db/MedicationdataMapper.php index 54e99364..fb4a2322 100644 --- a/lib/Db/MedicationdataMapper.php +++ b/lib/Db/MedicationdataMapper.php @@ -23,37 +23,37 @@ namespace OCA\Health\Db; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class MedicationdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_medicationdata', Medicationdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_medicationdata', Medicationdata::class); + } - public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + public function find(int $id) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findAll(int $planId) { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $planId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('plan_id', $qb->createNamedParameter($planId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('plan_id', $qb->createNamedParameter($planId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/Person.php b/lib/Db/Person.php index d2f08ca8..fee6c4f0 100644 --- a/lib/Db/Person.php +++ b/lib/Db/Person.php @@ -30,13 +30,13 @@ class Person extends Entity implements JsonSerializable { // general - protected $name; - protected $insertTime; - protected $lastupdateTime; - protected $userId; - protected $age; - protected $size; - protected $sex; + protected $name; + protected $insertTime; + protected $lastupdateTime; + protected $userId; + protected $age; + protected $size; + protected $sex; protected $personalMission; protected $shared; protected $sharedReadonly; @@ -44,24 +44,24 @@ class Person extends Entity implements JsonSerializable { protected $acl; protected $permissions; - // modules - protected $enabledModuleWeight; - protected $enabledModuleBreaks; - protected $enabledModuleFeeling; - protected $enabledModuleMedicine; - protected $enabledModuleActivities; - protected $enabledModuleMeasurement; - protected $enabledModuleNutrition; - protected $enabledModuleSleep; - protected $enabledModuleSmoking; + // modules + protected $enabledModuleWeight; + protected $enabledModuleBreaks; + protected $enabledModuleFeeling; + protected $enabledModuleMedicine; + protected $enabledModuleActivities; + protected $enabledModuleMeasurement; + protected $enabledModuleNutrition; + protected $enabledModuleSleep; + protected $enabledModuleSmoking; - // module weight - protected $weightMeasurementName; - protected $weightUnit; - protected $weightTarget; - protected $weightTargetInitialWeight; - protected $weightTargetStartDate; - protected $weightTargetBounty; + // module weight + protected $weightMeasurementName; + protected $weightUnit; + protected $weightTarget; + protected $weightTargetInitialWeight; + protected $weightTargetStartDate; + protected $weightTargetBounty; protected $weightColumnWeight; protected $weightColumnBodyfat; protected $weightColumnMeasurement; @@ -70,7 +70,7 @@ class Person extends Entity implements JsonSerializable { protected $weightColumnMusclePart; protected $weightColumnBmi; - // module feeling + // module feeling protected $feelingColumnMood; protected $feelingColumnSadnessLevel; protected $feelingColumnSymptoms; @@ -115,11 +115,11 @@ class Person extends Entity implements JsonSerializable { protected $activitiesColumnDistance; protected $activitiesDistanceUnit; - public function __construct() { - // general - $this->addType('id','integer'); - $this->addType('age','integer'); - $this->addType('size','integer'); + public function __construct() { + // general + $this->addType('id', 'integer'); + $this->addType('age', 'integer'); + $this->addType('size', 'integer'); // modules $this->addType('enabledModuleWeight', 'boolean'); @@ -151,7 +151,7 @@ public function __construct() { $this->addType('weightColumnMusclePart', 'boolean'); $this->addType('weightColumnBmi', 'boolean'); - // module feeling + // module feeling $this->addType('feelingColumnMood', 'boolean'); $this->addType('feelingColumnSadnessLevel', 'boolean'); $this->addType('feelingColumnSymptoms', 'boolean'); @@ -184,20 +184,19 @@ public function __construct() { $this->addType('smokingColumnSavedMoney', 'boolean'); $this->addType('smokingPrice', 'float'); $this->addType('smokingStartValue', 'integer'); - } + } - public function jsonSerialize(): array - { - return [ - // general - 'id' => $this->id, - 'insertTime' => $this->insertTime, - 'lastupdateTime' => $this->lastupdateTime, - 'name' => $this->name, - 'userId' => $this->userId, - 'age' => $this->age, - 'size' => $this->size, - 'sex' => $this->sex, + public function jsonSerialize(): array { + return [ + // general + 'id' => $this->id, + 'insertTime' => $this->insertTime, + 'lastupdateTime' => $this->lastupdateTime, + 'name' => $this->name, + 'userId' => $this->userId, + 'age' => $this->age, + 'size' => $this->size, + 'sex' => $this->sex, 'personalMission' => $this->personalMission, 'shared' => $this->shared, 'sharedReadonly' => $this->sharedReadonly, @@ -207,11 +206,11 @@ public function jsonSerialize(): array 'permissions' => $this->permissions ?? [], // modules - 'enabledModuleWeight' => $this->enabledModuleWeight, - 'enabledModuleBreaks' => $this->enabledModuleBreaks, - 'enabledModuleFeeling' => $this->enabledModuleFeeling, - 'enabledModuleMedicine' => $this->enabledModuleMedicine, - 'enabledModuleActivities' => $this->enabledModuleActivities, + 'enabledModuleWeight' => $this->enabledModuleWeight, + 'enabledModuleBreaks' => $this->enabledModuleBreaks, + 'enabledModuleFeeling' => $this->enabledModuleFeeling, + 'enabledModuleMedicine' => $this->enabledModuleMedicine, + 'enabledModuleActivities' => $this->enabledModuleActivities, 'enabledModuleMeasurement' => $this->enabledModuleMeasurement, 'enabledModuleSleep' => $this->enabledModuleSleep, 'enabledModuleNutrition' => $this->enabledModuleNutrition, @@ -227,12 +226,12 @@ public function jsonSerialize(): array 'activitiesDistanceUnit' => $this->activitiesDistanceUnit, // module weight - 'weightMeasurementName' => $this->weightMeasurementName, - 'weightUnit' => $this->weightUnit, - 'weightTarget' => $this->weightTarget, - 'weightTargetInitialWeight' => $this->weightTargetInitialWeight, - 'weightTargetStartDate' => $this->weightTargetStartDate, - 'weightTargetBounty' => $this->weightTargetBounty, + 'weightMeasurementName' => $this->weightMeasurementName, + 'weightUnit' => $this->weightUnit, + 'weightTarget' => $this->weightTarget, + 'weightTargetInitialWeight' => $this->weightTargetInitialWeight, + 'weightTargetStartDate' => $this->weightTargetStartDate, + 'weightTargetBounty' => $this->weightTargetBounty, 'weightColumnWeight' => $this->weightColumnWeight, 'weightColumnBodyfat' => $this->weightColumnBodyfat, 'weightColumnMeasurement' => $this->weightColumnMeasurement, @@ -275,6 +274,6 @@ public function jsonSerialize(): array 'smokingGoal' => $this->smokingGoal, 'smokingStartValue' => $this->smokingStartValue, 'smokingColumnSavedMoney' => $this->smokingColumnSavedMoney, - ]; - } + ]; + } } diff --git a/lib/Db/PersonMapper.php b/lib/Db/PersonMapper.php index e6c69eac..69a7c5b0 100644 --- a/lib/Db/PersonMapper.php +++ b/lib/Db/PersonMapper.php @@ -24,15 +24,13 @@ namespace OCA\Health\Db; -use OCA\Health\Db\Acl; -use OCA\Health\Db\AclMapper; use OCA\Health\Services\PermissionHelperService; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\Entity; use OCP\AppFramework\Db\MultipleObjectsReturnedException; +use OCP\AppFramework\Db\QBMapper; use OCP\IDBConnection; use OCP\IGroupManager; -use OCP\AppFramework\Db\QBMapper; class PersonMapper extends QBMapper { @@ -40,7 +38,7 @@ class PersonMapper extends QBMapper { private $groupManager; private $permissionHelper; - public function __construct( + public function __construct( IDBConnection $db, AclMapper $aclMapper, IGroupManager $groupManager, @@ -50,10 +48,9 @@ public function __construct( $this->aclMapper = $aclMapper; $this->groupManager = $groupManager; $this->permissionHelper = $permissionHelper; - } + } - public function find(int $id, string $userId = ""): ?Entity - { + public function find(int $id, string $userId = ""): ?Entity { $qb = $this->db->getQueryBuilder(); $qb->select('p.*'); @@ -61,12 +58,12 @@ public function find(int $id, string $userId = ""): ?Entity if($userId !== "") { $qb->leftJoin('p', 'health_persons_acl', 'acl', 'p.id=acl.person_id'); } - $qb->where( $qb->expr()->eq('p.id', $qb->createNamedParameter($id)) ); + $qb->where($qb->expr()->eq('p.id', $qb->createNamedParameter($id))); if($userId !== "") { - $qb->andWhere( $qb->expr()->orX( - $qb->expr()->eq('acl.participant', $qb->createNamedParameter($userId) ), - $qb->expr()->eq('p.user_id', $qb->createNamedParameter($userId) ) + $qb->andWhere($qb->expr()->orX( + $qb->expr()->eq('acl.participant', $qb->createNamedParameter($userId)), + $qb->expr()->eq('p.user_id', $qb->createNamedParameter($userId)) )); } $qb->groupBy('p.id'); @@ -77,8 +74,7 @@ public function find(int $id, string $userId = ""): ?Entity } } - public function findAll(string $userId): array - { + public function findAll(string $userId): array { $qb = $this->db->getQueryBuilder(); // get all acl's diff --git a/lib/Db/Sleepdata.php b/lib/Db/Sleepdata.php index b94ff108..fc2289a4 100644 --- a/lib/Db/Sleepdata.php +++ b/lib/Db/Sleepdata.php @@ -37,16 +37,15 @@ class Sleepdata extends Entity implements JsonSerializable { protected $durationWakeups; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('quality','integer'); - $this->addType('countedWakeups','integer'); - $this->addType('durationWakeups','float'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('quality', 'integer'); + $this->addType('countedWakeups', 'integer'); + $this->addType('durationWakeups', 'float'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'asleep' => $this->asleep, @@ -55,6 +54,6 @@ public function jsonSerialize(): array 'countedWakeups' => $this->countedWakeups, 'durationWakeups' => $this->durationWakeups, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/SleepdataMapper.php b/lib/Db/SleepdataMapper.php index 5270bbda..0689cbd4 100644 --- a/lib/Db/SleepdataMapper.php +++ b/lib/Db/SleepdataMapper.php @@ -23,39 +23,37 @@ namespace OCA\Health\Db; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class SleepdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_sleepdata', Sleepdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_sleepdata', Sleepdata::class); + } - public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + public function find(int $id) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findAll(int $personId) { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/Smokingdata.php b/lib/Db/Smokingdata.php index db39b088..cd87ec44 100644 --- a/lib/Db/Smokingdata.php +++ b/lib/Db/Smokingdata.php @@ -35,22 +35,21 @@ class Smokingdata extends Entity implements JsonSerializable { protected $desireLevel; protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('personId','integer'); - $this->addType('cigarettes','integer'); - $this->addType('desireLevel','integer'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('personId', 'integer'); + $this->addType('cigarettes', 'integer'); + $this->addType('desireLevel', 'integer'); } - public function jsonSerialize(): array - { - return [ + public function jsonSerialize(): array { + return [ 'id' => $this->id, 'personId' => $this->personId, 'date' => $this->date, 'cigarettes' => $this->cigarettes, 'desireLevel' => $this->desireLevel, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/SmokingdataMapper.php b/lib/Db/SmokingdataMapper.php index d015dd58..004395f1 100644 --- a/lib/Db/SmokingdataMapper.php +++ b/lib/Db/SmokingdataMapper.php @@ -23,37 +23,37 @@ namespace OCA\Health\Db; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class SmokingdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_smokingdata', Smokingdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_smokingdata', Smokingdata::class); + } - public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + public function find(int $id) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findAll(int $personId) { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Db/Weightdata.php b/lib/Db/Weightdata.php index ad015a07..aeaf1eee 100644 --- a/lib/Db/Weightdata.php +++ b/lib/Db/Weightdata.php @@ -23,8 +23,8 @@ namespace OCA\Health\Db; -use DateTime; use \JsonSerializable; +use DateTime; use OCP\AppFramework\Db\Entity; @@ -33,46 +33,45 @@ */ class Weightdata extends Entity implements JsonSerializable { - protected $insertTime; - protected $lastupdateTime; - protected $personId; - protected $bodyfat; - protected $bodyfat2; - protected $measurement; - protected $weight; - protected $date; - protected $waistSize; - protected $hipSize; - protected $musclePart; - protected $comment; + protected $insertTime; + protected $lastupdateTime; + protected $personId; + protected $bodyfat; + protected $bodyfat2; + protected $measurement; + protected $weight; + protected $date; + protected $waistSize; + protected $hipSize; + protected $musclePart; + protected $comment; - public function __construct() { - $this->addType('id','integer'); - $this->addType('personId','integer'); - $this->addType('bodyfat','float'); - $this->addType('measurement','float'); - $this->addType('weight','float'); + public function __construct() { + $this->addType('id', 'integer'); + $this->addType('personId', 'integer'); + $this->addType('bodyfat', 'float'); + $this->addType('measurement', 'float'); + $this->addType('weight', 'float'); $this->addType('waistSize', 'float'); $this->addType('hipSize', 'float'); $this->addType('musclePart', 'float'); - } + } - public function jsonSerialize(): array - { - $date = new DateTime($this->date); - return [ - 'id' => $this->id, - 'insertTime' => $this->insertTime, - 'lastupdateTime' => $this->lastupdateTime, - 'personId' => $this->personId, - 'bodyfat' => $this->bodyfat, - 'measurement' => $this->measurement, - 'weight' => $this->weight, - 'date' => $date->format('Y-m-d'), + public function jsonSerialize(): array { + $date = new DateTime($this->date); + return [ + 'id' => $this->id, + 'insertTime' => $this->insertTime, + 'lastupdateTime' => $this->lastupdateTime, + 'personId' => $this->personId, + 'bodyfat' => $this->bodyfat, + 'measurement' => $this->measurement, + 'weight' => $this->weight, + 'date' => $date->format('Y-m-d'), 'waistSize' => $this->waistSize, 'hipSize' => $this->hipSize, 'musclePart' => $this->musclePart, 'comment' => $this->comment, - ]; - } + ]; + } } diff --git a/lib/Db/WeightdataMapper.php b/lib/Db/WeightdataMapper.php index c175400e..259671a1 100644 --- a/lib/Db/WeightdataMapper.php +++ b/lib/Db/WeightdataMapper.php @@ -25,36 +25,36 @@ use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\IDBConnection; use OCP\AppFramework\Db\QBMapper; +use OCP\IDBConnection; class WeightdataMapper extends QBMapper { - public function __construct(IDBConnection $db) { - parent::__construct($db, 'health_weightdata', Weightdata::class); - } + public function __construct(IDBConnection $db) { + parent::__construct($db, 'health_weightdata', Weightdata::class); + } - public function find(int $id) { - $qb = $this->db->getQueryBuilder(); + public function find(int $id) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('id', $qb->createNamedParameter($id)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('id', $qb->createNamedParameter($id)) + ); - return $this->findEntity($qb); - } + return $this->findEntity($qb); + } - public function findLast(int $personId) { - $qb = $this->db->getQueryBuilder(); + public function findLast(int $personId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where($qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); - $qb->orderBy('date', 'desc'); - $qb->setMaxResults(1); + $qb->select('*') + ->from($this->getTableName()) + ->where($qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); + $qb->orderBy('date', 'desc'); + $qb->setMaxResults(1); try { return $this->findEntity($qb); } catch (DoesNotExistException $e) { @@ -64,16 +64,16 @@ public function findLast(int $personId) { } } - public function findAll(int $personId) { - $qb = $this->db->getQueryBuilder(); + public function findAll(int $personId) { + $qb = $this->db->getQueryBuilder(); - $qb->select('*') - ->from($this->getTableName()) - ->where( - $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) - ); + $qb->select('*') + ->from($this->getTableName()) + ->where( + $qb->expr()->eq('person_id', $qb->createNamedParameter($personId)) + ); - return $this->findEntities($qb); - } + return $this->findEntities($qb); + } } diff --git a/lib/Migration/Version0023Date20200903130000.php b/lib/Migration/Version0023Date20200903130000.php index 06164421..a3ac336c 100644 --- a/lib/Migration/Version0023Date20200903130000.php +++ b/lib/Migration/Version0023Date20200903130000.php @@ -20,157 +20,156 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use OCP\DB\ISchemaWrapper; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0023Date20200903130000 extends SimpleMigrationStep { +class Version0023Date20200903130000 extends SimpleMigrationStep { - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { - /** @var ISchemaWrapper $schema */ - $schema = $schemaClosure(); + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); - $this->createPersons($schema); - $this->createWeightdata($schema); + $this->createPersons($schema); + $this->createWeightdata($schema); - return $schema; + return $schema; - } + } - private function createWeightdata(ISchemaWrapper $schema) { - if (!$schema->hasTable('health_weightdata')) { - $table = $schema->createTable('health_weightdata'); - $table->addColumn('id', 'integer', [ - 'autoincrement' => true, - 'notnull' => true, - ]); - $table->addColumn('person_id', 'string', [ - 'notnull' => true, - 'length' => 200, - ]); - $table->addColumn('insert_time', 'datetime', [ - ]); - $table->addColumn('lastupdate_time', 'datetime', [ - ]); - $table->addColumn('bodyfat', 'integer', [ + private function createWeightdata(ISchemaWrapper $schema) { + if (!$schema->hasTable('health_weightdata')) { + $table = $schema->createTable('health_weightdata'); + $table->addColumn('id', 'integer', [ + 'autoincrement' => true, + 'notnull' => true, + ]); + $table->addColumn('person_id', 'string', [ + 'notnull' => true, + 'length' => 200, + ]); + $table->addColumn('insert_time', 'datetime', [ + ]); + $table->addColumn('lastupdate_time', 'datetime', [ + ]); + $table->addColumn('bodyfat', 'integer', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('measurement', 'float', [ + ]); + $table->addColumn('measurement', 'float', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('weight', 'float', [ + ]); + $table->addColumn('weight', 'float', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('date', 'datetime', [ + ]); + $table->addColumn('date', 'datetime', [ 'default' => null, 'notnull' => false, - ]); + ]); - $table->setPrimaryKey(['id']); - } + $table->setPrimaryKey(['id']); + } - } + } - private function createPersons(ISchemaWrapper $schema) { - if (!$schema->hasTable('health_persons')) { - $table = $schema->createTable('health_persons'); - $table->addColumn('id', 'integer', [ - 'autoincrement' => true, - 'notnull' => true, - ]); - $table->addColumn('user_id', 'string', [ - 'notnull' => true, - 'length' => 200, - ]); - $table->addColumn('insert_time', 'datetime', [ - ]); - $table->addColumn('lastupdate_time', 'datetime', [ - ]); - $table->addColumn('name', 'string', [ - 'notnull' => true, - 'length' => 200 - ]); - $table->addColumn('age', 'integer', [ - 'default' => null, - 'notnull' => false, - ]); - $table->addColumn('size', 'integer', [ + private function createPersons(ISchemaWrapper $schema) { + if (!$schema->hasTable('health_persons')) { + $table = $schema->createTable('health_persons'); + $table->addColumn('id', 'integer', [ + 'autoincrement' => true, + 'notnull' => true, + ]); + $table->addColumn('user_id', 'string', [ + 'notnull' => true, + 'length' => 200, + ]); + $table->addColumn('insert_time', 'datetime', [ + ]); + $table->addColumn('lastupdate_time', 'datetime', [ + ]); + $table->addColumn('name', 'string', [ + 'notnull' => true, + 'length' => 200 + ]); + $table->addColumn('age', 'integer', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('enabled_module_weight', 'boolean', [ - 'default' => 0, + ]); + $table->addColumn('size', 'integer', [ + 'default' => null, + 'notnull' => false, + ]); + $table->addColumn('enabled_module_weight', 'boolean', [ + 'default' => 0, 'notnull' => false, - ]); - $table->addColumn('enabled_module_breaks', 'boolean', [ - 'default' => 0, + ]); + $table->addColumn('enabled_module_breaks', 'boolean', [ + 'default' => 0, 'notnull' => false, - ]); - $table->addColumn('enabled_module_feeling', 'boolean', [ - 'default' => 0, + ]); + $table->addColumn('enabled_module_feeling', 'boolean', [ + 'default' => 0, 'notnull' => false, - ]); - $table->addColumn('enabled_module_medicine', 'boolean', [ - 'default' => 0, + ]); + $table->addColumn('enabled_module_medicine', 'boolean', [ + 'default' => 0, 'notnull' => false, - ]); - $table->addColumn('enabled_module_activities', 'boolean', [ - 'default' => 0, + ]); + $table->addColumn('enabled_module_activities', 'boolean', [ + 'default' => 0, 'notnull' => false, - ]); - $table->addColumn('sex', 'string', [ - 'length' => 6, + ]); + $table->addColumn('sex', 'string', [ + 'length' => 6, 'default' => null, 'notnull' => false, - ]); - $table->addColumn('weight_measurement_name', 'string', [ - 'length' => 255, + ]); + $table->addColumn('weight_measurement_name', 'string', [ + 'length' => 255, 'default' => null, 'notnull' => false, - ]); - $table->addColumn('weight_target_bounty', 'string', [ + ]); + $table->addColumn('weight_target_bounty', 'string', [ 'default' => null, 'notnull' => false, - 'length' => 600 - ]); - $table->addColumn('weight_unit', 'string', [ + 'length' => 600 + ]); + $table->addColumn('weight_unit', 'string', [ 'default' => null, 'notnull' => false, - 'length' => 20 - ]); - $table->addColumn('weight_target', 'float', [ + 'length' => 20 + ]); + $table->addColumn('weight_target', 'float', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('weight_target_initial_weight', 'float', [ + ]); + $table->addColumn('weight_target_initial_weight', 'float', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('weight_target_start_date', 'datetime', [ + ]); + $table->addColumn('weight_target_start_date', 'datetime', [ 'default' => null, 'notnull' => false, - ]); - $table->addColumn('personal_mission', 'text', [ - 'default' => '', + ]); + $table->addColumn('personal_mission', 'text', [ + 'default' => '', 'notnull' => false, - ]); + ]); - $table->setPrimaryKey(['id']); - $table->addIndex(['user_id'], 'health_user_id_index'); - } - } + $table->setPrimaryKey(['id']); + $table->addIndex(['user_id'], 'health_user_id_index'); + } + } } diff --git a/lib/Migration/Version0123Date20201028200000.php b/lib/Migration/Version0123Date20201028200000.php index d9720ebb..4863d258 100644 --- a/lib/Migration/Version0123Date20201028200000.php +++ b/lib/Migration/Version0123Date20201028200000.php @@ -20,24 +20,23 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use OCP\DB\ISchemaWrapper; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0123Date20201028200000 extends SimpleMigrationStep { +class Version0123Date20201028200000 extends SimpleMigrationStep { - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); @@ -46,8 +45,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt return $schema; } - private function extendPersons(ISchemaWrapper $schema) - { + private function extendPersons(ISchemaWrapper $schema) { try { $table = $schema->getTable('health_persons'); $newColumns = [ @@ -67,27 +65,27 @@ private function extendPersons(ISchemaWrapper $schema) $c = 'feeling_special_symptom_name'; if(!$table->hasColumn($c)) { $table->addColumn($c, 'string', [ - 'default' => '', - 'notnull' => false, - 'length' => 200 + 'default' => '', + 'notnull' => false, + 'length' => 200 ]); } $c = 'feeling_special_attack_name'; if(!$table->hasColumn($c)) { $table->addColumn($c, 'string', [ - 'default' => '', - 'notnull' => false, - 'length' => 200 + 'default' => '', + 'notnull' => false, + 'length' => 200 ]); } $c = 'feeling_default_medication'; if(!$table->hasColumn($c)) { $table->addColumn($c, 'string', [ - 'default' => '', - 'notnull' => false, - 'length' => 600 + 'default' => '', + 'notnull' => false, + 'length' => 600 ]); } } catch (SchemaException $e) { diff --git a/lib/Migration/Version0140Date20201117200000.php b/lib/Migration/Version0140Date20201117200000.php index 050e7c0e..2b872a6c 100644 --- a/lib/Migration/Version0140Date20201117200000.php +++ b/lib/Migration/Version0140Date20201117200000.php @@ -20,33 +20,33 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use OCP\DB\ISchemaWrapper; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0140Date20201117200000 extends SimpleMigrationStep { +class Version0140Date20201117200000 extends SimpleMigrationStep { - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { - /** @var ISchemaWrapper $schema */ - $schema = $schemaClosure(); + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); - // Context Entity Storage - $this->createCES($schema); + // Context Entity Storage + $this->createCES($schema); - return $schema; + return $schema; - } + } - private function createCES(ISchemaWrapper $schema) { + private function createCES(ISchemaWrapper $schema) { if (!$schema->hasTable('health_ces_contexts')) { $table = $schema->createTable('health_ces_contexts'); $table->addColumn('id', 'integer', [ @@ -64,8 +64,8 @@ private function createCES(ISchemaWrapper $schema) { 'default' => 'CURRENT_TIMESTAMP', ]); - $table->setPrimaryKey(['id']); - } + $table->setPrimaryKey(['id']); + } if (!$schema->hasTable('health_ces_entities')) { $table = $schema->createTable('health_ces_entities'); @@ -94,5 +94,5 @@ private function createCES(ISchemaWrapper $schema) { $table->setPrimaryKey(['id']); } - } + } } diff --git a/lib/Migration/Version0142Date20201104200000.php b/lib/Migration/Version0142Date20201104200000.php index 6e4710a9..17ce06fc 100644 --- a/lib/Migration/Version0142Date20201104200000.php +++ b/lib/Migration/Version0142Date20201104200000.php @@ -20,35 +20,33 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use OCP\DB\ISchemaWrapper; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0142Date20201104200000 extends SimpleMigrationStep { +class Version0142Date20201104200000 extends SimpleMigrationStep { - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { - /** @var ISchemaWrapper $schema */ - $schema = $schemaClosure(); + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); - $this->extendPersons($schema); + $this->extendPersons($schema); - return $schema; + return $schema; - } + } - private function extendPersons(ISchemaWrapper $schema) - { + private function extendPersons(ISchemaWrapper $schema) { try { $table = $schema->getTable('health_persons'); $newColumns = [ diff --git a/lib/Migration/Version0230Date20210107000000.php b/lib/Migration/Version0230Date20210107000000.php index 08fac71e..670c60ab 100644 --- a/lib/Migration/Version0230Date20210107000000.php +++ b/lib/Migration/Version0230Date20210107000000.php @@ -20,35 +20,33 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; - use OCP\DB\Types; - use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; +use OCP\IDBConnection; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0230Date20210107000000 extends SimpleMigrationStep { +class Version0230Date20210107000000 extends SimpleMigrationStep { - /** @var IDBConnection */ - protected $connection; + /** @var IDBConnection */ + protected $connection; - public function __construct(IDBConnection $connection) { - $this->connection = $connection; - } - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - * @throws SchemaException - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { - /** @var ISchemaWrapper $schema */ - $schema = $schemaClosure(); + public function __construct(IDBConnection $connection) { + $this->connection = $connection; + } + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + * @throws SchemaException + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); $table = $schema->getTable('health_weightdata'); // create tmp column @@ -58,14 +56,14 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt 'default' => null, ]); } - return $schema; - } + return $schema; + } - public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { - // copy data into tmp column - $query = $this->connection->getQueryBuilder(); - $query->update('health_weightdata') + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { + // copy data into tmp column + $query = $this->connection->getQueryBuilder(); + $query->update('health_weightdata') ->set('bodyfat2', 'bodyfat'); - $query->execute(); - } + $query->execute(); + } } diff --git a/lib/Migration/Version0230Date20210110000000.php b/lib/Migration/Version0230Date20210110000000.php index cfc332aa..e7306cb3 100644 --- a/lib/Migration/Version0230Date20210110000000.php +++ b/lib/Migration/Version0230Date20210110000000.php @@ -20,35 +20,33 @@ * along with this program. If not, see . * */ - namespace OCA\Health\Migration; +namespace OCA\Health\Migration; - use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; - use OCP\DB\Types; - use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use Closure; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; +use OCP\IDBConnection; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; - class Version0230Date20210110000000 extends SimpleMigrationStep { +class Version0230Date20210110000000 extends SimpleMigrationStep { - /** @var IDBConnection */ - protected $connection; + /** @var IDBConnection */ + protected $connection; - public function __construct(IDBConnection $connection) { - $this->connection = $connection; - } - /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper - * @throws SchemaException - */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { - /** @var ISchemaWrapper $schema */ - $schema = $schemaClosure(); + public function __construct(IDBConnection $connection) { + $this->connection = $connection; + } + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + * @throws SchemaException + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); $table = $schema->getTable('health_weightdata'); $table = $schema->getTable('health_weightdata'); @@ -59,14 +57,14 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt 'notnull' => false, ]); } - return $schema; - } + return $schema; + } - public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { - // copy data into tmp column - $query = $this->connection->getQueryBuilder(); - $query->update('health_weightdata') + public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { + // copy data into tmp column + $query = $this->connection->getQueryBuilder(); + $query->update('health_weightdata') ->set('bodyfat', 'bodyfat2'); - $query->execute(); - } + $query->execute(); + } } diff --git a/lib/Migration/Version0300Date20210119000000.php b/lib/Migration/Version0300Date20210119000000.php index 82f70672..a145f4b7 100644 --- a/lib/Migration/Version0300Date20210119000000.php +++ b/lib/Migration/Version0300Date20210119000000.php @@ -23,13 +23,11 @@ namespace OCA\Health\Migration; use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version0300Date20210119000000 extends SimpleMigrationStep { @@ -37,17 +35,16 @@ class Version0300Date20210119000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Migration/Version0310Date20210130000000.php b/lib/Migration/Version0310Date20210130000000.php index 7b1a09b2..9f931419 100644 --- a/lib/Migration/Version0310Date20210130000000.php +++ b/lib/Migration/Version0310Date20210130000000.php @@ -23,13 +23,11 @@ namespace OCA\Health\Migration; use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version0310Date20210130000000 extends SimpleMigrationStep { @@ -37,17 +35,16 @@ class Version0310Date20210130000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Migration/Version1100Date20210414000000.php b/lib/Migration/Version1100Date20210414000000.php index fca1d67b..69d97ee6 100644 --- a/lib/Migration/Version1100Date20210414000000.php +++ b/lib/Migration/Version1100Date20210414000000.php @@ -23,13 +23,11 @@ namespace OCA\Health\Migration; use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version1100Date20210414000000 extends SimpleMigrationStep { @@ -37,17 +35,16 @@ class Version1100Date20210414000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** - * @param IOutput $output - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` - * @param array $options - * @return null|ISchemaWrapper + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Migration/Version1200Date20210429000000.php b/lib/Migration/Version1200Date20210429000000.php index 4038f7d6..0eeb1ff1 100644 --- a/lib/Migration/Version1200Date20210429000000.php +++ b/lib/Migration/Version1200Date20210429000000.php @@ -23,13 +23,11 @@ namespace OCA\Health\Migration; use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version1200Date20210429000000 extends SimpleMigrationStep { @@ -37,7 +35,7 @@ class Version1200Date20210429000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** @@ -47,8 +45,7 @@ public function __construct(IDBConnection $connection) { * @return null|ISchemaWrapper * @throws SchemaException */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Migration/Version1500Date20220416000000.php b/lib/Migration/Version1500Date20220416000000.php index 908393bb..5bc86f73 100644 --- a/lib/Migration/Version1500Date20220416000000.php +++ b/lib/Migration/Version1500Date20220416000000.php @@ -23,13 +23,11 @@ namespace OCA\Health\Migration; use Closure; - use Doctrine\DBAL\Schema\SchemaException; - use Doctrine\DBAL\Types\Type; - use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; +use Doctrine\DBAL\Schema\SchemaException; +use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; - use OCP\Migration\SimpleMigrationStep; - use OCP\Migration\IOutput; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version1500Date20220416000000 extends SimpleMigrationStep { @@ -37,7 +35,7 @@ class Version1500Date20220416000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** @@ -47,8 +45,7 @@ public function __construct(IDBConnection $connection) { * @return null|ISchemaWrapper * @throws SchemaException */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Migration/Version1600Date20220715000000.php b/lib/Migration/Version1600Date20220715000000.php index 2ee50ec2..6a6a49b7 100644 --- a/lib/Migration/Version1600Date20220715000000.php +++ b/lib/Migration/Version1600Date20220715000000.php @@ -24,12 +24,10 @@ use Closure; use Doctrine\DBAL\Schema\SchemaException; -use Doctrine\DBAL\Types\Type; use OCP\DB\ISchemaWrapper; -use OCP\DB\Types; use OCP\IDBConnection; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version1600Date20220715000000 extends SimpleMigrationStep { @@ -37,7 +35,7 @@ class Version1600Date20220715000000 extends SimpleMigrationStep { protected $connection; public function __construct(IDBConnection $connection) { - $this->connection = $connection; + $this->connection = $connection; } /** @@ -47,8 +45,7 @@ public function __construct(IDBConnection $connection) { * @return null|ISchemaWrapper * @throws SchemaException */ - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper - { + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); diff --git a/lib/Services/ActivitiesdataService.php b/lib/Services/ActivitiesdataService.php index fa002180..f2f4d394 100644 --- a/lib/Services/ActivitiesdataService.php +++ b/lib/Services/ActivitiesdataService.php @@ -1,4 +1,5 @@ @@ -45,9 +46,8 @@ public function __construct($userId, ActivitiesdataMapper $adM, FormatHelperServ $this->permissionService = $permissionService; } - public function getAllByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->activitiesdataMapper->findAll($personId); @@ -66,9 +66,8 @@ public function getAllByPersonId($personId): ?array * @param $comment * @return Entity|null */ - public function create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function create($personId, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } try { @@ -90,14 +89,14 @@ public function create($personId, $datetime, $calories, $duration, $category, $f } public function delete($id) { - if( !$this->permissionService->smokingData($id, $this->userId)) { + if(!$this->permissionService->smokingData($id, $this->userId)) { return null; } try { $md = $this->activitiesdataMapper->find($id); return $this->activitiesdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } @@ -114,9 +113,8 @@ public function delete($id) { * @param $comment * @return int|Entity|null */ - public function update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment): ?Entity - { - if( !$this->permissionService->smokingData($id, $this->userId)) { + public function update($id, $datetime, $calories, $duration, $category, $feeling, $intensity, $distance, $comment): ?Entity { + if(!$this->permissionService->smokingData($id, $this->userId)) { return null; } try { @@ -135,7 +133,7 @@ public function update($id, $datetime, $calories, $duration, $category, $feeling $d->setDistance($distance); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->activitiesdataMapper->update($d); } diff --git a/lib/Services/FeelingdataService.php b/lib/Services/FeelingdataService.php index c92d7bd1..38300398 100644 --- a/lib/Services/FeelingdataService.php +++ b/lib/Services/FeelingdataService.php @@ -1,4 +1,5 @@ @@ -45,9 +46,8 @@ public function __construct($userId, FeelingdataMapper $mdM, FormatHelperService $this->permissionService = $permissionService; } - public function getAllByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->feelingdataMapper->findAll($personId); @@ -67,9 +67,8 @@ public function getAllByPersonId($personId): ?array * @param $comment * @return Entity|null */ - public function create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } try { @@ -92,14 +91,14 @@ public function create($personId, $datetime, $mood, $sadnessLevel, $symptoms, $a } public function delete($id) { - if( !$this->permissionService->feelingData($id, $this->userId)) { + if(!$this->permissionService->feelingData($id, $this->userId)) { return null; } try { $md = $this->feelingdataMapper->find($id); return $this->feelingdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } @@ -117,9 +116,8 @@ public function delete($id) { * @param $comment * @return int|Entity|null */ - public function update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment): ?Entity - { - if( !$this->permissionService->feelingData($id, $this->userId)) { + public function update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks, $medication, $pain, $energy, $comment): ?Entity { + if(!$this->permissionService->feelingData($id, $this->userId)) { return null; } try { @@ -139,7 +137,7 @@ public function update($id, $datetime, $mood, $sadnessLevel, $symptoms, $attacks $d->setEnergy($energy); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->feelingdataMapper->update($d); } diff --git a/lib/Services/FormatHelperService.php b/lib/Services/FormatHelperService.php index 45b49b8d..70ab60f3 100644 --- a/lib/Services/FormatHelperService.php +++ b/lib/Services/FormatHelperService.php @@ -1,4 +1,5 @@ @@ -26,8 +27,7 @@ class FormatHelperService { - public function typeCastByEntity($key, $value, \OCP\AppFramework\Db\Entity $entity) - { + public function typeCastByEntity($key, $value, \OCP\AppFramework\Db\Entity $entity) { $fieldTypes = $entity->getFieldTypes(); if(isset($fieldTypes[$key])) { if(in_array($fieldTypes[$key], ['bool', 'boolean'])) { @@ -45,53 +45,52 @@ public function typeCastByEntity($key, $value, \OCP\AppFramework\Db\Entity $enti return $value; } - public function convertDate($value): string - { + public function convertDate($value): string { $dt = new \DateTime($value); return $dt->format('Y-m-d H:i:s'); } public function typeCast($key, $value) { - $intData = ['age', 'size']; - if(in_array($key, $intData)) { - $value = intval($value); - } + $intData = ['age', 'size']; + if(in_array($key, $intData)) { + $value = intval($value); + } - $doubleData = ['weightTarget', 'weightTargetInitialWeight', 'weight', 'measurement', 'bodyfat']; - if(in_array($key, $doubleData)) { - $value = floatval($value); - } + $doubleData = ['weightTarget', 'weightTargetInitialWeight', 'weight', 'measurement', 'bodyfat']; + if(in_array($key, $doubleData)) { + $value = floatval($value); + } - $booleanData = [ - 'enabledModuleWeight', - 'enabledModuleBreaks', - 'enabledModuleFeeling', - 'enabledModuleMedicine', - 'enabledModuleActivities', - 'enabledModuleMeasurement', - 'enabledModuleSleep', - 'enabledModuleNutrition', - 'feelingColumnMood', - 'feelingColumnSadness', - 'feelingColumnPain', - 'feelingColumnSymptoms', - 'feelingColumnAttacks', - 'feelingColumnMedication', - ]; - if(in_array($key, $booleanData)) { - if( $value === true || $value === 'true' || $value === 1 || $value === '1') { - $value = true; - } else { - $value = false; - } - } + $booleanData = [ + 'enabledModuleWeight', + 'enabledModuleBreaks', + 'enabledModuleFeeling', + 'enabledModuleMedicine', + 'enabledModuleActivities', + 'enabledModuleMeasurement', + 'enabledModuleSleep', + 'enabledModuleNutrition', + 'feelingColumnMood', + 'feelingColumnSadness', + 'feelingColumnPain', + 'feelingColumnSymptoms', + 'feelingColumnAttacks', + 'feelingColumnMedication', + ]; + if(in_array($key, $booleanData)) { + if($value === true || $value === 'true' || $value === 1 || $value === '1') { + $value = true; + } else { + $value = false; + } + } - $datetimeData = ['weightTargetStartDate']; - if(in_array($key, $datetimeData)) { - $dt = new \DateTime($value); - $value = $dt->format('Y-m-d H:i:s'); - } + $datetimeData = ['weightTargetStartDate']; + if(in_array($key, $datetimeData)) { + $dt = new \DateTime($value); + $value = $dt->format('Y-m-d H:i:s'); + } - return $value; + return $value; } } diff --git a/lib/Services/MeasurementdataService.php b/lib/Services/MeasurementdataService.php index 42c204f3..248315fe 100644 --- a/lib/Services/MeasurementdataService.php +++ b/lib/Services/MeasurementdataService.php @@ -1,4 +1,5 @@ @@ -45,9 +46,8 @@ public function __construct($userId, MeasurementdataMapper $mdM, FormatHelperSer $this->permissionService = $permissionService; } - public function getAllByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->measurementdataMapper->findAll($personId); @@ -71,9 +71,8 @@ public function getAllByPersonId($personId): ?array * @param $comment * @return Entity|null */ - public function create($personId, $datetime, $temperature, $heartRate, $bloodPressureSystolic, $bloodPressureDiastolic, $bloodSugar, $oxygenSaturation, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function create($personId, $datetime, $temperature, $heartRate, $bloodPressureSystolic, $bloodPressureDiastolic, $bloodSugar, $oxygenSaturation, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } try { @@ -101,14 +100,14 @@ public function create($personId, $datetime, $temperature, $heartRate, $bloodPre } public function delete($id) { - if( !$this->permissionService->measurementData($id, $this->userId)) { + if(!$this->permissionService->measurementData($id, $this->userId)) { return null; } try { $md = $this->measurementdataMapper->find($id); return $this->measurementdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } @@ -130,9 +129,8 @@ public function delete($id) { * @param $comment * @return int|Entity|null */ - public function update($id, $datetime, $temperature, $heartRate, $bloodPressureSystolic, $bloodPressureDiastolic, $bloodSugar, $oxygenSaturation, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment): ?Entity - { - if( !$this->permissionService->measurementData($id, $this->userId)) { + public function update($id, $datetime, $temperature, $heartRate, $bloodPressureSystolic, $bloodPressureDiastolic, $bloodSugar, $oxygenSaturation, $defecation, $appetite, $allergies, $cigarettes, $alcohol, $comment): ?Entity { + if(!$this->permissionService->measurementData($id, $this->userId)) { return null; } try { @@ -155,8 +153,8 @@ public function update($id, $datetime, $temperature, $heartRate, $bloodPressureS $d->setCigarettes($cigarettes); $d->setAlcohol($alcohol); $d->setComment($comment); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } return $this->measurementdataMapper->update($d); } diff --git a/lib/Services/MedicationdataService.php b/lib/Services/MedicationdataService.php index 72e2296f..f23444ae 100644 --- a/lib/Services/MedicationdataService.php +++ b/lib/Services/MedicationdataService.php @@ -1,4 +1,5 @@ @@ -24,11 +25,10 @@ namespace OCA\Health\Services; -use DateTime; use Exception; -use OCA\Health\Db\MedicationPlan; use OCA\Health\Db\Medicationdata; use OCA\Health\Db\MedicationdataMapper; +use OCA\Health\Db\MedicationPlan; use OCA\Health\Db\MedicationPlanMapper; use OCP\AppFramework\Db\Entity; use OCP\AppFramework\Http; @@ -49,25 +49,22 @@ public function __construct($userId, MedicationdataMapper $mdM, MedicationPlanMa $this->permissionService = $permissionService; } - public function getAllPlansByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllPlansByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->medicationPlanMapper->findAll($personId); } - public function getAllMedicationByPlan($planId): ?array - { - if( !$this->permissionService->medicationData($planId, $this->userId)) { + public function getAllMedicationByPlan($planId): ?array { + if(!$this->permissionService->medicationData($planId, $this->userId)) { return null; } return $this->medicationdataMapper->findAll($planId); } - public function createPlan($personId, $date, $comment, $takeOver): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function createPlan($personId, $date, $comment, $takeOver): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } @@ -83,7 +80,7 @@ public function createPlan($personId, $date, $comment, $takeOver): ?Entity if ($lastPlan != null && $takeOver == true) { $medication = $this->medicationdataMapper->findAll($lastPlan->id); - foreach( $medication as $med ) { + foreach($medication as $med) { $d = new Medicationdata(); $d->setPlanId($newPlan->id); $d->setName($med->getName()); @@ -100,9 +97,8 @@ public function createPlan($personId, $date, $comment, $takeOver): ?Entity return $newPlan; } - public function createMedication($planId, $name, $identifier, $morning, $noon, $evening, $night, $comment): ?Entity - { - if( !$this->permissionService->medicationData($planId, $this->userId)) { + public function createMedication($planId, $name, $identifier, $morning, $noon, $evening, $night, $comment): ?Entity { + if(!$this->permissionService->medicationData($planId, $this->userId)) { return null; } $d = new Medicationdata(); @@ -118,20 +114,19 @@ public function createMedication($planId, $name, $identifier, $morning, $noon, $ } public function deleteMedication($id) { - if( !$this->permissionService->medicationData($id, $this->userId)) { + if(!$this->permissionService->medicationData($id, $this->userId)) { return null; } try { $md = $this->medicationdataMapper->find($id); return $this->medicationdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } - public function updateMedication($id, $name, $identifier, $morning, $noon, $evening, $night, $comment): ?Entity - { - if( !$this->permissionService->medicationData($id, $this->userId)) { + public function updateMedication($id, $name, $identifier, $morning, $noon, $evening, $night, $comment): ?Entity { + if(!$this->permissionService->medicationData($id, $this->userId)) { return null; } try { @@ -144,19 +139,19 @@ public function updateMedication($id, $name, $identifier, $morning, $noon, $even $d->setNight($night); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->medicationdataMapper->update($d); } public function deletePlan($id) { - if( !$this->permissionService->medicationData($id, $this->userId)) { + if(!$this->permissionService->medicationData($id, $this->userId)) { return null; } try { $medication = $this->medicationdataMapper->findAll($id); - foreach( $medication as $med ) { + foreach($medication as $med) { $this->medicationdataMapper->delete($med); } } catch(Exception $e) { @@ -166,14 +161,13 @@ public function deletePlan($id) { try { $plan = $this->medicationPlanMapper->find($id); return $this->medicationPlanMapper->delete($plan); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } - public function updatePlan($id, $date, $comment): ?Entity - { - if( !$this->permissionService->medicationData($id, $this->userId)) { + public function updatePlan($id, $date, $comment): ?Entity { + if(!$this->permissionService->medicationData($id, $this->userId)) { return null; } try { @@ -181,7 +175,7 @@ public function updatePlan($id, $date, $comment): ?Entity $d->setDate($date); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->medicationPlanMapper->update($d); } diff --git a/lib/Services/PermissionHelperService.php b/lib/Services/PermissionHelperService.php index 4668b10b..4e656dbf 100644 --- a/lib/Services/PermissionHelperService.php +++ b/lib/Services/PermissionHelperService.php @@ -1,4 +1,5 @@ @@ -24,7 +25,6 @@ namespace OCA\Health\Services; -use Exception; use OCA\Health\Db\Acl; use OCA\Health\Db\Person; use OCP\IGroupManager; diff --git a/lib/Services/PermissionService.php b/lib/Services/PermissionService.php index 9064720c..5559082a 100644 --- a/lib/Services/PermissionService.php +++ b/lib/Services/PermissionService.php @@ -1,4 +1,5 @@ @@ -52,8 +53,7 @@ public function __construct( $this->permissionHelper = $permissionHelper; } - public function personData($destinationPersonId, $sourceUserId): bool - { + public function personData($destinationPersonId, $sourceUserId): bool { try { // check for ownership if($this->personMapper->find($destinationPersonId, $sourceUserId) !== null) { @@ -74,44 +74,37 @@ public function personData($destinationPersonId, $sourceUserId): bool return false; } - public function weightData($id, $userId): bool - { + public function weightData($id, $userId): bool { // TODO return true; } - public function measurementData($id, $userId): bool - { + public function measurementData($id, $userId): bool { // TODO return true; } - public function feelingData($id, $userId): bool - { + public function feelingData($id, $userId): bool { // TODO return true; } - public function sleepData($id, $userId): bool - { + public function sleepData($id, $userId): bool { // TODO return true; } - public function smokingData($id, $userId): bool - { + public function smokingData($id, $userId): bool { // TODO return true; } - public function activitiesData($id, $userId): bool - { + public function activitiesData($id, $userId): bool { // TODO return true; } - public function medicationData($id, $userId): bool - { + public function medicationData($id, $userId): bool { // TODO return true; } diff --git a/lib/Services/PersonsService.php b/lib/Services/PersonsService.php index 4fe7a633..6ace829a 100644 --- a/lib/Services/PersonsService.php +++ b/lib/Services/PersonsService.php @@ -1,4 +1,5 @@ @@ -25,11 +26,11 @@ namespace OCA\Health\Services; +use Exception; use OCA\Health\Db\Acl; use OCA\Health\Db\AclMapper; -use OCA\Health\Db\PersonMapper; use OCA\Health\Db\Person; -use Exception; +use OCA\Health\Db\PersonMapper; use OCP\AppFramework\Http; use OCP\IUserManager; @@ -49,17 +50,17 @@ class PersonsService { protected $userManager; public function __construct(AclMapper $aclMapper, - PersonMapper $personMapper, - $userId, - WeightdataService $weightdataService, - FormatHelperService $formatHelperService, - PermissionHelperService $permissionHelper, - PermissionService $permissionService, - IUserManager $userManager, - FeelingdataService $feelingdataService, - SleepdataService $sleepdataService, - MeasurementdataService $measurementdataService, - ActivitiesdataService $activitiesdataService + PersonMapper $personMapper, + $userId, + WeightdataService $weightdataService, + FormatHelperService $formatHelperService, + PermissionHelperService $permissionHelper, + PermissionService $permissionService, + IUserManager $userManager, + FeelingdataService $feelingdataService, + SleepdataService $sleepdataService, + MeasurementdataService $measurementdataService, + ActivitiesdataService $activitiesdataService ) { $this->aclMapper = $aclMapper; $this->personMapper = $personMapper; @@ -75,12 +76,11 @@ public function __construct(AclMapper $aclMapper, $this->activitiesdataService = $activitiesdataService; } - public function getAllPersons(): array - { + public function getAllPersons(): array { $persons = $this->personMapper->findAll($this->userId); - if( count($persons) === 0) { + if(count($persons) === 0) { $user = $this->userManager->get($this->userId); - $this->createPerson( $user->getDisplayName() ); + $this->createPerson($user->getDisplayName()); $persons = $this->personMapper->findAll($this->userId); } foreach ($persons as $person) { @@ -96,8 +96,7 @@ public function getAllPersons(): array } /** @noinspection PhpUndefinedMethodInspection */ - public function createPerson($name): \OCP\AppFramework\Db\Entity - { + public function createPerson($name): \OCP\AppFramework\Db\Entity { $time = new \DateTime(); $p = new Person(); $p->setInsertTime($time->format('Y-m-d H:i:s')); @@ -142,7 +141,7 @@ public function createPerson($name): \OCP\AppFramework\Db\Entity } public function deletePerson($id) { - if( !$this->permissionService->personData($id, $this->userId)) { + if(!$this->permissionService->personData($id, $this->userId)) { return null; } @@ -153,27 +152,27 @@ public function deletePerson($id) { } $wd = $this->weightdataService->getAllByPersonId($id); - foreach( $wd as $i ) { + foreach($wd as $i) { $this->weightdataService->delete($i->id); } $wd = $this->feelingdataService->getAllByPersonId($id); - foreach( $wd as $i ) { + foreach($wd as $i) { $this->feelingdataService->delete($i->id); } $wd = $this->sleepdataService->getAllByPersonId($id); - foreach( $wd as $i ) { + foreach($wd as $i) { $this->sleepdataService->delete($i->id); } $wd = $this->measurementdataService->getAllByPersonId($id); - foreach( $wd as $i ) { + foreach($wd as $i) { $this->measurementdataService->delete($i->id); } $ad = $this->activitiesdataService->getAllByPersonId($id); - foreach( $ad as $i ) { + foreach($ad as $i) { $this->activitiesdataService->delete($i->id); } @@ -181,7 +180,7 @@ public function deletePerson($id) { } public function updatePerson($id, $key, $value) { - if( !$this->permissionService->personData($id, $this->userId)) { + if(!$this->permissionService->personData($id, $this->userId)) { return null; } @@ -207,7 +206,7 @@ public function updatePerson($id, $key, $value) { } public function getData($personId) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } @@ -225,7 +224,7 @@ public function getData($personId) { * @return \OCP\AppFramework\Db\Entity */ public function addAcl(int $personId, int $type, string $participant, bool $edit, bool $manage) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } @@ -249,7 +248,7 @@ public function addAcl(int $personId, int $type, string $participant, bool $edit * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException */ public function updateAcl(int $personId, int $aclId, bool $edit, bool $manage) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } @@ -270,7 +269,7 @@ public function updateAcl(int $personId, int $aclId, bool $edit, bool $manage) { * @throws BadRequestException */ public function deleteAcl(int $personId, int $aclId) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } $acl = $this->aclMapper->find($aclId); diff --git a/lib/Services/SleepdataService.php b/lib/Services/SleepdataService.php index 503b8b99..f5e135fe 100644 --- a/lib/Services/SleepdataService.php +++ b/lib/Services/SleepdataService.php @@ -1,4 +1,5 @@ @@ -45,9 +46,8 @@ public function __construct($userId, SleepdataMapper $mdM, FormatHelperService $ $this->permissionService = $permissionService; } - public function getAllByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->sleepdataMapper->findAll($personId); @@ -64,9 +64,8 @@ public function getAllByPersonId($personId): ?array * @param $comment * @return Entity|null */ - public function create($personId, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function create($personId, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } try { @@ -91,14 +90,14 @@ public function create($personId, $asleep, $wakeup, $quality, $countedWakeups, $ } public function delete($id) { - if( !$this->permissionService->sleepData($id, $this->userId)) { + if(!$this->permissionService->sleepData($id, $this->userId)) { return null; } try { $md = $this->sleepdataMapper->find($id); return $this->sleepdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } @@ -113,9 +112,8 @@ public function delete($id) { * @param $comment * @return int|Entity|null */ - public function update($id, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment): ?Entity - { - if( !$this->permissionService->sleepData($id, $this->userId)) { + public function update($id, $asleep, $wakeup, $quality, $countedWakeups, $durationWakeups, $comment): ?Entity { + if(!$this->permissionService->sleepData($id, $this->userId)) { return null; } try { @@ -137,7 +135,7 @@ public function update($id, $asleep, $wakeup, $quality, $countedWakeups, $durati $d->setDurationWakeups($durationWakeups); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->sleepdataMapper->update($d); } diff --git a/lib/Services/SmokingdataService.php b/lib/Services/SmokingdataService.php index 1f786802..09b2afa4 100644 --- a/lib/Services/SmokingdataService.php +++ b/lib/Services/SmokingdataService.php @@ -1,4 +1,5 @@ @@ -45,9 +46,8 @@ public function __construct($userId, SmokingdataMapper $mdM, FormatHelperService $this->permissionService = $permissionService; } - public function getAllByPersonId($personId): ?array - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function getAllByPersonId($personId): ?array { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->smokingdataMapper->findAll($personId); @@ -62,9 +62,8 @@ public function getAllByPersonId($personId): ?array * @param $comment * @return Entity|null */ - public function create($personId, $date, $cigarettes, $desireLevel, $comment): ?Entity - { - if( !$this->permissionService->personData($personId, $this->userId)) { + public function create($personId, $date, $cigarettes, $desireLevel, $comment): ?Entity { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } try { @@ -82,14 +81,14 @@ public function create($personId, $date, $cigarettes, $desireLevel, $comment): ? } public function delete($id) { - if( !$this->permissionService->smokingData($id, $this->userId)) { + if(!$this->permissionService->smokingData($id, $this->userId)) { return null; } try { $md = $this->smokingdataMapper->find($id); return $this->smokingdataMapper->delete($md); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } } @@ -102,9 +101,8 @@ public function delete($id) { * @param $comment * @return int|Entity|null */ - public function update($id, $date, $cigarettes, $desireLevel, $comment): ?Entity - { - if( !$this->permissionService->smokingData($id, $this->userId)) { + public function update($id, $date, $cigarettes, $desireLevel, $comment): ?Entity { + if(!$this->permissionService->smokingData($id, $this->userId)) { return null; } try { @@ -119,7 +117,7 @@ public function update($id, $date, $cigarettes, $desireLevel, $comment): ?Entity $d->setDesireLevel($desireLevel); $d->setComment($comment); } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + return Http::STATUS_NOT_FOUND; } return $this->smokingdataMapper->update($d); } diff --git a/lib/Services/WeightdataService.php b/lib/Services/WeightdataService.php index 14bd7c2c..955e8b78 100644 --- a/lib/Services/WeightdataService.php +++ b/lib/Services/WeightdataService.php @@ -1,4 +1,5 @@ @@ -27,7 +28,6 @@ use Exception; use OCA\Health\Db\Weightdata; use OCA\Health\Db\WeightdataMapper; -use OCA\Health\Services\FormatHelperService; use OCP\AppFramework\Http; class WeightdataService { @@ -45,21 +45,21 @@ public function __construct($userId, WeightdataMapper $wdM, FormatHelperService } public function getAllByPersonId($personId) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->weightdataMapper->findAll($personId); } public function getLastWeight($personId) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } return $this->weightdataMapper->findLast($personId); } public function create($personId, $weight, $measurement, $bodyfat, $date, $waistSize, $hipSize, $musclePart, $comment) { - if( !$this->permissionService->personData($personId, $this->userId)) { + if(!$this->permissionService->personData($personId, $this->userId)) { return null; } $time = new \DateTime(); @@ -95,19 +95,19 @@ public function create($personId, $weight, $measurement, $bodyfat, $date, $waist } public function delete($id) { - if( !$this->permissionService->weightData($id, $this->userId)) { + if(!$this->permissionService->weightData($id, $this->userId)) { return null; } try { $wd = $this->weightdataMapper->find($id); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } return $this->weightdataMapper->delete($wd); } public function update($id, $date, $weight, $measurement, $bodyfat, $waistSize, $hipSize, $musclePart, $comment) { - if( !$this->permissionService->weightData($id, $this->userId)) { + if(!$this->permissionService->weightData($id, $this->userId)) { return null; } try { @@ -128,8 +128,8 @@ public function update($id, $date, $weight, $measurement, $bodyfat, $waistSize, $wd->setMusclePart($this->formatHelperService->typeCastByEntity('musclePart', $musclePart, $wd)); /** @noinspection PhpUndefinedMethodInspection */ $wd->setComment($comment); - } catch(Exception $e) { - return Http::STATUS_NOT_FOUND; + } catch(Exception $e) { + return Http::STATUS_NOT_FOUND; } return $this->weightdataMapper->update($wd); } diff --git a/src/general/Chart.vue b/src/general/Chart.vue index 87065a89..aef7b5f6 100644 --- a/src/general/Chart.vue +++ b/src/general/Chart.vue @@ -87,7 +87,7 @@ :title="t('health', 'No data for a chart')" >