Psalm: Fix typings

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2021-01-20 15:42:41 +01:00
parent c50c0ec3d1
commit 130635a40e
51 changed files with 502 additions and 312 deletions

View File

@ -21,7 +21,7 @@
"require-dev": {
"phpunit/phpunit": "^8.5",
"nextcloud/coding-standard": "^0.3.0",
"vimeo/psalm": "^3.18",
"vimeo/psalm": "^4",
"christophwurst/nextcloud": "v20.0.4"
},
"config": {

228
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6df05e11ba7f5319556dae52ffe1ecb9",
"content-hash": "d4a1f5f147c950df8005be9a7a88e97e",
"packages": [
{
"name": "brick/math",
@ -1350,16 +1350,16 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
"reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
"shasum": ""
},
"require": {
@ -1371,7 +1371,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1409,7 +1409,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0"
},
"funding": [
{
@ -1425,20 +1425,20 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "727d1096295d807c309fb01a851577302394c897"
"reference": "6e971c891537eb617a00bb07a43d182a6915faba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
"reference": "727d1096295d807c309fb01a851577302394c897",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
"reference": "6e971c891537eb617a00bb07a43d182a6915faba",
"shasum": ""
},
"require": {
@ -1450,7 +1450,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1493,7 +1493,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0"
},
"funding": [
{
@ -1509,20 +1509,20 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T17:09:11+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
"shasum": ""
},
"require": {
@ -1534,7 +1534,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1573,7 +1573,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
},
"funding": [
{
@ -1589,20 +1589,20 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
"reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed",
"reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
"reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
"shasum": ""
},
"require": {
@ -1611,7 +1611,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1652,7 +1652,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0"
},
"funding": [
{
@ -1668,20 +1668,20 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
"reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
"reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
"shasum": ""
},
"require": {
@ -1690,7 +1690,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -1735,7 +1735,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0"
},
"funding": [
{
@ -1751,7 +1751,7 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/process",
@ -1985,16 +1985,16 @@
"packages-dev": [
{
"name": "amphp/amp",
"version": "v2.5.1",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/amphp/amp.git",
"reference": "ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c"
"reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/amphp/amp/zipball/ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c",
"reference": "ecdc3c476b3ccff02f8e5d5bcc04f7ccfd18751c",
"url": "https://api.github.com/repos/amphp/amp/zipball/efca2b32a7580087adb8aabbff6be1dc1bb924a9",
"reference": "efca2b32a7580087adb8aabbff6be1dc1bb924a9",
"shasum": ""
},
"require": {
@ -2062,7 +2062,7 @@
"support": {
"irc": "irc://irc.freenode.org/amphp",
"issues": "https://github.com/amphp/amp/issues",
"source": "https://github.com/amphp/amp/tree/v2.5.1"
"source": "https://github.com/amphp/amp/tree/v2.5.2"
},
"funding": [
{
@ -2070,7 +2070,7 @@
"type": "github"
}
],
"time": "2020-11-03T16:23:45+00:00"
"time": "2021-01-10T17:06:37+00:00"
},
{
"name": "amphp/byte-stream",
@ -2663,25 +2663,25 @@
},
{
"name": "felixfbecker/advanced-json-rpc",
"version": "v3.1.1",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/felixfbecker/php-advanced-json-rpc.git",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40"
"reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"reference": "0ed363f8de17d284d479ec813c9ad3f6834b5c40",
"url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/06f0b06043c7438959dbdeed8bb3f699a19be22e",
"reference": "06f0b06043c7438959dbdeed8bb3f699a19be22e",
"shasum": ""
},
"require": {
"netresearch/jsonmapper": "^1.0 || ^2.0",
"php": ">=7.0",
"phpdocumentor/reflection-docblock": "^4.0.0 || ^5.0.0"
"php": "^7.1 || ^8.0",
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0.0"
"phpunit/phpunit": "^7.0 || ^8.0"
},
"type": "library",
"autoload": {
@ -2702,9 +2702,9 @@
"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/master"
"source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.0"
},
"time": "2020-03-11T15:21:41+00:00"
"time": "2021-01-10T17:48:47+00:00"
},
{
"name": "felixfbecker/language-server-protocol",
@ -2764,16 +2764,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v2.17.3",
"version": "v2.18.0",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
"reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595"
"reference": "cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/bd32f5dd72cdfc7b53f54077f980e144bfa2f595",
"reference": "bd32f5dd72cdfc7b53f54077f980e144bfa2f595",
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef",
"reference": "cbc5b50bfa2688a1afca20e5a8c71f058e9ccbef",
"shasum": ""
},
"require": {
@ -2795,7 +2795,6 @@
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
},
"require-dev": {
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
"justinrainbow/json-schema": "^5.0",
"keradus/cli-executor": "^1.4",
"mikey179/vfsstream": "^1.6",
@ -2804,11 +2803,11 @@
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy-phpunit": "^1.1 || ^2.0",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
"phpunitgoodpractices/polyfill": "^1.5",
"phpunitgoodpractices/traits": "^1.9.1",
"sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
"symfony/phpunit-bridge": "^5.1",
"symfony/phpunit-bridge": "^5.2.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
},
"suggest": {
@ -2856,7 +2855,7 @@
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.17.3"
"source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.18.0"
},
"funding": [
{
@ -2864,7 +2863,7 @@
"type": "github"
}
],
"time": "2020-12-24T11:14:44+00:00"
"time": "2021-01-18T03:31:06+00:00"
},
{
"name": "myclabs/deep-copy",
@ -3815,16 +3814,16 @@
},
{
"name": "phpunit/phpunit",
"version": "8.5.13",
"version": "8.5.14",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "8e86be391a58104ef86037ba8a846524528d784e"
"reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e86be391a58104ef86037ba8a846524528d784e",
"reference": "8e86be391a58104ef86037ba8a846524528d784e",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c25f79895d27b6ecd5abfa63de1606b786a461a3",
"reference": "c25f79895d27b6ecd5abfa63de1606b786a461a3",
"shasum": ""
},
"require": {
@ -3896,7 +3895,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.13"
"source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.14"
},
"funding": [
{
@ -3908,7 +3907,7 @@
"type": "github"
}
],
"time": "2020-12-01T04:53:52+00:00"
"time": "2021-01-17T07:37:30+00:00"
},
{
"name": "psr/log",
@ -5018,16 +5017,16 @@
},
{
"name": "symfony/polyfill-php72",
"version": "v1.20.0",
"version": "v1.22.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930"
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cede45fcdfabdd6043b3592e83678e42ec69e930",
"reference": "cede45fcdfabdd6043b3592e83678e42ec69e930",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
"shasum": ""
},
"require": {
@ -5036,7 +5035,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.20-dev"
"dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -5074,7 +5073,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php72/tree/v1.20.0"
"source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0"
},
"funding": [
{
@ -5090,7 +5089,7 @@
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
"time": "2021-01-07T16:49:33+00:00"
},
{
"name": "symfony/stopwatch",
@ -5206,16 +5205,16 @@
},
{
"name": "vimeo/psalm",
"version": "3.18.2",
"version": "4.4.1",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626"
"reference": "9fd7a7d885b3a216cff8dec9d8c21a132f275224"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/19aa905f7c3c7350569999a93c40ae91ae4e1626",
"reference": "19aa905f7c3c7350569999a93c40ae91ae4e1626",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/9fd7a7d885b3a216cff8dec9d8c21a132f275224",
"reference": "9fd7a7d885b3a216cff8dec9d8c21a132f275224",
"shasum": ""
},
"require": {
@ -5234,12 +5233,11 @@
"felixfbecker/advanced-json-rpc": "^3.0.3",
"felixfbecker/language-server-protocol": "^1.4",
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0",
"nikic/php-parser": "4.3.* || 4.4.* || 4.5.* || 4.6.* || ^4.8",
"nikic/php-parser": "^4.10.1",
"openlss/lib-array2xml": "^1.0",
"php": "^7.1.3|^8",
"php": "^7.1|^8",
"sebastian/diff": "^3.0 || ^4.0",
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
"webmozart/glob": "^4.1",
"webmozart/path-util": "^2.3"
},
"provide": {
@ -5248,14 +5246,14 @@
"require-dev": {
"amphp/amp": "^2.4.2",
"bamarni/composer-bin-plugin": "^1.2",
"brianium/paratest": "^4.0.0",
"brianium/paratest": "^4.0||^6.0",
"ext-curl": "*",
"phpdocumentor/reflection-docblock": "^4.3.4 || ^5",
"phpmyadmin/sql-parser": "5.1.0",
"phpdocumentor/reflection-docblock": "^5",
"phpmyadmin/sql-parser": "5.1.0||dev-master",
"phpspec/prophecy": ">=1.9.0",
"phpunit/phpunit": "^7.5.16 || ^8.5 || ^9.0",
"psalm/plugin-phpunit": "^0.11",
"slevomat/coding-standard": "^5.0",
"phpunit/phpunit": "^9.0",
"psalm/plugin-phpunit": "^0.13",
"slevomat/coding-standard": "^6.3.11",
"squizlabs/php_codesniffer": "^3.5",
"symfony/process": "^4.3",
"weirdan/prophecy-shim": "^1.0 || ^2.0"
@ -5273,7 +5271,8 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.x-dev",
"dev-master": "4.x-dev",
"dev-3.x": "3.x-dev",
"dev-2.x": "2.x-dev",
"dev-1.x": "1.x-dev"
}
@ -5304,9 +5303,9 @@
],
"support": {
"issues": "https://github.com/vimeo/psalm/issues",
"source": "https://github.com/vimeo/psalm/tree/3.18.2"
"source": "https://github.com/vimeo/psalm/tree/4.4.1"
},
"time": "2020-10-20T13:48:22+00:00"
"time": "2021-01-14T21:44:29+00:00"
},
{
"name": "webmozart/assert",
@ -5361,57 +5360,6 @@
},
"time": "2020-07-08T17:02:28+00:00"
},
{
"name": "webmozart/glob",
"version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/glob.git",
"reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
"reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe",
"shasum": ""
},
"require": {
"php": "^5.3.3|^7.0",
"webmozart/path-util": "^2.2"
},
"require-dev": {
"phpunit/phpunit": "^4.6",
"sebastian/version": "^1.0.1",
"symfony/filesystem": "^2.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Glob\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
}
],
"description": "A PHP implementation of Ant's glob.",
"support": {
"issues": "https://github.com/webmozart/glob/issues",
"source": "https://github.com/webmozart/glob/tree/master"
},
"time": "2015-12-29T11:14:33+00:00"
},
{
"name": "webmozart/path-util",
"version": "2.3.0",

View File

@ -24,6 +24,7 @@ class Setting implements ISetting {
/**
* @return string Lowercase a-z and underscore only identifier
*
* @since 11.0.0
*/
public function getIdentifier() {
@ -39,9 +40,8 @@ class Setting implements ISetting {
}
/**
* @return int whether the filter should be rather on the top or bottom of
* the admin section. The filters are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.
* @return int whether the filter should be rather on the top or bottom of the admin section. The filters are arranged in ascending order of the priority values. It is required to return a value between 0 and 100.
*
* @since 11.0.0
*/
public function getPriority() {
@ -49,7 +49,8 @@ class Setting implements ISetting {
}
/**
* @return bool True when the option can be changed for the stream
* @return true True when the option can be changed for the stream
*
* @since 11.0.0
*/
public function canChangeStream() {
@ -57,7 +58,8 @@ class Setting implements ISetting {
}
/**
* @return bool True when the option can be changed for the stream
* @return true True when the option can be changed for the stream
*
* @since 11.0.0
*/
public function isDefaultEnabledStream() {
@ -65,7 +67,8 @@ class Setting implements ISetting {
}
/**
* @return bool True when the option can be changed for the mail
* @return true True when the option can be changed for the mail
*
* @since 11.0.0
*/
public function canChangeMail() {
@ -73,7 +76,8 @@ class Setting implements ISetting {
}
/**
* @return bool True when the option can be changed for the stream
* @return false True when the option can be changed for the stream
*
* @since 11.0.0
*/
public function isDefaultEnabledMail() {

View File

@ -41,7 +41,6 @@ use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IL10N;
@ -138,7 +137,10 @@ class BookmarkController extends ApiController {
/**
* @param Bookmark $bookmark
* @return array
*
* @return ((int|mixed)[]|mixed)[]
*
* @psalm-return array{folders: array<array-key, int>, tags: array|mixed}
*/
private function _returnBookmarkAsArray(Bookmark $bookmark): array {
$array = $bookmark->toArray();
@ -160,7 +162,7 @@ class BookmarkController extends ApiController {
/**
* @return int|null
*/
private function _getRootFolderId(): int {
private function _getRootFolderId(): ?int {
if ($this->rootFolderId !== null) {
return $this->rootFolderId;
}
@ -185,9 +187,10 @@ class BookmarkController extends ApiController {
/**
* @param int $external
* @return int
*
* @return int|null
*/
private function toInternalFolderId(int $external): int {
private function toInternalFolderId(int $external): ?int {
if ($external === -1) {
return $this->_getRootFolderId();
}
@ -580,10 +583,12 @@ class BookmarkController extends ApiController {
/**
* @param $image
* @return DataDisplayResponse
*
* @return DataDisplayResponse|NotFoundResponse
*
* @throws Exception
*/
public function doImageResponse(?IImage $image): Response {
public function doImageResponse(?IImage $image) {
if ($image === null || $image->getData() === null) {
return new NotFoundResponse();
}

View File

@ -18,7 +18,6 @@ use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
class InternalBookmarkController extends ApiController {
@ -162,36 +161,40 @@ class InternalBookmarkController extends ApiController {
/**
*
* @return Response
* @return JSONResponse|\OCA\Bookmarks\ExportResponse
*
* @NoAdminRequired
*/
public function exportBookmark(): Response {
public function exportBookmark() {
return $this->publicController->exportBookmark();
}
/**
*
* @param int $id The id of the bookmark whose favicon shoudl be returned
* @return Response
*
* @return Http\DataDisplayResponse|Http\NotFoundResponse|Http\RedirectResponse
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @throws Exception
*/
public function getBookmarkImage($id): Response {
public function getBookmarkImage($id) {
return $this->publicController->getBookmarkImage($id);
}
/**
*
* @param int $id The id of the bookmark whose image shoudl be returned
* @return Response
*
* @return Http\DataDisplayResponse|Http\NotFoundResponse|Http\RedirectResponse
*
* @NoAdminRequired
* @NoCSRFRequired
*
* @throws Exception
*/
public function getBookmarkFavicon($id): Response {
public function getBookmarkFavicon($id) {
return $this->publicController->getBookmarkFavicon($id);
}

View File

@ -43,7 +43,7 @@ class SettingsController extends ApiController {
$this->l = $l;
}
private function getSetting(string $key, string $name, $default): JSONResponse {
private function getSetting(string $key, string $name, string $default): JSONResponse {
try {
$userValue = $this->config->getUserValue(
$this->userId,
@ -58,7 +58,7 @@ class SettingsController extends ApiController {
return new JSONResponse([$name => $userValue], Http::STATUS_OK);
}
private function setSetting($key, $value): JSONResponse {
private function setSetting(string $key, string $value): JSONResponse {
try {
$this->config->setUserValue(
$this->userId,

View File

@ -19,7 +19,6 @@ use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\StreamResponse;
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
use OCP\IL10N;
@ -92,9 +91,12 @@ class WebViewController extends Controller {
/**
* @NoAdminRequired
*
* @NoCSRFRequired
*
* @return AugmentedTemplateResponse
*/
public function index() {
public function index(): AugmentedTemplateResponse {
$res = new AugmentedTemplateResponse($this->appName, 'main', ['url'=>$this->urlGenerator]);
$policy = new ContentSecurityPolicy();
@ -111,10 +113,13 @@ class WebViewController extends Controller {
/**
* @param string $token
* @return Response
*
* @return NotFoundResponse|PublicTemplateResponse
*
* @NoAdminRequired
*
* @NoCSRFRequired
*
* @PublicPage
*/
public function link(string $token) {
@ -149,9 +154,12 @@ class WebViewController extends Controller {
/**
* @NoAdminRequired
*
* @NoCSRFRequired
*
* @return StreamResponse
*/
public function serviceWorker() {
public function serviceWorker(): StreamResponse {
$response = new StreamResponse(__DIR__.'/../../js/bookmarks-service-worker.js');
$response->setHeaders(['Content-Type' => 'application/javascript']);
$policy = new ContentSecurityPolicy();
@ -164,10 +172,14 @@ class WebViewController extends Controller {
/**
* @NoAdminRequired
*
* @NoCSRFRequired
*
* @PublicPage
*
* @return JSONResponse
*/
public function manifest() {
public function manifest(): JSONResponse {
$responseJS = [
'name' => $this->l->t('Bookmarks'),
'short_name' => $this->l->t('Bookmarks'),

View File

@ -50,7 +50,7 @@ class Bookmark extends Entity {
public static $columns = ['id', 'url', 'title', 'description', 'lastmodified', 'added', 'clickcount', 'last_preview', 'available', 'archived_file', 'user_id'];
public static $fields = ['id', 'url', 'title', 'description', 'lastmodified', 'added', 'clickcount', 'lastPreview', 'available', 'archivedFile', 'userId'];
public static function fromArray($props) {
public static function fromArray($props): self {
$bookmark = new Bookmark();
foreach ($props as $prop => $val) {
$bookmark->{'set' . $prop}($val);
@ -89,7 +89,7 @@ class Bookmark extends Entity {
$this->setClickcount($this->clickcount + 1);
}
public function setTitle($title): void {
public function setTitle(string $title): void {
// Cap title length at 255 because the DB doesn't have more space currently
if (mb_strlen($title) > 255) {
$title = mb_substr($title, 0, 254) . '…';

View File

@ -178,9 +178,12 @@ class BookmarkMapper extends QBMapper {
/**
* @param $userId
* @param QueryParameters $params
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Bookmark>
*/
public function findAll($userId, QueryParameters $params): array {
public function findAll(string $userId, QueryParameters $params): array {
$qb = $this->db->getQueryBuilder();
$bookmark_cols = array_map(static function ($c) {
return 'b.' . $c;
@ -430,14 +433,20 @@ class BookmarkMapper extends QBMapper {
}
/**
* *
*
* @param $token
* @param string $token
* @param QueryParameters $params
* @return array|Entity[]
*
*
* @return Entity[]
*
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*
* @psalm-return array<array-key, Bookmark>
*/
public function findAllInPublicFolder($token, QueryParameters $params): array {
public function findAllInPublicFolder(string $token, QueryParameters $params): array {
/** @var PublicFolder $publicFolder */
$publicFolder = $this->publicMapper->find($token);
@ -484,7 +493,10 @@ class BookmarkMapper extends QBMapper {
/**
* @param int $limit
* @param int $stalePeriod
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Bookmark>
*/
public function findPendingPreviews(int $limit, int $stalePeriod): array {
$qb = $this->db->getQueryBuilder();
@ -498,7 +510,9 @@ class BookmarkMapper extends QBMapper {
/**
* @param Entity $entity
* @return Entity|void
*
* @return Entity
* @psalm-return Bookmark
*/
public function delete(Entity $entity): Entity {
$this->eventDispatcher->dispatch(
@ -585,9 +599,11 @@ class BookmarkMapper extends QBMapper {
/**
* @param $userId
* @param string $userId
*
* @return int
*/
public function countBookmarksOfUser($userId) : int {
public function countBookmarksOfUser(string $userId) : int {
$qb = $this->db->getQueryBuilder();
$qb
->select($qb->func()->count('id'))

View File

@ -19,8 +19,17 @@ use OCP\AppFramework\Db\Entity;
* @method setUserId(string $userId)
*/
class Folder extends Entity {
/**
* @var string
*/
protected $title;
/**
* @var string
*/
protected $userId;
/**
* @var int
*/
protected $index;
public static $columns = ['id', 'title', 'user_id'];
@ -32,6 +41,11 @@ class Folder extends Entity {
$this->addType('userId', 'string');
}
/**
* @return array
*
* @psalm-return array{id: int, title: string, userId: string}
*/
public function toArray(): array {
return ['id' => $this->id, 'title' => $this->title, 'userId' => $this->userId];
}

View File

@ -71,7 +71,10 @@ class PublicFolderMapper extends QBMapper {
/**
* @param int $createdAt
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, PublicFolder>
*/
public function findAllCreatedBefore(int $createdAt): array {
$qb = $this->db->getQueryBuilder();

View File

@ -52,6 +52,11 @@ class Share extends Entity {
$this->addType('createdAt', 'integer');
}
/**
* @return array
*
* @psalm-return array{id: mixed, folderId: mixed, owner: mixed, participant: mixed, type: mixed, canWrite: mixed, canShare: mixed, createdAt: mixed}
*/
public function toArray(): array {
return ['id' => $this->id, 'folderId' => $this->folderId, 'owner' => $this->owner, 'participant' => $this->participant, 'type' => $this->type, 'canWrite' => $this->canWrite, 'canShare' => $this->canShare, 'createdAt' => $this->createdAt];
}

View File

@ -63,7 +63,10 @@ class ShareMapper extends QBMapper {
/**
* @param string $userId
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Share>
*/
public function findByOwner(string $userId): array {
$qb = $this->db->getQueryBuilder();
@ -76,7 +79,10 @@ class ShareMapper extends QBMapper {
/**
* @param int $type
* @param string $participant
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Share>
*/
public function findByParticipant(int $type, string $participant): array {
$qb = $this->db->getQueryBuilder();

View File

@ -38,6 +38,11 @@ class SharedFolder extends Entity {
$this->addType('title', 'string');
}
/**
* @return array
*
* @psalm-return array{title: mixed, userId: mixed}
*/
public function toArray(): array {
return ['title' => $this->title, 'userId' => $this->userId];
}

View File

@ -86,7 +86,10 @@ class SharedFolderMapper extends QBMapper {
/**
* @param string $userId
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, SharedFolder>
*/
public function findByOwner(string $userId): array {
$qb = $this->db->getQueryBuilder();
@ -103,7 +106,10 @@ class SharedFolderMapper extends QBMapper {
/**
* @param int $type
* @param string $participant
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, SharedFolder>
*/
public function findByParticipant(int $type, string $participant): array {
$qb = $this->db->getQueryBuilder();
@ -195,6 +201,11 @@ class SharedFolderMapper extends QBMapper {
return $this->findEntity($qb);
}
/**
* @return Entity[]
*
* @psalm-return array<array-key, SharedFolder>
*/
public function findByParticipantAndUser(int $type, string $participant, string $userId): array {
$qb = $this->db->getQueryBuilder();
$qb->select(array_map(static function ($c) {
@ -229,6 +240,11 @@ class SharedFolderMapper extends QBMapper {
));
}
/**
* @return Entity[]
*
* @psalm-return array<array-key, SharedFolder>
*/
public function findByUser(string $userId): array {
$qb = $this->db->getQueryBuilder();
$qb->select(array_map(static function ($c) {

View File

@ -159,11 +159,15 @@ class TreeMapper extends QBMapper {
/**
* Runs a sql query and returns an array of entities
* * Runs a sql query and returns an array of entities
* *
*
* @param IQueryBuilder $query
* @param string $type
*
* @return Entity[] all fetched entities
*
* @psalm-return list<Entity>
*/
protected function findEntitiesWithType(IQueryBuilder $query, string $type): array {
$cursor = $query->execute();
@ -255,7 +259,10 @@ class TreeMapper extends QBMapper {
/**
* @param int $folderId
* @param string $type
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Entity>
*/
public function findChildren(string $type, int $folderId): array {
$qb = $this->getChildrenQuery[$type];
@ -282,7 +289,10 @@ class TreeMapper extends QBMapper {
/**
* @param string $type
* @param int $itemId
* @return array|Entity[]
*
* @return Entity[]
*
* @psalm-return array<array-key, Entity>
*/
public function findParentsOf(string $type, int $itemId): array {
$qb = $this->parentQuery;
@ -421,12 +431,12 @@ class TreeMapper extends QBMapper {
}
/**
* @param $shareId
* @param int $shareId
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws UnsupportedOperation
*/
public function deleteShare($shareId): void {
public function deleteShare(int $shareId): void {
$share = $this->shareMapper->find($shareId);
$sharedFolders = $this->sharedFolderMapper->findByShare($shareId);
foreach ($sharedFolders as $sharedFolder) {
@ -645,9 +655,13 @@ class TreeMapper extends QBMapper {
/**
* @brief Lists bookmark folders' child folders (helper)
*
* @param $folderId
* @param int $layers The amount of levels to return
* @return array the children each in the format ["id" => int, "type" => 'bookmark' | 'folder' ]
*
* @return (array|int|mixed|string)[][] the children each in the format ["id" => int, "type" => 'bookmark' | 'folder' ]
*
* @psalm-return array<array-key, array{type: mixed|string, id: int, children?: array}>
*/
public function getChildrenOrder(int $folderId, $layers = 0): array {
$qb = $this->getChildrenOrderQuery;
@ -678,7 +692,10 @@ class TreeMapper extends QBMapper {
/**
* @param int $folderId
* @param int $layers [-1, inf]
* @return array
*
* @return (int|mixed)[][]
*
* @psalm-return array<array-key, array{parent_folder: int}>
*/
public function getSubFolders(int $folderId, $layers = 0): array {
$folders = array_map(function (Folder $folder) use ($layers, $folderId) {
@ -753,7 +770,12 @@ class TreeMapper extends QBMapper {
return $countChildren;
}
public function getChildren(int $folderId, int $layers = 0) {
/**
* @return (int|mixed|string)[][]
*
* @psalm-return array<array-key, array<string, int|mixed|string>>
*/
public function getChildren(int $folderId, int $layers = 0): array {
$qb = $this->getChildrenQuery[self::TYPE_BOOKMARK];
$this->selectFromType(self::TYPE_BOOKMARK, ['t.index', 't.type'], $qb);
$qb->setParameter('parent_folder', $folderId);
@ -824,11 +846,14 @@ class TreeMapper extends QBMapper {
/**
* @param Folder $folder
* @param $userId
*
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws UrlParseError
*
* @return void
*/
public function changeFolderOwner(Folder $folder, $userId) {
public function changeFolderOwner(Folder $folder, $userId): void {
$folder->setUserId($userId);
$this->folderMapper->update($folder);

View File

@ -23,23 +23,24 @@ class Client implements ClientInterface {
}
/**
* Sends a PSR-7 request and returns a PSR-7 response.
*
* Every technically correct HTTP response MUST be returned as-is, even if it represents an HTTP
* error response or a redirect instruction. The only special case is 1xx responses, which MUST
* be assembled in the HTTP client.
*
* The client MAY do modifications to the Request before sending it. Because PSR-7 objects are
* immutable, one cannot assume that the object passed to ClientInterface::sendRequest() will be the same
* object that is actually sent. For example, the Request object that is returned by an exception MAY
* be a different object than the one passed to sendRequest, so comparison by reference (===) is not possible.
*
* {@link
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message-meta.md#why-value-objects}
* * Sends a PSR-7 request and returns a PSR-7 response.
* *
* * Every technically correct HTTP response MUST be returned as-is, even if it represents an HTTP
* * error response or a redirect instruction. The only special case is 1xx responses, which MUST
* * be assembled in the HTTP client.
* *
* * The client MAY do modifications to the Request before sending it. Because PSR-7 objects are
* * immutable, one cannot assume that the object passed to ClientInterface::sendRequest() will be the same
* * object that is actually sent. For example, the Request object that is returned by an exception MAY
* * be a different object than the one passed to sendRequest, so comparison by reference (===) is not possible.
* *
* * {@link
* * https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message-meta.md#why-value-objects}
* *
*
* @param RequestInterface $request
*
* @return ResponseInterface
* @return Response
*
* @throws Exception
*/

View File

@ -14,11 +14,13 @@ use Psr\Http\Message\UriInterface;
class RequestFactory implements RequestFactoryInterface {
/**
* Create a new request.
* * Create a new request.
* *
*
* @param string $method The HTTP method associated with the request.
* @param UriInterface|string $uri The URI associated with the request.
* @return RequestInterface
*
* @return Request
*/
public function createRequest(string $method, $uri): RequestInterface {
return new Request($method, $uri);

View File

@ -22,7 +22,9 @@ class DeduplicateSharedFoldersRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Deduplicate shared bookmark folders';
@ -30,6 +32,8 @@ class DeduplicateSharedFoldersRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @return void
*/
public function run(IOutput $output) {
$qb = $this->db->getQueryBuilder();

View File

@ -59,7 +59,9 @@ class GroupSharesUpdateRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Update bookmark group shares';
@ -67,9 +69,12 @@ class GroupSharesUpdateRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @throws UnsupportedOperation
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*
* @return void
*/
public function run(IOutput $output) {
$deleted = 0;

View File

@ -23,7 +23,9 @@ class OrphanedSharesRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Remove orphaned bookmark shares';
@ -31,6 +33,8 @@ class OrphanedSharesRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @return void
*/
public function run(IOutput $output) {
$qb = $this->db->getQueryBuilder();

View File

@ -23,7 +23,9 @@ class OrphanedTreeItemsRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Remove orphaned bookmark tree items';
@ -31,6 +33,8 @@ class OrphanedTreeItemsRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @return void
*/
public function run(IOutput $output) {
$qb = $this->db->getQueryBuilder();

View File

@ -22,7 +22,9 @@ class SuperfluousSharedFoldersRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Remove superfluous shared bookmark folders';
@ -30,6 +32,8 @@ class SuperfluousSharedFoldersRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @return void
*/
public function run(IOutput $output) {
$qb = $this->db->getQueryBuilder();

View File

@ -33,7 +33,9 @@ class UninstallRepairStep implements IRepairStep {
}
/**
* Returns the step's name
* * Returns the step's name
*
* @return string
*/
public function getName() {
return 'Uninstall routine';
@ -41,6 +43,8 @@ class UninstallRepairStep implements IRepairStep {
/**
* @param IOutput $output
*
* @return void
*/
public function run(IOutput $output) {
foreach ($this->tables as $table) {

View File

@ -27,6 +27,8 @@ class Version000014000Date20181002094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -35,7 +37,8 @@ class Version000014000Date20181002094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
@ -150,6 +153,8 @@ class Version000014000Date20181002094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
$query = $this->db->getQueryBuilder();

View File

@ -28,6 +28,8 @@ class Version000014000Date20181029094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -36,7 +38,8 @@ class Version000014000Date20181029094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
@ -60,6 +63,8 @@ class Version000014000Date20181029094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
$query = $this->db->getQueryBuilder();

View File

@ -27,6 +27,8 @@ class Version000016005Date20190402094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -35,7 +37,8 @@ class Version000016005Date20190402094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
@ -53,6 +56,8 @@ class Version000016005Date20190402094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -27,6 +27,8 @@ class Version001000007Date20190721094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -35,7 +37,8 @@ class Version001000007Date20190721094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
@ -55,6 +58,8 @@ class Version001000007Date20190721094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -28,6 +28,8 @@ class Version003000000Date20191123094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -36,7 +38,9 @@ class Version003000000Date20191123094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -178,6 +182,8 @@ class Version003000000Date20191123094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
$qb = $this->db->getQueryBuilder();

View File

@ -28,6 +28,8 @@ class Version003000000Date20191129094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -36,7 +38,9 @@ class Version003000000Date20191129094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -55,6 +59,8 @@ class Version003000000Date20191129094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -29,6 +29,8 @@ class Version003000009Date20200505094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -37,7 +39,9 @@ class Version003000009Date20200505094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -55,6 +59,8 @@ class Version003000009Date20200505094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -28,6 +28,8 @@ class Version003001000Date20200526094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -36,7 +38,9 @@ class Version003001000Date20200526094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -71,6 +75,8 @@ class Version003001000Date20200526094721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
$qb = $this->db->getQueryBuilder();

View File

@ -28,6 +28,8 @@ class Version003001000Date20200526124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -36,7 +38,9 @@ class Version003001000Date20200526124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -54,6 +58,8 @@ class Version003001000Date20200526124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -29,6 +29,8 @@ class Version003004000Date20200807124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -37,7 +39,9 @@ class Version003004000Date20200807124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -59,6 +63,8 @@ class Version003004000Date20200807124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -29,6 +29,8 @@ class Version003004000Date20200817124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}
@ -37,7 +39,9 @@ class Version003004000Date20200817124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*
* @return ISchemaWrapper
*
* @throws SchemaException
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
@ -56,6 +60,8 @@ class Version003004000Date20200817124721 extends SimpleMigrationStep {
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
*
* @return void
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) {
}

View File

@ -34,9 +34,10 @@ class QueryParameters {
/**
* @param array $search
* @return QueryParameters
*
* @return static
*/
public function setSearch(array $search): QueryParameters {
public function setSearch(array $search): self {
$this->search = $search;
return $this;
}
@ -50,9 +51,10 @@ class QueryParameters {
/**
* @param array $tags
* @return QueryParameters
*
* @return static
*/
public function setTags(array $tags): QueryParameters {
public function setTags(array $tags): self {
$this->tags = $tags;
return $this;
}
@ -67,9 +69,10 @@ class QueryParameters {
/**
* @param int $limit
* @return QueryParameters
*
* @return static
*/
public function setLimit(int $limit): QueryParameters {
public function setLimit(int $limit): self {
$this->limit = $limit;
return $this;
}
@ -83,9 +86,10 @@ class QueryParameters {
/**
* @param int $offset
* @return QueryParameters
*
* @return static
*/
public function setOffset(int $offset): QueryParameters {
public function setOffset(int $offset): self {
$this->offset = $offset;
return $this;
}
@ -107,9 +111,10 @@ class QueryParameters {
/**
* @param string $sortBy
* @return QueryParameters
*
* @return static
*/
public function setSortBy(string $sortBy): QueryParameters {
public function setSortBy(string $sortBy): self {
$this->sortBy = $sortBy;
return $this;
}
@ -123,9 +128,10 @@ class QueryParameters {
/**
* @param string $conjunction
* @return QueryParameters
*
* @return static
*/
public function setConjunction(string $conjunction): QueryParameters {
public function setConjunction(string $conjunction): self {
if ($conjunction !== self::CONJ_AND && $conjunction !== self::CONJ_OR) {
throw new InvalidArgumentException("Conjunction value must be 'and' or 'or'");
}
@ -142,9 +148,10 @@ class QueryParameters {
/**
* @param int $folder
* @return QueryParameters
*
* @return static
*/
public function setFolder(int $folder): QueryParameters {
public function setFolder(int $folder): self {
$this->folder = $folder;
return $this;
}
@ -158,9 +165,10 @@ class QueryParameters {
/**
* @param string $url
* @return QueryParameters
*
* @return static
*/
public function setUrl(string $url): QueryParameters {
public function setUrl(string $url): self {
$this->url = $url;
return $this;
}
@ -174,9 +182,10 @@ class QueryParameters {
/**
* @param boolean $unavailable
* @return QueryParameters
*
* @return static
*/
public function setUnavailable(bool $unavailable): QueryParameters {
public function setUnavailable(bool $unavailable): self {
$this->unavailable = $unavailable;
return $this;
}
@ -190,9 +199,10 @@ class QueryParameters {
/**
* @param boolean $archived
* @return QueryParameters
*
* @return static
*/
public function setArchived(bool $archived): QueryParameters {
public function setArchived(bool $archived): self {
$this->archived = $archived;
return $this;
}
@ -206,9 +216,10 @@ class QueryParameters {
/**
* @param bool $untagged
* @return QueryParameters
*
* @return static
*/
public function setUntagged(bool $untagged): QueryParameters {
public function setUntagged(bool $untagged): self {
$this->untagged = $untagged;
return $this;
}

View File

@ -40,6 +40,9 @@ class Provider implements IProvider {
$this->url = $url;
}
/**
* @return string
*/
public function getId(): string {
return 'bookmarks';
}

View File

@ -136,7 +136,7 @@ class Authorizer {
* @param $request
* @return int
*/
public function getPermissionsForFolder(int $folderId, $request): int {
public function getPermissionsForFolder(int $folderId, IRequest $request): int {
$this->setCredentials($request);
$perms = self::PERM_NONE;
if (isset($this->userId)) {
@ -153,7 +153,7 @@ class Authorizer {
* @param $request
* @return int
*/
public function getPermissionsForBookmark(int $bookmarkId, $request): int {
public function getPermissionsForBookmark(int $bookmarkId, IRequest $request): int {
$this->setCredentials($request);
$perms = self::PERM_NONE;
if (isset($this->userId)) {
@ -168,7 +168,10 @@ class Authorizer {
/**
* @param $canWrite
* @param $canShare
*
* @return int
*
* @psalm-return positive-int
*/
protected function getMaskFromFlags($canWrite, $canShare): int {
$perms = self::PERM_READ;
@ -184,11 +187,13 @@ class Authorizer {
/**
* Check permissions
*
* @param $perm
* @param $perms
*
* @param int $perm
* @param int $perms
*
* @return boolean
*/
public static function hasPermission($perm, $perms): bool {
public static function hasPermission(int $perm, int $perms): bool {
return (boolean)($perms & $perm);
}
@ -223,7 +228,10 @@ class Authorizer {
/**
* @param string $token
* @param int $bookmarkId
*
* @return int
*
* @psalm-return 0|1
*/
public function getTokenPermissionsForBookmark(string $token, int $bookmarkId): int {
try {
@ -274,7 +282,10 @@ class Authorizer {
/**
* @param string $token
* @param int $folderId
*
* @return int
*
* @psalm-return 0|1
*/
public function getTokenPermissionsForFolder(string $token, int $folderId): int {
try {

View File

@ -107,7 +107,10 @@ class BookmarkService {
* @param string $description
* @param array $tags
* @param array $folders
* @param string $userId
*
* @return Bookmark
*
* @throws AlreadyExistsError
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
@ -115,7 +118,7 @@ class BookmarkService {
* @throws UrlParseError
* @throws UserLimitExceededError
*/
public function create($userId, $url = '', $title = null, $description = '', $tags = [], $folders = []): Bookmark {
public function create(string $userId, $url = '', $title = null, $description = '', $tags = [], $folders = []): Bookmark {
// Inspect web page (do some light scraping)
// allow only http(s) and (s)ftp
$protocols = '/^(https?|s?ftp)\:\/\//i';
@ -200,7 +203,10 @@ class BookmarkService {
* @param string|null $description
* @param array|null $tags
* @param array|null $folders
* @param string $userId
*
* @return Bookmark
*
* @throws AlreadyExistsError
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
@ -208,7 +214,7 @@ class BookmarkService {
* @throws UrlParseError
* @throws UserLimitExceededError
*/
public function update($userId, $id, string $url = null, string $title = null, string $description = null, array $tags = null, array $folders = null): ?Bookmark {
public function update(string $userId, $id, string $url = null, string $title = null, string $description = null, array $tags = null, array $folders = null): ?Bookmark {
/**
* @var $bookmark Bookmark
*/
@ -292,19 +298,21 @@ class BookmarkService {
}
/**
* @param $folderId
* @param $bookmarkId
* @param int $folderId
*
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws UnsupportedOperation
*/
public function removeFromFolder($folderId, $bookmarkId): void {
public function removeFromFolder(int $folderId, int $bookmarkId): void {
$this->treeMapper->removeFromFolders(TreeMapper::TYPE_BOOKMARK, $bookmarkId, [$folderId]);
}
/**
* @param $folderId
* @param $bookmarkId
* @param int $folderId
*
* @throws AlreadyExistsError
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
@ -312,7 +320,7 @@ class BookmarkService {
* @throws UrlParseError
* @throws UserLimitExceededError
*/
public function addToFolder($folderId, $bookmarkId): void {
public function addToFolder(int $folderId, int $bookmarkId): void {
/**
* @var $folder Folder
*/
@ -329,12 +337,12 @@ class BookmarkService {
}
/**
* @param $id
* @param int $id
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws UnsupportedOperation
*/
public function delete($id): void {
public function delete(int $id): void {
$bookmark = $this->bookmarkMapper->find($id);
$parents = $this->treeMapper->findParentsOf(TreeMapper::TYPE_BOOKMARK, $id);
foreach ($parents as $parent) {
@ -348,10 +356,13 @@ class BookmarkService {
/**
* @param $userId
* @param string $url
* @param string $userId
*
* @return Bookmark
*
* @throws DoesNotExistException
*/
public function findByUrl($userId, $url = ''): Bookmark {
public function findByUrl(string $userId, $url = ''): Bookmark {
$params = new QueryParameters();
/** @var Bookmark[] $bookmarks */
$bookmarks = $this->bookmarkMapper->findAll($userId, $params->setUrl($url));
@ -376,12 +387,12 @@ class BookmarkService {
}
/**
* @param $id
* @param int $id
* @return IImage|null
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*/
public function getImage($id): ?IImage {
public function getImage(int $id): ?IImage {
/**
* @var $bookmark Bookmark
*/
@ -390,12 +401,12 @@ class BookmarkService {
}
/**
* @param $id
* @param int $id
* @return IImage|null
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*/
public function getFavicon($id): ?IImage {
public function getFavicon(int $id): ?IImage {
/**
* @var $bookmark Bookmark
*/

View File

@ -242,7 +242,10 @@ class BookmarksParser {
* Get attributes of a \DOMNode
*
* @param DOMNode $node
*
* @return array
*
* @psalm-return array<string, mixed>
*/
private function getAttributes(DOMNode $node): array {
$attributes = [];

View File

@ -62,7 +62,8 @@ class FaviconPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if ($this->enabled === 'false') {

View File

@ -98,16 +98,21 @@ class HtmlImporter {
/**
* @brief Import Bookmarks from html
*
* @param int $userId
* @param string $content
* @param int|null $rootFolderId
* @return array
*
* @return (array|mixed|string)[][]
*
* @throws AlreadyExistsError
* @throws DoesNotExistException
* @throws HtmlParseError
* @throws MultipleObjectsReturnedException
* @throws UnauthorizedAccessError
* @throws UserLimitExceededError
*
* @psalm-return array{imported: list<array>, errors: array<array-key, mixed|string>}
*/
public function import($userId, string $content, int $rootFolderId = null): array {
$imported = [];
@ -147,13 +152,13 @@ class HtmlImporter {
}
/**
* @param int $userId
* @param string $userId
* @param array $folderParams
* @param int $parentId
* @param array $errors
* @param int|null $index
*
* @return array
* @return (array[]|int|mixed|string)[]
*
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
@ -161,11 +166,14 @@ class HtmlImporter {
* @throws AlreadyExistsError
* @throws UserLimitExceededError
* @throws UnsupportedOperation
*
* @psalm-return array{type: string, id: int, title: mixed, children: list<array>}
*/
private function importFolder($userId, array $folderParams, int $parentId, &$errors = [], $index = null): array {
private function importFolder(string $userId, array $folderParams, int $parentId, &$errors = [], $index = null): array {
$folder = new Folder();
$folder->setUserId($userId);
$folder->setTitle($folderParams['title']);
/** @var Folder $folder */
$folder = $this->folderMapper->insert($folder);
$this->treeMapper->move(TreeMapper::TYPE_FOLDER, $folder->getId(), $parentId, $index);
$newFolder = ['type' => 'folder', 'id' => $folder->getId(), 'title' => $folderParams['title'], 'children' => []];
@ -186,7 +194,7 @@ class HtmlImporter {
}
/**
* @param int $userId
* @param string $userId
* @param int $folderId
* @param array $bookmark
* @param null $index
@ -196,7 +204,7 @@ class HtmlImporter {
* @throws UnsupportedOperation
* @throws UserLimitExceededError
*/
private function importBookmark($userId, int $folderId, array $bookmark, $index = null) {
private function importBookmark(string $userId, int $folderId, array $bookmark, $index = null) {
$bm = new Bookmark();
$bm->setUserId($userId);
$bm->setUrl($bookmark['href']);
@ -207,6 +215,7 @@ class HtmlImporter {
}
// insert bookmark
/** @var Bookmark $bm */
$bm = $this->bookmarkMapper->insertOrUpdate($bm);
// add to folder
$this->treeMapper->addToFolders(TreeMapper::TYPE_BOOKMARK, $bm->getId(), [$folderId], $index);

View File

@ -43,7 +43,8 @@ class DefaultBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if (!isset($bookmark)) {

View File

@ -34,7 +34,8 @@ class PageresBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if (!isset($bookmark)) {
@ -55,10 +56,12 @@ class PageresBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param string $serverPath
* @param string $url
* @return Image|null
*
* @return Image
*
* @throws Exception
*/
protected function fetchImage(string $serverPath, string $url): ?Image {
protected function fetchImage(string $serverPath, string $url): Image {
$tempPath = $this->tempManager->getTemporaryFile('.png');
$tempDir = dirname($tempPath);
$tempFile = basename($tempPath, '.png');

View File

@ -52,7 +52,8 @@ class ScreeenlyBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if (!isset($bookmark)) {

View File

@ -50,7 +50,8 @@ class ScreenshotMachineBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if (!isset($bookmark)) {

View File

@ -50,7 +50,8 @@ class WebshotBookmarkPreviewer implements IBookmarkPreviewer {
/**
* @param Bookmark $bookmark
* @return IImage|null
*
* @return Image|null
*/
public function getImage($bookmark): ?IImage {
if (!isset($bookmark)) {

View File

@ -22,7 +22,7 @@ class UrlNormalizer {
* @return string
* @throws UrlParseError
*/
public function normalize($urlString): string {
public function normalize(string $urlString): string {
if (isset($this->cache[$urlString])) {
return $this->cache[$urlString];
}

View File

@ -27,7 +27,8 @@ class AdminSection implements IIconSection {
/**
* returns the ID of the section. It is supposed to be a lower case string
*
* @returns string
*
* @return string
*/
public function getID() {
return 'bookmarks';
@ -43,14 +44,15 @@ class AdminSection implements IIconSection {
return $this->l->t('Bookmarks');
}
/**
* @return string
*/
public function getIcon() {
return $this->urlgen->imagePath('bookmarks', 'bookmarks-black.svg');
}
/**
* @return int whether the form should be rather on the top or bottom of
* the settings navigation. The sections are arranged in ascending order of
* the priority values. It is required to return a value between 0 and 99.
* @return int whether the form should be rather on the top or bottom of the settings navigation. The sections are arranged in ascending order of the priority values. It is required to return a value between 0 and 99.
*/
public function getPriority() {
return 80;

View File

@ -53,9 +53,7 @@ class AdminSettings implements ISettings {
}
/**
* @return int whether the form should be rather on the top or bottom of
* the admin section. The forms are arranged in ascending order of the
* priority values. It is required to return a value between 0 and 100.
* @return int whether the form should be rather on the top or bottom of the admin section. The forms are arranged in ascending order of the priority values. It is required to return a value between 0 and 100.
*/
public function getPriority() {
return 50;

View File

@ -4,15 +4,12 @@
~
~ This file is licensed under the Affero General Public License version 3 or later. See the COPYING file.
-->
<psalm
totallyTyped="true"
errorLevel="5"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="tests/psalm-baseline.xml"
errorLevel="1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="lib" />
@ -26,19 +23,4 @@
<directory name="vendor/phpunit/php-code-coverage" />
</ignoreFiles>
</extraFiles>
<issueHandlers>
<UndefinedClass>
<errorLevel type="suppress">
<referencedClass name="OC" />
</errorLevel>
</UndefinedClass>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
<referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
<referencedClass name="Doctrine\DBAL\Driver\Statement" />
<referencedClass name="Doctrine\DBAL\Schema\Table" />
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>