diff --git a/.editorconfig b/.editorconfig
index 257221d..5e9a93e 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -12,3 +12,6 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
+
+[*.yml]
+indent_size = 2
diff --git a/.gitattributes b/.gitattributes
index a8d4072..d64c7db 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,10 +1,8 @@
# Ignore all test and documentation for archive
-/.editorconfig export-ignore
-/.github export-ignore
-/.gitattributes export-ignore
-/.gitignore export-ignore
-/.scrutinizer.yml export-ignore
-/.travis.yml export-ignore
-/phpunit.xml.dist export-ignore
+.* export-ignore
+*.dist export-ignore
+*.neon export-ignore
+*.yml export-ignore
/tests export-ignore
/docs export-ignore
+/Makefile export-ignore
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
deleted file mode 100644
index b37dc6c..0000000
--- a/.github/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-### What steps will reproduce the problem?
-
-### What's expected?
-
-### What do you get instead?
-
-
-### Additional info
-
-| Q | A
-| ----------------------- | ---
-| Yii version |
-| Yii Auth Client version |
-| Yii HTTP Client version |
-| PHP version |
-| Operating system |
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index cecccf6..0000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,6 +0,0 @@
-| Q | A
-| ------------- | ---
-| Is bugfix? | ✔️/❌
-| New feature? | ✔️/❌
-| Breaks BC? | ✔️/❌
-| Fixed issues |
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b7e29fa..c41c47d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,47 +1,25 @@
name: build
-on: [push, pull_request]
+on:
+ pull_request: &ignore-paths
+ paths-ignore:
+ - 'docs/**'
+ - '.github/CONTRIBUTING.md'
+ - '.github/FUNDING.yml'
+ - '.github/SECURITY.md'
+ - 'README.md'
+ - 'CHANGELOG.md'
+ - 'LICENSE.md'
+ - '.gitignore'
+ - '.gitattributes'
+ - '.editorconfig'
+ - 'docker-compose.yml'
+ - 'Makefile'
-env:
- DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
+ push: *ignore-paths
jobs:
phpunit:
- name: PHP ${{ matrix.php }} on ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- os: [ubuntu-latest]
- php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
-
- steps:
- - name: Checkout
- uses: actions/checkout@v5
- - name: Install PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php }}
- - name: Get composer cache directory
- id: composer-cache
- run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- - name: Cache composer dependencies
- uses: actions/cache@v4
- with:
- path: ${{ steps.composer-cache.outputs.dir }}
- key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- restore-keys: ${{ runner.os }}-composer-
- - name: Install dependencies
- run: composer update $DEFAULT_COMPOSER_FLAGS
- - name: Run unit tests with coverage
- run: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --colors=always
- if: matrix.php == '7.1'
- - name: Run unit tests without coverage
- run: vendor/bin/phpunit --verbose --colors=always
- if: matrix.php != '7.1'
- - name: Upload code coverage
- run: |
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- if: matrix.php == '7.1'
- continue-on-error: true # if is fork
+ uses: yiisoft/yii2-actions/.github/workflows/phpunit.yml@master
+ secrets:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
new file mode 100644
index 0000000..b198065
--- /dev/null
+++ b/.github/workflows/linter.yml
@@ -0,0 +1,28 @@
+name: linter
+
+permissions:
+ contents: read
+
+on:
+ pull_request: &ignore-paths
+ paths-ignore:
+ - 'docs/**'
+ - '.github/CONTRIBUTING.md'
+ - '.github/FUNDING.yml'
+ - '.github/SECURITY.md'
+ - 'README.md'
+ - 'CHANGELOG.md'
+ - 'LICENSE.md'
+ - '.gitignore'
+ - '.gitattributes'
+ - '.editorconfig'
+ - 'docker-compose.yml'
+ - 'Makefile'
+
+ push: *ignore-paths
+
+jobs:
+ phpcs:
+ uses: yiisoft/yii2-actions/.github/workflows/linter.yml@master
+ with:
+ directories: src/ tests/
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
new file mode 100644
index 0000000..16a8ecd
--- /dev/null
+++ b/.github/workflows/static.yml
@@ -0,0 +1,26 @@
+name: static analysis
+
+permissions:
+ contents: read
+
+on:
+ pull_request: &ignore-paths
+ paths-ignore:
+ - 'docs/**'
+ - '.github/CONTRIBUTING.md'
+ - '.github/FUNDING.yml'
+ - '.github/SECURITY.md'
+ - 'README.md'
+ - 'CHANGELOG.md'
+ - 'LICENSE.md'
+ - '.gitignore'
+ - '.gitattributes'
+ - '.editorconfig'
+ - 'docker-compose.yml'
+ - 'Makefile'
+
+ push: *ignore-paths
+
+jobs:
+ phpstan:
+ uses: yiisoft/yii2-actions/.github/workflows/phpstan.yml@master
diff --git a/.gitignore b/.gitignore
index 45574d3..4f2a219 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ composer.phar
phpunit.phar
# local phpunit config
/phpunit.xml
+.phpunit.result.cache
# local tests configuration
/tests/data/config.local.php
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7500947..e700d06 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,12 +1,15 @@
Yii Framework 2 authclient extension Change Log
===============================================
-2.2.18 under development
+3.0.0 under development
------------------------
- Enh #398: Updated VKontakte client to use `vk.ru` domains instead of `vk.com` (DMITRII1548)
- Bug #396: Fix `BaseOAuth::refreshAccessToken()` when no refresh token exists (kalmer)
- Bug #393: Fix type for `BaseOAuth::$accessToken` (mspirkov)
+- Enh #403: Applying Yii2 coding standards (@s1lver)
+- Enh #403: Raise min version to PHP 7.4 (@s1lver)
+- Bug #401: Explicit null in `InvalidResponseException` constructor (@cyansoftdev)
2.2.17 February 13, 2025
------------------------
diff --git a/Makefile b/Makefile
index 64e2b59..465f35e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,25 @@
+help: ## Display help information.
+ @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
-# default versions to test against
-# these can be overridden by setting the environment variables in the shell
-PHP_VERSION=php-5.6.8
-YII_VERSION=dev-master
+start: ## Start services
+ docker compose up -d
-# ensure all the configuration variables above are in environment of the shell commands below
-export
+test: ## Run tests. Params: {{ v=8.1 }}.
+ PHP_VERSION=$(filter-out $@,$(v)) docker compose build --pull yii2-authclient-php
+ PHP_VERSION=$(filter-out $@,$(v)) docker compose up -d
+ PHP_VERSION=$(filter-out $@,$(v)) docker compose exec yii2-authclient-php sh -c "php -v && composer update && vendor/bin/phpunit --coverage-clover=coverage.xml"
+ make down
-help:
- @echo "make test - run phpunit tests using a docker environment"
-# @echo "make clean - stop docker and remove container"
+build: ## Build an image from a docker-compose file. Params: {{ v=8.1 }}.
+ PHP_VERSION=$(filter-out $@,$(v)) docker compose up -d --build
-test: docker-php
- composer require "yiisoft/yii2:${YII_VERSION}" --prefer-dist --ignore-platform-reqs
- composer install --prefer-dist --ignore-platform-reqs
- docker run --rm=true -v $(shell pwd):/opt/test yiitest/php:${PHP_VERSION} phpunit --verbose --color
+down: ## Stop and remove containers, networks
+ docker compose down
-docker-php: dockerfiles
- cd tests/docker/php && sh build.sh
-
-dockerfiles:
- test -d tests/docker || git clone https://github.com/cebe/jenkins-test-docker tests/docker
- cd tests/docker && git checkout -- . && git pull
- mkdir -p tests/dockerids
+sh: ## Enter the container with the application
+ docker exec -it yii2-authclient-php-1 bash
+static-analysis: ## Run code static analyze. Params: {{ v=8.1 }}.
+ make build v=$(filter-out $@,$(v))
+ PHP_VERSION=$(filter-out $@,$(v)) docker compose exec yii2-authclient-php sh -c "php -v && composer update && vendor/bin/phpstan analyse --memory-limit 512M"
+ make down
diff --git a/README.md b/README.md
index 4636ecf..2bbc06b 100644
--- a/README.md
+++ b/README.md
@@ -16,10 +16,15 @@ Documentation is at [docs/guide/README.md](https://github.com/yiisoft/yii2-authc
[](https://packagist.org/packages/yiisoft/yii2-authclient)
[](https://packagist.org/packages/yiisoft/yii2-authclient)
[](https://github.com/yiisoft/yii2-authclient/actions)
+[](https://codecov.io/gh/yiisoft/yii2-authclient)
Installation
------------
+> [!IMPORTANT]
+> - The minimum required [PHP](https://www.php.net/) version is PHP `7.4`.
+> - It works best with PHP `8`.
+
The preferred way to install this extension is through [composer](https://getcomposer.org/download/).
Either run
diff --git a/composer.json b/composer.json
index 881d12f..52b0252 100644
--- a/composer.json
+++ b/composer.json
@@ -18,13 +18,16 @@
}
],
"require": {
- "yiisoft/yii2": "~2.0.13",
+ "php": ">=7.4",
+ "yiisoft/yii2": "~2.0.54",
"yiisoft/yii2-httpclient": "~2.0.5",
"paragonie/random_compat": ">=1"
},
"require-dev": {
- "cweagans/composer-patches": "^1.7",
- "phpunit/phpunit": "4.8.34"
+ "phpunit/phpunit": "^9.6",
+ "phpstan/phpstan": "^2.1",
+ "phpstan/phpstan-phpunit": "^2.0",
+ "yiisoft/yii2-coding-standards": "^3.0"
},
"suggest": {
"web-token/jwt-checker": "required for JWS, JWT or JWK related flows like OpenIDConnect",
@@ -41,7 +44,9 @@
}
],
"autoload": {
- "psr-4": { "yii\\authclient\\": "src" }
+ "psr-4": {
+ "yii\\authclient\\": "src"
+ }
},
"autoload-dev": {
"psr-4": { "yiiunit\\extensions\\authclient\\": "tests" }
@@ -49,20 +54,10 @@
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
- },
- "patches": {
- "phpunit/phpunit-mock-objects": {
- "Fix PHP 7 and 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_mock_objects.patch"
- },
- "phpunit/phpunit": {
- "Fix PHP 7 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php7.patch",
- "Fix PHP 8 compatibility": "https://yiisoft.github.io/phpunit-patches/phpunit_php8.patch"
- }
}
},
"config": {
"allow-plugins": {
- "cweagans/composer-patches": true,
"yiisoft/yii2-composer": true
}
}
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..c9f0e01
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,23 @@
+---
+
+services:
+
+ php:
+ image: "yiisoftware/yii2-php:${PHP_VERSION:-8.1}-apache"
+ networks:
+ - yii2-authclient
+ volumes:
+ - .:/app # Mount source-code for development
+ environment:
+ XDEBUG_MODE: ${XDEBUG_MODE:-coverage} # Setup "debug" to enable debugging
+ XDEBUG_CONFIG: "client_host=host.docker.internal"
+ XDEBUG_TRIGGER: ${XDEBUG_TRIGGER:-yes}
+ command: >
+ bash -c "
+ docker-php-ext-enable xdebug;
+ apache2-foreground"
+
+networks:
+ yii2-authclient:
+ driver: bridge
+ name: yii2-authclient
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
new file mode 100644
index 0000000..17897b2
--- /dev/null
+++ b/phpcs.xml.dist
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+ /OpenIdConnect\.php$
+
+
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
new file mode 100644
index 0000000..1cb3b4a
--- /dev/null
+++ b/phpstan-baseline.neon
@@ -0,0 +1,2365 @@
+parameters:
+ ignoreErrors:
+ -
+ message: '#^Access to an undefined property yii\\console\\Response\|yii\\web\\Response\:\:\$content\.$#'
+ identifier: property.notFound
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:get\(\)\.$#'
+ identifier: method.notFound
+ count: 8
+ path: src/AuthAction.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:getQueryParam\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: src/AuthAction.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Response\|yii\\web\\Response\:\:redirect\(\)\.$#'
+ identifier: method.notFound
+ count: 3
+ path: src/AuthAction.php
+
+ -
+ message: '#^Call to function is_callable\(\) with callable\(\)\: mixed will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Cannot access property \$loginUrl on array\|string\|yii\\web\\User\.$#'
+ identifier: property.nonObject
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Cannot call method getReturnUrl\(\) on array\|string\|yii\\web\\User\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Class yii\\authclient\\AuthAction extends generic class yii\\base\\Action but does not specify its types\: T$#'
+ identifier: missingType.generics
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:auth\(\) has parameter \$authUrlParams with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:authOAuth1\(\) has parameter \$authUrlParams with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:authOAuth2\(\) has parameter \$authUrlParams with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:redirect\(\) should return yii\\web\\Response but returns yii\\console\\Response\|yii\\web\\Response\.$#'
+ identifier: return.type
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:run\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:setCancelUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Method yii\\authclient\\AuthAction\:\:setSuccessUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Parameter \#1 \$url of static method yii\\helpers\\BaseUrl\:\:to\(\) expects array\|string, array\|string\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Property yii\\authclient\\AuthAction\:\:\$user type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Property yii\\authclient\\AuthAction\:\:\$user with generic class yii\\web\\User does not specify its types\: T$#'
+ identifier: missingType.generics
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Strict comparison using \=\=\= between string and null will always evaluate to false\.$#'
+ identifier: identical.alwaysFalse
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Unreachable statement \- code above always terminates\.$#'
+ identifier: deadCode.unreachable
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Variable \$token in empty\(\) always exists and is not falsy\.$#'
+ identifier: empty.variable
+ count: 1
+ path: src/AuthAction.php
+
+ -
+ message: '#^Class yii\\authclient\\BaseClient has PHPDoc tag @property for property \$normalizeUserAttributeMap with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Class yii\\authclient\\BaseClient has PHPDoc tag @property for property \$userAttributes with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Class yii\\authclient\\BaseClient has PHPDoc tag @property for property \$viewOptions with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Class yii\\authclient\\BaseClient has PHPDoc tag @property\-read for property \$requestOptions with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:createHttpClient\(\) has parameter \$reference with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:defaultNormalizeUserAttributeMap\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:defaultRequestOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:defaultViewOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:getNormalizeUserAttributeMap\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:getRequestOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:getUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:getViewOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:normalizeUserAttributes\(\) has parameter \$attributes with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:normalizeUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setHttpClient\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setHttpClient\(\) has parameter \$httpClient with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setId\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setName\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setNormalizeUserAttributeMap\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setNormalizeUserAttributeMap\(\) has parameter \$normalizeUserAttributeMap with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setRequestOptions\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setRequestOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setStateStorage\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setStateStorage\(\) has parameter \$stateStorage with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setTitle\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setUserAttributes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setUserAttributes\(\) has parameter \$userAttributes with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setViewOptions\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseClient\:\:setViewOptions\(\) has parameter \$viewOptions with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Parameter \#1 \$key of function array_key_exists expects int\|string, bool\|float\|int\|string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Parameter \#1 \$type of static method yii\\BaseYii\\:\:createObject\(\) expects array\{class\?\: class\-string\, __class\?\: class\-string\\}\|\(callable\(\)\: mixed\)\|class\-string\, array\|string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_httpClient type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_normalizeUserAttributeMap type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_requestOptions type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_stateStorage type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_userAttributes type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseClient\:\:\$_viewOptions type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Unable to resolve the template type T in call to static method yii\\BaseYii\\:\:createObject\(\)$#'
+ identifier: argument.templateType
+ count: 1
+ path: src/BaseClient.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:getQueryParams\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Cannot call method getRoute\(\) on yii\\console\\Controller\\|yii\\web\\Controller\\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:api\(\) has parameter \$apiSubUrl with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:api\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:api\(\) has parameter \$headers with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:api\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:api\(\) should return array but returns array\|string\|null\.$#'
+ identifier: return.type
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:beforeApiRequestSend\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:composeUrl\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:createHttpClient\(\) has parameter \$reference with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:createSignatureMethod\(\) has parameter \$signatureMethodConfig with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:createToken\(\) has parameter \$tokenConfig with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:defaultRequestOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:sendRequest\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setAccessToken\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setAccessToken\(\) has parameter \$token with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setHttpClient\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setHttpClient\(\) has parameter \$httpClient with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setReturnUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setSignatureMethod\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Method yii\\authclient\\BaseOAuth\:\:setSignatureMethod\(\) has parameter \$signatureMethod with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Parameter \#1 \$haystack of function stripos expects string, string\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseOAuth\:\:\$_accessToken \(array\|yii\\authclient\\OAuthToken\|null\) is never assigned array so it can be removed from the property type\.$#'
+ identifier: property.unusedType
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseOAuth\:\:\$_accessToken type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseOAuth\:\:\$_signatureMethod type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Property yii\\authclient\\BaseOAuth\:\:\$parametersToKeepInReturnUrl type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Result of && is always false\.$#'
+ identifier: booleanAnd.alwaysFalse
+ count: 1
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Unable to resolve the template type T in call to static method yii\\BaseYii\\:\:createObject\(\)$#'
+ identifier: argument.templateType
+ count: 2
+ path: src/BaseOAuth.php
+
+ -
+ message: '#^Cannot call method delete\(\) on array\|string\|yii\\caching\\Cache\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Cannot call method get\(\) on array\|string\|yii\\caching\\Cache\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Cannot call method set\(\) on array\|string\|yii\\caching\\Cache\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\CacheStateStorage\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\CacheStateStorage\:\:set\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Property yii\\authclient\\CacheStateStorage\:\:\$cache \(array\|string\|yii\\caching\\Cache\) does not accept object\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Property yii\\authclient\\CacheStateStorage\:\:\$cache type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Property yii\\authclient\\CacheStateStorage\:\:\$prefix has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: src/CacheStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\ClientInterface\:\:getUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/ClientInterface.php
+
+ -
+ message: '#^Method yii\\authclient\\ClientInterface\:\:getViewOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/ClientInterface.php
+
+ -
+ message: '#^Method yii\\authclient\\ClientInterface\:\:setId\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/ClientInterface.php
+
+ -
+ message: '#^Method yii\\authclient\\ClientInterface\:\:setName\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/ClientInterface.php
+
+ -
+ message: '#^Method yii\\authclient\\ClientInterface\:\:setTitle\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/ClientInterface.php
+
+ -
+ message: '#^Method yii\\authclient\\Collection\:\:createClient\(\) has parameter \$config with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Method yii\\authclient\\Collection\:\:getClient\(\) should return yii\\authclient\\ClientInterface but returns object\.$#'
+ identifier: return.type
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Method yii\\authclient\\Collection\:\:setClients\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Method yii\\authclient\\Collection\:\:setClients\(\) has parameter \$clients with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Property yii\\authclient\\Collection\:\:\$_clients type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Property yii\\authclient\\Collection\:\:\$httpClient type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Unable to resolve the template type T in call to static method yii\\BaseYii\\:\:createObject\(\)$#'
+ identifier: argument.templateType
+ count: 1
+ path: src/Collection.php
+
+ -
+ message: '#^Parameter \#1 \$message of method Exception\:\:__construct\(\) expects string, string\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/InvalidResponseException.php
+
+ -
+ message: '#^Call to an undefined method object\:\:getToken\(\)\.$#'
+ identifier: method.notFound
+ count: 3
+ path: src/OAuth1.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:get\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: src/OAuth1.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:beforeRequestSend\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:buildAuthUrl\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:composeAuthorizationHeader\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:composeAuthorizationHeader\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:composeSignatureBaseString\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:fetchAccessToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:fetchRequestToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:generateCommonRequestParams\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:refreshAccessToken\(\) should return yii\\authclient\\OAuthToken but returns null\.$#'
+ identifier: return.type
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth1\:\:signRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Parameter \#2 \$token of method yii\\authclient\\OAuth1\:\:signRequest\(\) expects yii\\authclient\\OAuthToken\|null, object given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Property yii\\authclient\\OAuth1\:\:\$authorizationHeaderMethods type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth1.php
+
+ -
+ message: '#^Access to an undefined property yii\\console\\Application\|yii\\web\\Application\\:\:\$session\.$#'
+ identifier: property.notFound
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:get\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:applyClientCredentialsToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:authenticateClient\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:authenticateUser\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:authenticateUserJwt\(\) has parameter \$options with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:authenticateUserJwt\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:authenticateUserJwt\(\) has parameter \$signature with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:buildAuthUrl\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:createToken\(\) has parameter \$tokenConfig with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuth2\:\:fetchAccessToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuth2.php
+
+ -
+ message: '#^Class yii\\authclient\\OAuthToken has PHPDoc tag @property\-read for property \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:getParams\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:getRefreshToken\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:hasRefreshToken\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setExpireDuration\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setExpireDurationParamKey\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setParam\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setParams\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setParams\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setRefreshToken\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setToken\(\) should return \$this\(yii\\authclient\\OAuthToken\) but return statement is missing\.$#'
+ identifier: return.missing
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Method yii\\authclient\\OAuthToken\:\:setTokenSecret\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Property yii\\authclient\\OAuthToken\:\:\$_params type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OAuthToken.php
+
+ -
+ message: '#^Argument of an invalid type array\\|false supplied for foreach, only iterables are supported\.$#'
+ identifier: foreach.nonIterable
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:get\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: src/OpenId.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:getHostInfo\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Cannot access offset ''fragment''\|''host''\|''pass''\|''path''\|''port''\|''scheme''\|''user'' on array\{scheme\?\: string, host\?\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\|false\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Cannot access offset ''query'' on array\{scheme\?\: string, host\?\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\|false\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^If condition is always true\.$#'
+ identifier: if.alwaysTrue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:buildAuthUrlV1\(\) has parameter \$serverInfo with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:buildAuthUrlV2\(\) has parameter \$serverInfo with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:buildAxParams\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:buildSregParams\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:buildUrl\(\) has parameter \$additionalUrl with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:defaultRequestOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:discover\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:fetchAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:fetchAxAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:fetchSregAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:getTrustRoot\(\) should return string but returns string\|null\.$#'
+ identifier: return.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:sendRequest\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:sendRequest\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:setClaimedId\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:setReturnUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenId\:\:setTrustRoot\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#1 \$arr1 of function array_diff_assoc expects an array of values castable to string, array\\|string\> given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#1 \$arr1 of function array_merge expects array, array\\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#1 \$content of method yii\\authclient\\OpenId\:\:extractHtmlTagValue\(\) expects string, array\|string given\.$#'
+ identifier: argument.type
+ count: 5
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#1 \$encoded_string of function parse_str expects string, int\<0, 65535\>\|string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#2 \$additionalUrl of method yii\\authclient\\OpenId\:\:buildUrl\(\) expects array\|string, string\|true given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#2 \$arr2 of function array_diff_assoc expects an array of values castable to string, array\\|string\> given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#2 \$subject of function preg_match expects string, array\|string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#2 \$subject of function preg_match_all expects string, array\|string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Parameter \#2 \.\.\.\$args of function array_merge expects array, array\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenId\:\:\$_trustRoot \(string\) does not accept string\|null\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenId\:\:\$axToSregMap type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenId\:\:\$data type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenId\:\:\$optionalAttributes type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenId\:\:\$requiredAttributes type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Variable \$content in isset\(\) always exists and is not nullable\.$#'
+ identifier: isset.variable
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Variable \$optionalAttributes in empty\(\) always exists and is always falsy\.$#'
+ identifier: empty.variable
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Variable \$requiredAttributes in empty\(\) always exists and is always falsy\.$#'
+ identifier: empty.variable
+ count: 1
+ path: src/OpenId.php
+
+ -
+ message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Call to method loadAndVerifyWithKeySet\(\) on an unknown class Jose\\Component\\Signature\\JWSLoader\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Call to static method createFromValues\(\) on an unknown class Jose\\Component\\KeyManagement\\JWKFactory\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Class yii\\authclient\\OpenIdConnect has PHPDoc tag @property for property \$configParams with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Checker\\AlgorithmChecker not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Checker\\HeaderCheckerManager not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Core\\AlgorithmManager not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Signature\\JWSLoader not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Signature\\JWSTokenSupport not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Signature\\JWSVerifier not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Signature\\Serializer\\CompactSerializer not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Instantiated class Jose\\Component\\Signature\\Serializer\\JWSSerializerManager not found\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:applyClientCredentialsToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:buildAuthUrl\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:createToken\(\) has parameter \$tokenConfig with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:discoverConfig\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:discoverConfig\(\) should return array but returns array\|string\|null\.$#'
+ identifier: return.type
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:fetchAccessToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:getConfigParams\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:getJwkSet\(\) has invalid return type yii\\authclient\\JWKSet\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:getJwsLoader\(\) has invalid return type Jose\\Component\\Signature\\JWSLoader\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:loadJws\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:setCache\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:setCache\(\) has parameter \$cache with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:setConfigParams\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:setConfigParams\(\) has parameter \$configParams with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:setValidateAuthNonce\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:validateClaims\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Method yii\\authclient\\OpenIdConnect\:\:validateClaims\(\) has parameter \$claims with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$_cache \(string\|yii\\caching\\Cache\) does not accept array\|string\|yii\\caching\\Cache\|null\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$_configParams type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$_jwkSet has unknown class yii\\authclient\\JWKSet as its type\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$_jwsLoader has unknown class Jose\\Component\\Signature\\JWSLoader as its type\.$#'
+ identifier: class.notFound
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$allowedJwsAlgorithms type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Property yii\\authclient\\OpenIdConnect\:\:\$defaultIdTokenClaims type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/OpenIdConnect.php
+
+ -
+ message: '#^Cannot call method get\(\) on array\|string\|yii\\web\\Session\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Cannot call method remove\(\) on array\|string\|yii\\web\\Session\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Cannot call method set\(\) on array\|string\|yii\\web\\Session\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\SessionStateStorage\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\SessionStateStorage\:\:set\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Property yii\\authclient\\SessionStateStorage\:\:\$session \(array\|string\|yii\\web\\Session\) does not accept object\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Property yii\\authclient\\SessionStateStorage\:\:\$session type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/SessionStateStorage.php
+
+ -
+ message: '#^Method yii\\authclient\\StateStorageInterface\:\:set\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/StateStorageInterface.php
+
+ -
+ message: '#^Cannot call method getToken\(\) on yii\\authclient\\OAuthToken\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:defaultViewOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:fetchAccessToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:fetchClientAccessToken\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:fetchClientAuthCode\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Facebook\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Offset ''code'' might not exist on array\|string\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Property yii\\authclient\\clients\\Facebook\:\:\$attributeNames type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Facebook.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\GitHub\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/GitHub.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\GitHub\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/GitHub.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\GitHub\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/GitHub.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Google\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/Google.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Google\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Google.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\GoogleHybrid\:\:defaultViewOptions\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/GoogleHybrid.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\LinkedIn\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/LinkedIn.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\LinkedIn\:\:defaultNormalizeUserAttributeMap\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/LinkedIn.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\LinkedIn\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/LinkedIn.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\LinkedIn\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/LinkedIn.php
+
+ -
+ message: '#^Property yii\\authclient\\clients\\LinkedIn\:\:\$attributeNames type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/LinkedIn.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Live\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/Live.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Live\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Live.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Oauth2Client\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Oauth2Client.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Twitter\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Twitter.php
+
+ -
+ message: '#^Property yii\\authclient\\clients\\Twitter\:\:\$attributeParams type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Twitter.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\TwitterOAuth2\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/TwitterOAuth2.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\VKontakte\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/VKontakte.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\VKontakte\:\:defaultNormalizeUserAttributeMap\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/VKontakte.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\VKontakte\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/VKontakte.php
+
+ -
+ message: '#^Property yii\\authclient\\clients\\VKontakte\:\:\$attributeNames type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/VKontakte.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Yandex\:\:applyAccessTokenToRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/clients/Yandex.php
+
+ -
+ message: '#^Method yii\\authclient\\clients\\Yandex\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/clients/Yandex.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\HmacSha\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/signature/HmacSha.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\RsaSha\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\RsaSha\:\:initPrivateCertificate\(\) should return string but returns string\|false\.$#'
+ identifier: return.type
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\RsaSha\:\:initPublicCertificate\(\) should return string but returns string\|false\.$#'
+ identifier: return.type
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\RsaSha\:\:setPrivateCertificate\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Method yii\\authclient\\signature\\RsaSha\:\:setPublicCertificate\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Parameter \#1 \$key_identifier of function openssl_free_key expects resource, resource\|false given\.$#'
+ identifier: argument.type
+ count: 2
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Parameter \#3 \$priv_key_id of function openssl_sign expects resource\|string, resource\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Parameter \#3 \$pub_key_id of function openssl_verify expects resource\|string, resource\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/signature/RsaSha.php
+
+ -
+ message: '#^Call to an undefined method yii\\base\\View\:\:registerJs\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Call to an undefined method yii\\console\\Request\|yii\\web\\Request\:\:getQueryParams\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Cannot call method getRoute\(\) on yii\\console\\Controller\\|yii\\web\\Controller\\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Class yii\\authclient\\widgets\\AuthChoice has PHPDoc tag @property\-read for property \$baseAuthUrl with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:clientLink\(\) has parameter \$htmlOptions with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:defaultBaseAuthUrl\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:getBaseAuthUrl\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:setBaseAuthUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:setBaseAuthUrl\(\) has parameter \$baseAuthUrl with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\AuthChoice\:\:setClients\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Parameter \#1 \$view of static method yii\\web\\AssetBundle\:\:register\(\) expects yii\\web\\View, yii\\base\\View given\.$#'
+ identifier: argument.type
+ count: 2
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Property yii\\authclient\\widgets\\AuthChoice\:\:\$_baseAuthUrl type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Property yii\\authclient\\widgets\\AuthChoice\:\:\$clientOptions type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Property yii\\authclient\\widgets\\AuthChoice\:\:\$options type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/AuthChoice.php
+
+ -
+ message: '#^Access to an undefined property yii\\authclient\\ClientInterface\:\:\$clientId\.$#'
+ identifier: property.notFound
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Access to an undefined property yii\\authclient\\ClientInterface\:\:\$scope\.$#'
+ identifier: property.notFound
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\GooglePlusButton\:\:generateCallback\(\) has parameter \$url with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\GooglePlusButton\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\GooglePlusButton\:\:registerClientScript\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\GooglePlusButton\:\:setCallback\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Method yii\\authclient\\widgets\\GooglePlusButton\:\:setCallback\(\) has parameter \$callback with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Parameter \#1 \$str of function md5 expects string, string\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Property yii\\authclient\\widgets\\GooglePlusButton\:\:\$_callback type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Property yii\\authclient\\widgets\\GooglePlusButton\:\:\$buttonHtmlOptions type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/widgets/GooglePlusButton.php
+
+ -
+ message: '#^Parameter \#1 \$id of class yii\\authclient\\AuthAction constructor expects string, null given\.$#'
+ identifier: argument.type
+ count: 5
+ path: tests/AuthActionTest.php
+
+ -
+ message: '#^Parameter \#2 \$controller of class yii\\authclient\\AuthAction constructor expects yii\\base\\Controller, null given\.$#'
+ identifier: argument.type
+ count: 5
+ path: tests/AuthActionTest.php
+
+ -
+ message: '#^Parameter \#2 \$haystack of method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: tests/AuthActionTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertNotNull\(\) with array and ''Unable to get…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 2
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true and ''Unable to get…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true and ''Unable to setup…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Instanceof between yii\\httpclient\\Client and yii\\httpclient\\Client will always evaluate to true\.$#'
+ identifier: instanceof.alwaysTrue
+ count: 2
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Instanceof between yii\\httpclient\\Request and yii\\httpclient\\Request will always evaluate to true\.$#'
+ identifier: instanceof.alwaysTrue
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseClientTest\:\:dataProviderNormalizeUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseClientTest\:\:testNormalizeUserAttributes\(\) has parameter \$expectedNormalizedUserAttributes with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseClientTest\:\:testNormalizeUserAttributes\(\) has parameter \$normalizeUserAttributeMap with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseClientTest\:\:testNormalizeUserAttributes\(\) has parameter \$rawUserAttributes with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseClientTest\:\:testSetGet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/BaseClientTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Call to method expects\(\) on an unknown class PHPUnit_Framework_MockObject_MockObject\.$#'
+ identifier: class.notFound
+ count: 4
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Call to method getAccessToken\(\) on an unknown class PHPUnit_Framework_MockObject_MockObject\.$#'
+ identifier: class.notFound
+ count: 2
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Cannot call method getToken\(\) on yii\\authclient\\OAuthToken\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Instanceof between yii\\authclient\\OAuthToken and yii\\authclient\\OAuthToken will always evaluate to true\.$#'
+ identifier: instanceof.alwaysTrue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:apiUrlDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:composeUrlDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:defaultReturnUrlDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:sendRequestDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testApiUrl\(\) has parameter \$apiBaseUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testApiUrl\(\) has parameter \$apiSubUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testApiUrl\(\) has parameter \$expectedApiFullUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testComposeUrl\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testDefaultReturnUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testDefaultReturnUrl\(\) has parameter \$expectedReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testDefaultReturnUrl\(\) has parameter \$parametersToKeepInReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testDefaultReturnUrl\(\) has parameter \$requestQueryParams with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testSendRequest\(\) has parameter \$expectedException with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\BaseOAuthTest\:\:testSendRequest\(\) has parameter \$responseStatusCode with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^PHPDoc tag @var contains unknown class PHPUnit_Framework_MockObject_MockObject\.$#'
+ identifier: class.notFound
+ count: 2
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^PHPDoc tag @var with type PHPUnit_Framework_MockObject_MockObject&yii\\authclient\\BaseOAuth is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#'
+ identifier: varTag.nativeType
+ count: 2
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Parameter \#1 \$expireDuration of method yii\\authclient\\OAuthToken\:\:setExpireDuration\(\) expects string, int given\.$#'
+ identifier: argument.type
+ count: 3
+ path: tests/BaseOAuthTest.php
+
+ -
+ message: '#^Call to function is_object\(\) with yii\\authclient\\ClientInterface will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: tests/CollectionTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true and ''Unable to create…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/CollectionTest.php
+
+ -
+ message: '#^Call to method expects\(\) on an unknown class PHPUnit_Framework_MockObject_MockObject\.$#'
+ identifier: class.notFound
+ count: 2
+ path: tests/OAuth1Test.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\OAuth1Test\:\:composeAuthorizationHeaderDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/OAuth1Test.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\OAuth1Test\:\:testComposeAuthorizationHeader\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/OAuth1Test.php
+
+ -
+ message: '#^PHPDoc tag @var for variable \$oauthSignatureMethod contains unknown class PHPUnit_Framework_MockObject_MockObject\.$#'
+ identifier: class.notFound
+ count: 1
+ path: tests/OAuth1Test.php
+
+ -
+ message: '#^PHPDoc tag @var with type PHPUnit_Framework_MockObject_MockObject&yii\\authclient\\signature\\BaseMethod is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#'
+ identifier: varTag.nativeType
+ count: 1
+ path: tests/OAuth1Test.php
+
+ -
+ message: '#^Call to an undefined method yii\\authclient\\OpenIdConnect\:\:expects\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: tests/OpenIdConnectTest.php
+
+ -
+ message: '#^Cannot access offset ''query'' on array\{scheme\?\: string, host\?\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\|false\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: tests/OpenIdConnectTest.php
+
+ -
+ message: '#^PHPDoc tag @var with type yii\\authclient\\OpenIdConnect is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#'
+ identifier: varTag.nativeType
+ count: 1
+ path: tests/OpenIdConnectTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\OpenIdTest\:\:dataProviderCompareUrl\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/OpenIdTest.php
+
+ -
+ message: '#^Unreachable statement \- code above always terminates\.$#'
+ identifier: deadCode.unreachable
+ count: 1
+ path: tests/OpenIdTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:invoke\(\) has parameter \$args with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:mockApplication\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:mockApplication\(\) has parameter \$config with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:mockWebApplication\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:mockWebApplication\(\) has parameter \$appClass with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TestCase\:\:mockWebApplication\(\) has parameter \$config with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Property yiiunit\\extensions\\authclient\\TestCase\:\:\$params has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Static property yii\\BaseYii\\:\:\$app \(yii\\console\\Application\|yii\\web\\Application\\) does not accept null\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: tests/TestCase.php
+
+ -
+ message: '#^Call to function is_object\(\) with yii\\authclient\\OAuthToken will always evaluate to true\.$#'
+ identifier: function.alreadyNarrowedType
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertIsObject\(\) with yii\\authclient\\OAuthToken and ''Unable to create…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true and ''Unable to create…'' will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TokenTest\:\:autoFetchExpireDurationDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TokenTest\:\:testAutoFetchExpireDuration\(\) has parameter \$expectedExpireDuration with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\TokenTest\:\:testAutoFetchExpireDuration\(\) has parameter \$params with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Parameter \#1 \$expireDuration of method yii\\authclient\\OAuthToken\:\:setExpireDuration\(\) expects string, int given\.$#'
+ identifier: argument.type
+ count: 2
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Parameter \#1 \$expireDuration of method yii\\authclient\\OAuthToken\:\:setExpireDuration\(\) expects string, int\<1000, 2000\> given\.$#'
+ identifier: argument.type
+ count: 1
+ path: tests/TokenTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleHybridTest\:\:defaultReturnUrlDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/clients/GoogleHybridTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleHybridTest\:\:testDefaultReturnUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/clients/GoogleHybridTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleHybridTest\:\:testDefaultReturnUrl\(\) has parameter \$expectedReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleHybridTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleHybridTest\:\:testDefaultReturnUrl\(\) has parameter \$parametersToKeepInReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleHybridTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleHybridTest\:\:testDefaultReturnUrl\(\) has parameter \$requestQueryParams with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleHybridTest.php
+
+ -
+ message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
+ identifier: method.alreadyNarrowedType
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Instanceof between yii\\authclient\\OAuthToken and yii\\authclient\\OAuthToken will always evaluate to true\.$#'
+ identifier: instanceof.alwaysTrue
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleTest\:\:defaultReturnUrlDataProvider\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleTest\:\:testDefaultReturnUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleTest\:\:testDefaultReturnUrl\(\) has parameter \$expectedReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleTest\:\:testDefaultReturnUrl\(\) has parameter \$parametersToKeepInReturnUrl with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\GoogleTest\:\:testDefaultReturnUrl\(\) has parameter \$requestQueryParams with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/clients/GoogleTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\LinkedInTest\:\:getAccessTokenBodyParamName\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/clients/LinkedInTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\YandexTest\:\:getAccessTokenBodyParamName\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/clients/YandexTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\clients\\base\\BaseOauth2ClientTestCase\:\:getAccessTokenBodyParamName\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/clients/base/BaseOauth2ClientTestCase.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\data\\Session\:\:init\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/data/Session.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\data\\Session\:\:open\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: tests/data/Session.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\data\\TestClient\:\:initUserAttributes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/data/TestClient.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\signature\\RsaShaTest\:\:dataProviderGetName\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: tests/signature/RsaShaTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\signature\\RsaShaTest\:\:testGetName\(\) has parameter \$algorithm with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/signature/RsaShaTest.php
+
+ -
+ message: '#^Method yiiunit\\extensions\\authclient\\signature\\RsaShaTest\:\:testGetName\(\) has parameter \$expectedName with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: tests/signature/RsaShaTest.php
diff --git a/phpstan.neon b/phpstan.neon
new file mode 100644
index 0000000..3cee173
--- /dev/null
+++ b/phpstan.neon
@@ -0,0 +1,18 @@
+includes:
+ - vendor/phpstan/phpstan-phpunit/extension.neon
+ - phpstan-baseline.neon
+parameters:
+ phpVersion:
+ min: 70400
+ max: 80500
+ level: 8
+ dynamicConstantNames:
+ - YII_ENABLE_ERROR_HANDLER
+ - YII_DEBUG
+ bootstrapFiles:
+ - tests/bootstrap.php
+ excludePaths:
+ - vendor
+ paths:
+ - src
+ - tests
diff --git a/src/AuthAction.php b/src/AuthAction.php
index bcd8faa..c1306e7 100644
--- a/src/AuthAction.php
+++ b/src/AuthAction.php
@@ -1,4 +1,5 @@
user = Instance::ensure($this->user, User::className());
+ $this->user = Instance::ensure($this->user, User::class);
}
/**
diff --git a/src/BaseClient.php b/src/BaseClient.php
index 727d9c2..12e848c 100644
--- a/src/BaseClient.php
+++ b/src/BaseClient.php
@@ -1,4 +1,5 @@
response = $response;
parent::__construct($message, $code, $previous);
diff --git a/src/OAuth1.php b/src/OAuth1.php
index 8074c6c..45b9c0a 100644
--- a/src/OAuth1.php
+++ b/src/OAuth1.php
@@ -1,4 +1,5 @@
accessTokenLocation) {
+ switch ($this->accessTokenLocation) {
case self::ACCESS_TOKEN_LOCATION_BODY:
$data = $request->getData();
$data['access_token'] = $accessToken->getToken();
diff --git a/src/OAuthToken.php b/src/OAuthToken.php
index 6514569..d6722f2 100644
--- a/src/OAuthToken.php
+++ b/src/OAuthToken.php
@@ -1,4 +1,5 @@
sendRequest($url, 'HEAD');
@@ -384,7 +385,8 @@ public function discover($url)
$next = true;
}
- if (isset($headers['content-type'])
+ if (
+ isset($headers['content-type'])
&& (strpos($headers['content-type'], 'application/xrds+xml') !== false
|| strpos($headers['content-type'], 'text/xml') !== false)
) {
@@ -401,7 +403,7 @@ public function discover($url)
// OpenID 2
$ns = preg_quote('http://specs.openid.net/auth/2.0/');
- if (preg_match('#\s*'.$ns.'(server|signon)\s*#s', $content, $type)) {
+ if (preg_match('#\s*' . $ns . '(server|signon)\s*#s', $content, $type)) {
if ($type[1] == 'server') {
$result['identifier_select'] = true;
}
@@ -428,7 +430,7 @@ public function discover($url)
// OpenID 1.1
$ns = preg_quote('http://openid.net/signon/1.1');
- if (preg_match('#\s*'.$ns.'\s*#s', $content)) {
+ if (preg_match('#\s*' . $ns . '\s*#s', $content)) {
preg_match('#(.*)#', $content, $server);
preg_match('#<.*?Delegate>(.*)#', $content, $delegate);
if (empty($server)) {
@@ -641,7 +643,7 @@ protected function buildAuthUrlV2($serverInfo)
if ($serverInfo['identifier_select']) {
$url = 'http://specs.openid.net/auth/2.0/identifier_select';
$params['openid.identity'] = $url;
- $params['openid.claimed_id']= $url;
+ $params['openid.claimed_id'] = $url;
} else {
$params['openid.identity'] = $serverInfo['identity'];
$params['openid.claimed_id'] = $this->getClaimedId();
diff --git a/src/OpenIdConnect.php b/src/OpenIdConnect.php
index 352decf..86b2627 100644
--- a/src/OpenIdConnect.php
+++ b/src/OpenIdConnect.php
@@ -1,4 +1,5 @@
_cache !== null && !is_object($this->_cache)) {
- $this->_cache = Instance::ensure($this->_cache, Cache::className());
+ $this->_cache = Instance::ensure($this->_cache, Cache::class);
}
return $this->_cache;
}
@@ -469,11 +470,9 @@ protected function getJwsLoader()
{
if ($this->_jwsLoader === null) {
$algorithms = [];
- foreach ($this->allowedJwsAlgorithms as $algorithm)
- {
+ foreach ($this->allowedJwsAlgorithms as $algorithm) {
$class = '\Jose\Component\Signature\Algorithm\\' . $algorithm;
- if (!class_exists($class))
- {
+ if (!class_exists($class)) {
throw new InvalidConfigException("Alogrithm class $class doesn't exist");
}
$algorithms[] = new $class();
@@ -521,7 +520,8 @@ protected function validateClaims(array $claims)
if (!isset($claims['iss']) || (strcmp(rtrim($claims['iss'], '/'), rtrim($expectedIssuer, '/')) !== 0)) {
throw new HttpException(400, 'Invalid "iss"');
}
- if (!isset($claims['aud'])
+ if (
+ !isset($claims['aud'])
|| (!is_string($claims['aud']) && !is_array($claims['aud']))
|| (is_string($claims['aud']) && strcmp($claims['aud'], $this->clientId) !== 0)
|| (is_array($claims['aud']) && !in_array($this->clientId, $claims['aud']))
diff --git a/src/SessionStateStorage.php b/src/SessionStateStorage.php
index 0d70031..a4fbaf8 100644
--- a/src/SessionStateStorage.php
+++ b/src/SessionStateStorage.php
@@ -1,4 +1,5 @@
session = Yii::$app->get('session');
}
} else {
- $this->session = Instance::ensure($this->session, Session::className());
+ $this->session = Instance::ensure($this->session, Session::class);
}
}
@@ -82,4 +83,4 @@ public function remove($key)
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/StateStorageInterface.php b/src/StateStorageInterface.php
index e7a66a4..83fcd95 100644
--- a/src/StateStorageInterface.php
+++ b/src/StateStorageInterface.php
@@ -1,4 +1,5 @@
client instanceof GoogleHybrid)) {
- throw new InvalidConfigException('"' . $this->className() . '::client" must be instance of "' . GoogleHybrid::className() . '"');
+ throw new InvalidConfigException('"' . self::class . '::client" must be instance of "' . GoogleHybrid::class . '"');
}
}
@@ -167,4 +168,4 @@ protected function renderButton()
);
return Html::tag('span', Html::tag('span', '', $buttonHtmlOptions), ['id' => 'signinButton']);
}
-}
\ No newline at end of file
+}
diff --git a/tests/AuthActionTest.php b/tests/AuthActionTest.php
index 15251b1..e1fbde2 100644
--- a/tests/AuthActionTest.php
+++ b/tests/AuthActionTest.php
@@ -6,7 +6,7 @@
class AuthActionTest extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -24,7 +24,7 @@ protected function setUp()
// Tests :
- public function testSetGet()
+ public function testSetGet(): void
{
$action = new AuthAction(null, null);
@@ -40,7 +40,7 @@ public function testSetGet()
/**
* @depends testSetGet
*/
- public function testGetDefaultSuccessUrl()
+ public function testGetDefaultSuccessUrl(): void
{
$action = new AuthAction(null, null);
@@ -50,24 +50,24 @@ public function testGetDefaultSuccessUrl()
/**
* @depends testSetGet
*/
- public function testGetDefaultCancelUrl()
+ public function testGetDefaultCancelUrl(): void
{
$action = new AuthAction(null, null);
$this->assertNotEmpty($action->getSuccessUrl(), 'Unable to get default cancel URL!');
}
- public function testRedirect()
+ public function testRedirect(): void
{
$action = new AuthAction(null, null);
$url = 'http://test.url';
$response = $action->redirect($url, true);
- $this->assertContains($url, $response->content);
+ $this->assertStringContainsString($url, $response->content);
}
- public function testGetClientId()
+ public function testGetClientId(): void
{
$clientId = 'clientId';
$defaultClientId = 'defaultClientId';
diff --git a/tests/BaseClientTest.php b/tests/BaseClientTest.php
index f9c7150..ba0403d 100644
--- a/tests/BaseClientTest.php
+++ b/tests/BaseClientTest.php
@@ -7,7 +7,7 @@
class BaseClientTest extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$this->mockApplication();
}
@@ -18,8 +18,8 @@ protected function setUp()
*/
protected function createClient()
{
- $oauthClient = $this->getMockBuilder(BaseClient::className())
- ->setMethods(['initUserAttributes'])
+ $oauthClient = $this->getMockBuilder(BaseClient::class)
+ ->onlyMethods(['initUserAttributes'])
->getMock();
return $oauthClient;
}
@@ -71,7 +71,7 @@ public function testSetGet()
$this->assertEquals($requestOptions, $client->getRequestOptions(), 'Unable to setup request options!');
}
- public function testGetDefaults()
+ public function testGetDefaults(): void
{
$client = $this->createClient();
@@ -85,7 +85,7 @@ public function testGetDefaults()
* Data provider for [[testNormalizeUserAttributes()]]
* @return array test data
*/
- public function dataProviderNormalizeUserAttributes()
+ public function dataProviderNormalizeUserAttributes(): array
{
return [
[
@@ -106,7 +106,7 @@ public function dataProviderNormalizeUserAttributes()
[
'name' => function ($attributes) {
return $attributes['firstName'] . ' ' . $attributes['lastName'];
- },
+ },
],
[
'firstName' => 'John',
@@ -166,7 +166,7 @@ public function dataProviderNormalizeUserAttributes()
* @param array $rawUserAttributes
* @param array $expectedNormalizedUserAttributes
*/
- public function testNormalizeUserAttributes($normalizeUserAttributeMap, $rawUserAttributes, $expectedNormalizedUserAttributes)
+ public function testNormalizeUserAttributes($normalizeUserAttributeMap, $rawUserAttributes, $expectedNormalizedUserAttributes): void
{
$client = $this->createClient();
$client->setNormalizeUserAttributeMap($normalizeUserAttributeMap);
@@ -177,7 +177,7 @@ public function testNormalizeUserAttributes($normalizeUserAttributeMap, $rawUser
$this->assertEquals(array_merge($rawUserAttributes, $expectedNormalizedUserAttributes), $normalizedUserAttributes);
}
- public function testSetupHttpClient()
+ public function testSetupHttpClient(): void
{
$client = $this->createClient();
@@ -198,7 +198,7 @@ public function testSetupHttpClient()
* @depends testSetGet
* @depends testSetupHttpClient
*/
- public function testCreateRequest()
+ public function testCreateRequest(): void
{
$client = $this->createClient();
@@ -214,7 +214,7 @@ public function testCreateRequest()
$this->assertEquals($expectedOptions, $request->getOptions());
}
- public function testSetupStateStorage()
+ public function testSetupStateStorage(): void
{
$client = $this->createClient();
@@ -227,4 +227,4 @@ public function testSetupStateStorage()
$stateStorage = $client->getStateStorage();
$this->assertTrue($stateStorage instanceof SessionStateStorage, 'Unable to get default http client.');
}
-}
\ No newline at end of file
+}
diff --git a/tests/BaseOAuthTest.php b/tests/BaseOAuthTest.php
index e34d7a5..c64c084 100644
--- a/tests/BaseOAuthTest.php
+++ b/tests/BaseOAuthTest.php
@@ -14,7 +14,7 @@ class BaseOAuthTest extends TestCase
{
use OAuthDefaultReturnUrlTestTrait;
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -27,15 +27,16 @@ protected function setUp()
*/
protected function createClient()
{
- $oauthClient = $this->getMockBuilder(BaseOAuth::className())
- ->setMethods(['composeRequestCurlOptions', 'refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes'])
+ $oauthClient = $this->getMockBuilder(BaseOAuth::class)
+ ->addMethods(['composeRequestCurlOptions'])
+ ->onlyMethods(['refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes'])
->getMock();
return $oauthClient;
}
// Tests :
- public function testSetGet()
+ public function testSetGet(): void
{
$oauthClient = $this->createClient();
@@ -44,7 +45,7 @@ public function testSetGet()
$this->assertEquals($returnUrl, $oauthClient->getReturnUrl(), 'Unable to setup return URL!');
}
- public function testSetupHttpClient()
+ public function testSetupHttpClient(): void
{
$oauthClient = $this->createClient();
$oauthClient->apiBaseUrl = 'http://api.test.url';
@@ -63,7 +64,7 @@ public function testSetupHttpClient()
$this->assertEquals($oauthClient->apiBaseUrl, $oauthClient->getHttpClient()->baseUrl);
}
- public function testSetupComponents()
+ public function testSetupComponents(): void
{
$oauthClient = $this->createClient();
@@ -76,7 +77,7 @@ public function testSetupComponents()
$this->assertEquals($oauthSignatureMethod, $oauthClient->getSignatureMethod(), 'Unable to setup signature method!');
}
- public function testSetupAccessToken()
+ public function testSetupAccessToken(): void
{
$oauthClient = $this->createClient();
@@ -98,7 +99,7 @@ public function testSetupAccessToken()
* @depends testSetupComponents
* @depends testSetupAccessToken
*/
- public function testSetupComponentsByConfig()
+ public function testSetupComponentsByConfig(): void
{
$oauthClient = $this->createClient();
@@ -121,7 +122,7 @@ public function testSetupComponentsByConfig()
* Data provider for [[testComposeUrl()]].
* @return array test data.
*/
- public function composeUrlDataProvider()
+ public function composeUrlDataProvider(): array
{
return [
[
@@ -155,7 +156,7 @@ public function composeUrlDataProvider()
* @param array $params request params
* @param string $expectedUrl expected composed URL.
*/
- public function testComposeUrl($url, array $params, $expectedUrl)
+ public function testComposeUrl($url, array $params, $expectedUrl): void
{
$oauthClient = $this->createClient();
$composedUrl = $this->invoke($oauthClient, 'composeUrl', [$url, $params]);
@@ -166,7 +167,7 @@ public function testComposeUrl($url, array $params, $expectedUrl)
* Data provider for [[testApiUrl]].
* @return array test data.
*/
- public function apiUrlDataProvider()
+ public function apiUrlDataProvider(): array
{
return [
[
@@ -196,7 +197,7 @@ public function apiUrlDataProvider()
* @param $apiSubUrl
* @param $expectedApiFullUrl
*/
- public function testApiUrl($apiBaseUrl, $apiSubUrl, $expectedApiFullUrl)
+ public function testApiUrl($apiBaseUrl, $apiSubUrl, $expectedApiFullUrl): void
{
$oauthClient = $this->createClient();
@@ -217,7 +218,7 @@ public function testApiUrl($apiBaseUrl, $apiSubUrl, $expectedApiFullUrl)
* Data provider for [[testDefaultReturnUrl]].
* @return array test data.
*/
- public function defaultReturnUrlDataProvider()
+ public function defaultReturnUrlDataProvider(): array
{
return [
'default' => [['authclient' => 'base'], null, '/?authclient=base'],
@@ -233,7 +234,7 @@ public function defaultReturnUrlDataProvider()
* @param $expectedException
* @return void
*/
- public function testSendRequest($responseStatusCode, $expectedException)
+ public function testSendRequest($responseStatusCode, $expectedException): void
{
$oauthClient = $this->createClient();
@@ -241,7 +242,7 @@ public function testSendRequest($responseStatusCode, $expectedException)
$response->addHeaders(['http-code' => $responseStatusCode]);
$response->setData('success');
- $request = $this->getMock(Request::className());
+ $request = $this->createMock(Request::class);
$request
->expects($this->any())
->method('send')
@@ -258,7 +259,7 @@ public function testSendRequest($responseStatusCode, $expectedException)
* Data provider for [[testSendRequestException]].
* @return array test data.
*/
- public function sendRequestDataProvider()
+ public function sendRequestDataProvider(): array
{
return [
'Informational' => [100, 'yii\\authclient\\InvalidResponseException'],
@@ -269,13 +270,14 @@ public function sendRequestDataProvider()
];
}
- public function testDoNotRestoreAccessTokenWithNoRefreshToken()
+ public function testDoNotRestoreAccessTokenWithNoRefreshToken(): void
{
/**
* @var BaseOAuth|\PHPUnit_Framework_MockObject_MockObject
*/
- $oauthClient = $this->getMockBuilder(BaseOAuth::className())
- ->setMethods(['composeRequestCurlOptions', 'refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes', 'getState'])
+ $oauthClient = $this->getMockBuilder(BaseOAuth::class)
+ ->addMethods(['composeRequestCurlOptions',])
+ ->onlyMethods(['refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes', 'getState'])
->getMock();
$oauthClient->expects($this->never())
@@ -291,13 +293,14 @@ public function testDoNotRestoreAccessTokenWithNoRefreshToken()
$this->assertSame($accessToken, $oauthClient->getAccessToken());
}
- public function testRestoreAccessTokenWithRefreshToken()
+ public function testRestoreAccessTokenWithRefreshToken(): void
{
/**
* @var BaseOAuth|\PHPUnit_Framework_MockObject_MockObject
*/
- $oauthClient = $this->getMockBuilder(BaseOAuth::className())
- ->setMethods(['composeRequestCurlOptions', 'refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes', 'getState'])
+ $oauthClient = $this->getMockBuilder(BaseOAuth::class)
+ ->addMethods(['composeRequestCurlOptions',])
+ ->onlyMethods(['refreshAccessToken', 'applyAccessTokenToRequest', 'initUserAttributes', 'getState'])
->getMock();
$oauthClient->expects($this->once())
diff --git a/tests/CollectionTest.php b/tests/CollectionTest.php
index bd4989a..255ab2c 100644
--- a/tests/CollectionTest.php
+++ b/tests/CollectionTest.php
@@ -9,7 +9,7 @@ class CollectionTest extends TestCase
{
// Tests :
- public function testSetGet()
+ public function testSetGet(): void
{
$collection = new Collection();
@@ -24,7 +24,7 @@ public function testSetGet()
/**
* @depends testSetGet
*/
- public function testGetProviderById()
+ public function testGetProviderById(): void
{
$collection = new Collection();
@@ -41,12 +41,12 @@ public function testGetProviderById()
/**
* @depends testGetProviderById
*/
- public function testCreateProvider()
+ public function testCreateProvider(): void
{
$collection = new Collection();
$clientId = 'testClientId';
- $clientClassName = TestClient::className();
+ $clientClassName = TestClient::class;
$clients = [
$clientId => [
'class' => $clientClassName
@@ -62,7 +62,7 @@ public function testCreateProvider()
/**
* @depends testSetGet
*/
- public function testHasProvider()
+ public function testHasProvider(): void
{
$collection = new Collection();
@@ -81,13 +81,13 @@ public function testHasProvider()
/**
* @depends testCreateProvider
*/
- public function testSetupHttpClient()
+ public function testSetupHttpClient(): void
{
$collection = new Collection();
$collection->httpClient = new \yii\httpclient\Client();
$clientId = 'testClientId';
- $clientClassName = TestClient::className();
+ $clientClassName = TestClient::class;
$clients = [
$clientId => [
'class' => $clientClassName
diff --git a/tests/OAuth1Test.php b/tests/OAuth1Test.php
index 9ded758..ddd11c7 100644
--- a/tests/OAuth1Test.php
+++ b/tests/OAuth1Test.php
@@ -8,7 +8,7 @@
class OAuth1Test extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -27,8 +27,8 @@ protected function setUp()
*/
protected function createClient()
{
- $oauthClient = $this->getMockBuilder(OAuth1::className())
- ->setMethods(['initUserAttributes'])
+ $oauthClient = $this->getMockBuilder(OAuth1::class)
+ ->onlyMethods(['initUserAttributes'])
->getMock();
$oauthClient->apiBaseUrl = 'https://www.google.com';
@@ -37,7 +37,7 @@ protected function createClient()
// Tests :
- public function testSignRequest()
+ public function testSignRequest(): void
{
$oauthClient = $this->createClient();
@@ -48,7 +48,7 @@ public function testSignRequest()
]);
/** @var BaseMethod|\PHPUnit_Framework_MockObject_MockObject $oauthSignatureMethod */
- $oauthSignatureMethod = $this->getMockBuilder(BaseMethod::className())
+ $oauthSignatureMethod = $this->getMockBuilder(BaseMethod::class)
->setMethods(['getName', 'generateSignature'])
->getMock();
$oauthSignatureMethod->expects($this->any())
@@ -87,7 +87,7 @@ public function testSignRequest()
/**
* @depends testSignRequest
*/
- public function testAuthorizationHeaderMethods()
+ public function testAuthorizationHeaderMethods(): void
{
$oauthClient = $this->createClient();
@@ -124,7 +124,7 @@ public function testAuthorizationHeaderMethods()
* Data provider for [[testComposeAuthorizationHeader()]].
* @return array test data.
*/
- public function composeAuthorizationHeaderDataProvider()
+ public function composeAuthorizationHeaderDataProvider(): array
{
return [
[
@@ -161,14 +161,14 @@ public function composeAuthorizationHeaderDataProvider()
* @param array $params request params.
* @param string $expectedAuthorizationHeader expected authorization header.
*/
- public function testComposeAuthorizationHeader($realm, array $params, $expectedAuthorizationHeader)
+ public function testComposeAuthorizationHeader($realm, array $params, $expectedAuthorizationHeader): void
{
$oauthClient = $this->createClient();
$authorizationHeader = $this->invoke($oauthClient, 'composeAuthorizationHeader', [$params, $realm]);
$this->assertEquals($expectedAuthorizationHeader, $authorizationHeader);
}
- public function testBuildAuthUrl()
+ public function testBuildAuthUrl(): void
{
$oauthClient = $this->createClient();
$authUrl = 'http://test.auth.url';
@@ -180,7 +180,7 @@ public function testBuildAuthUrl()
$builtAuthUrl = $oauthClient->buildAuthUrl($requestToken);
- $this->assertContains($authUrl, $builtAuthUrl, 'No auth URL present!');
- $this->assertContains($requestTokenToken, $builtAuthUrl, 'No token present!');
+ $this->assertStringContainsString($authUrl, $builtAuthUrl, 'No auth URL present!');
+ $this->assertStringContainsString($requestTokenToken, $builtAuthUrl, 'No token present!');
}
}
diff --git a/tests/OAuth2Test.php b/tests/OAuth2Test.php
index ecacba9..b53d9d1 100644
--- a/tests/OAuth2Test.php
+++ b/tests/OAuth2Test.php
@@ -6,7 +6,7 @@
class OAuth2Test extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -25,15 +25,15 @@ protected function setUp()
*/
protected function createClient()
{
- $oauthClient = $this->getMockBuilder(OAuth2::className())
- ->setMethods(['initUserAttributes'])
+ $oauthClient = $this->getMockBuilder(OAuth2::class)
+ ->onlyMethods(['initUserAttributes'])
->getMock();
return $oauthClient;
}
// Tests :
- public function testBuildAuthUrl()
+ public function testBuildAuthUrl(): void
{
$oauthClient = $this->createClient();
$authUrl = 'http://test.auth.url';
@@ -45,12 +45,12 @@ public function testBuildAuthUrl()
$builtAuthUrl = $oauthClient->buildAuthUrl();
- $this->assertContains($authUrl, $builtAuthUrl, 'No auth URL present!');
- $this->assertContains($clientId, $builtAuthUrl, 'No client id present!');
- $this->assertContains(rawurlencode($returnUrl), $builtAuthUrl, 'No return URL present!');
+ $this->assertStringContainsString($authUrl, $builtAuthUrl, 'No auth URL present!');
+ $this->assertStringContainsString($clientId, $builtAuthUrl, 'No client id present!');
+ $this->assertStringContainsString(rawurlencode($returnUrl), $builtAuthUrl, 'No return URL present!');
}
- public function testPkceCodeChallengeIsPresentInAuthUrl()
+ public function testPkceCodeChallengeIsPresentInAuthUrl(): void
{
$oauthClient = $this->createClient();
$oauthClient->enablePkce = true;
@@ -61,7 +61,7 @@ public function testPkceCodeChallengeIsPresentInAuthUrl()
$builtAuthUrl = $oauthClient->buildAuthUrl();
- $this->assertContains('code_challenge=', $builtAuthUrl, 'No code challenge Present!');
- $this->assertContains('code_challenge_method=S256', $builtAuthUrl, 'No code challenge method Present!');
+ $this->assertStringContainsString('code_challenge=', $builtAuthUrl, 'No code challenge Present!');
+ $this->assertStringContainsString('code_challenge_method=S256', $builtAuthUrl, 'No code challenge method Present!');
}
}
diff --git a/tests/OpenIdConnectTest.php b/tests/OpenIdConnectTest.php
index 533c882..2c1687b 100644
--- a/tests/OpenIdConnectTest.php
+++ b/tests/OpenIdConnectTest.php
@@ -8,7 +8,7 @@
class OpenIdConnectTest extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -21,7 +21,7 @@ protected function setUp()
$this->mockApplication($config, '\yii\web\Application');
}
- public function testDiscoverConfig()
+ public function testDiscoverConfig(): void
{
$authClient = new OpenIdConnect([
'issuerUrl' => 'https://accounts.google.com',
@@ -41,7 +41,7 @@ public function testDiscoverConfig()
/**
* @depends testDiscoverConfig
*/
- public function testDiscoverConfigCache()
+ public function testDiscoverConfigCache(): void
{
$cache = new ArrayCache();
@@ -71,7 +71,7 @@ public function testDiscoverConfigCache()
/**
* @depends testDiscoverConfig
*/
- public function testBuildAuthUrl()
+ public function testBuildAuthUrl(): void
{
$authClient = new OpenIdConnect([
'issuerUrl' => 'https://accounts.google.com',
@@ -85,11 +85,11 @@ public function testBuildAuthUrl()
$builtAuthUrl = $authClient->buildAuthUrl();
$this->assertNotEmpty($authClient->authUrl);
- $this->assertContains($clientId, $builtAuthUrl, 'No client id present!');
- $this->assertContains(rawurlencode($returnUrl), $builtAuthUrl, 'No return URL present!');
+ $this->assertStringContainsString($clientId, $builtAuthUrl, 'No client id present!');
+ $this->assertStringContainsString(rawurlencode($returnUrl), $builtAuthUrl, 'No return URL present!');
}
- public function testNonce()
+ public function testNonce(): void
{
$authClient = new OpenIdConnect([
'issuerUrl' => 'https://accounts.google.com',
@@ -112,7 +112,7 @@ public function testNonce()
$this->assertEquals($query_vars['nonce'], $nonce);
}
- public function testUserInfoFromToken()
+ public function testUserInfoFromToken(): void
{
$accessToken = new OAuthToken([
'params' => [
@@ -132,10 +132,10 @@ public function testUserInfoFromToken()
$this->assertEquals(['sub' => '123'], $userAttributes);
}
- public function testUserInfoFromUserInfoTokenResponse()
+ public function testUserInfoFromUserInfoTokenResponse(): void
{
/** @var OpenIdConnect $oidcClient */
- $oidcClient = $this->getMockBuilder(OpenIdConnect::className())
+ $oidcClient = $this->getMockBuilder(OpenIdConnect::class)
->setMethods(['api'])
->getMock();
diff --git a/tests/OpenIdTest.php b/tests/OpenIdTest.php
index a27364d..c23344a 100644
--- a/tests/OpenIdTest.php
+++ b/tests/OpenIdTest.php
@@ -6,7 +6,7 @@
class OpenIdTest extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -21,7 +21,7 @@ protected function setUp()
// Tests :
- public function testSetGet()
+ public function testSetGet(): void
{
$client = new OpenId();
@@ -37,7 +37,7 @@ public function testSetGet()
/**
* @depends testSetGet
*/
- public function testGetDefaults()
+ public function testGetDefaults(): void
{
$client = new OpenId();
@@ -45,7 +45,7 @@ public function testGetDefaults()
$this->assertNotEmpty($client->getReturnUrl(), 'Unable to get default return URL!');
}
- public function testDiscover()
+ public function testDiscover(): void
{
$this->markTestSkipped('OpenID is almost dead. There are no famous public servers that support it.');
@@ -65,7 +65,7 @@ public function testDiscover()
* Data provider for [[testCompareUrl()]]
* @return array test data
*/
- public function dataProviderCompareUrl()
+ public function dataProviderCompareUrl(): array
{
return [
[
@@ -105,7 +105,7 @@ public function dataProviderCompareUrl()
* @param string $url2
* @param bool $expectedResult
*/
- public function testCompareUrl($url1, $url2, $expectedResult)
+ public function testCompareUrl($url1, $url2, $expectedResult): void
{
$client = new OpenId();
$comparisonResult = $this->invoke($client, 'compareUrl', [$url1, $url2]);
diff --git a/tests/SessionStateStorageTest.php b/tests/SessionStateStorageTest.php
index 2a34226..4a56f33 100644
--- a/tests/SessionStateStorageTest.php
+++ b/tests/SessionStateStorageTest.php
@@ -7,10 +7,10 @@
class SessionStateStorageTest extends TestCase
{
- public function testSetState()
+ public function testSetState(): void
{
$storage = new SessionStateStorage([
- 'session' => Session::className()
+ 'session' => Session::class
]);
$key = 'test-key';
@@ -23,4 +23,4 @@ public function testSetState()
$storage->remove($key);
$this->assertNull($storage->get($key));
}
-}
\ No newline at end of file
+}
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 95e03d7..83853ac 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -17,7 +17,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase
* Clean up after test.
* By default the application created with [[mockApplication]] will be destroyed.
*/
- protected function tearDown()
+ protected function tearDown(): void
{
parent::tearDown();
$this->destroyApplication();
@@ -70,7 +70,7 @@ protected function mockWebApplication($config = [], $appClass = '\yii\web\Applic
],
'request' => [
'cookieValidationKey' => 'wefJDF8sfdsfSDefwqdxj9oq',
- 'scriptFile' => __DIR__ .'/index.php',
+ 'scriptFile' => __DIR__ . '/index.php',
'scriptUrl' => '/index.php',
],
]
@@ -80,7 +80,7 @@ protected function mockWebApplication($config = [], $appClass = '\yii\web\Applic
/**
* Destroys application in Yii::$app by setting it to null.
*/
- protected function destroyApplication()
+ protected function destroyApplication(): void
{
Yii::$app = null;
Yii::$container = new Container();
diff --git a/tests/TokenTest.php b/tests/TokenTest.php
index a9f058e..fdb20e8 100644
--- a/tests/TokenTest.php
+++ b/tests/TokenTest.php
@@ -6,7 +6,7 @@
class TokenTest extends TestCase
{
- public function testCreate()
+ public function testCreate(): void
{
$config = [
'tokenParamKey' => 'test_token_param_key',
@@ -21,7 +21,7 @@ public function testCreate()
$this->assertTrue($oauthToken->createTimestamp > 0, 'Unable to fill create timestamp!');
}
- public function testCreateWithIncorrectConfigOrder()
+ public function testCreateWithIncorrectConfigOrder(): void
{
$config = [
'token' => 'token',
@@ -31,13 +31,13 @@ public function testCreateWithIncorrectConfigOrder()
'refreshTokenParamKey' => 'test_refresh_token_param_key',
];
$oauthToken = new OAuthToken($config);
- $this->assertInternalType('object', $oauthToken, 'Unable to create access token!');
+ $this->assertIsObject($oauthToken, 'Unable to create access token!');
foreach ($config as $name => $value) {
$this->assertEquals($value, $oauthToken->$name, 'Unable to setup attributes by constructor!');
}
}
- public function testSetupParams()
+ public function testSetupParams(): void
{
$oauthToken = new OAuthToken();
@@ -57,7 +57,7 @@ public function testSetupParams()
/**
* @depends testSetupParams
*/
- public function testSetupParamsShortcuts()
+ public function testSetupParamsShortcuts(): void
{
$oauthToken = new OAuthToken();
@@ -78,7 +78,7 @@ public function testSetupParamsShortcuts()
* Data provider for {@link testAutoFetchExpireDuration}.
* @return array test data.
*/
- public function autoFetchExpireDurationDataProvider()
+ public function autoFetchExpireDurationDataProvider(): array
{
return [
[
@@ -107,7 +107,7 @@ public function autoFetchExpireDurationDataProvider()
* @param array $params
* @param $expectedExpireDuration
*/
- public function testAutoFetchExpireDuration(array $params, $expectedExpireDuration)
+ public function testAutoFetchExpireDuration(array $params, $expectedExpireDuration): void
{
$oauthToken = new OAuthToken();
$oauthToken->setParams($params);
@@ -117,7 +117,7 @@ public function testAutoFetchExpireDuration(array $params, $expectedExpireDurati
/**
* @depends testSetupParamsShortcuts
*/
- public function testGetIsExpired()
+ public function testGetIsExpired(): void
{
$oauthToken = new OAuthToken();
$expireDuration = 3600;
@@ -132,7 +132,7 @@ public function testGetIsExpired()
/**
* @depends testGetIsExpired
*/
- public function testGetIsValid()
+ public function testGetIsValid(): void
{
$oauthToken = new OAuthToken();
$expireDuration = 3600;
@@ -147,7 +147,7 @@ public function testGetIsValid()
$this->assertFalse($oauthToken->getIsValid(), 'Expired token is valid!');
}
- public function testHasRefreshToken()
+ public function testHasRefreshToken(): void
{
$oauthToken = new OAuthToken([
'params' => [
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 576b25b..ce261aa 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,5 +1,6 @@
getParam('google');
if (empty($params['serviceAccount'])) {
- $this->markTestSkipped("Google service account name is not configured.");
+ $this->markTestSkipped('Google service account name is not configured.');
}
$oauthClient = new Google();
$token = $oauthClient->authenticateUserJwt($params['serviceAccount'], [
- 'class' => RsaSha::className(),
+ 'class' => RsaSha::class,
'algorithm' => OPENSSL_ALGO_SHA256,
'privateCertificate' => $params['serviceAccountPrivateKey']
]);
@@ -47,7 +47,7 @@ public function testAuthenticateUserJwt()
* Data provider for [[testDefaultReturnUrl]].
* @return array test data.
*/
- public function defaultReturnUrlDataProvider()
+ public function defaultReturnUrlDataProvider(): array
{
return [
'default' => [['authclient' => 'google'], null, '/?authclient=google'],
diff --git a/tests/clients/base/BaseOauth2ClientTestCase.php b/tests/clients/base/BaseOauth2ClientTestCase.php
index 98ddb31..bc2118f 100644
--- a/tests/clients/base/BaseOauth2ClientTestCase.php
+++ b/tests/clients/base/BaseOauth2ClientTestCase.php
@@ -33,7 +33,7 @@ protected function getAccessTokenBodyParamName()
return 'access_token';
}
- protected function setUp()
+ protected function setUp(): void
{
$config = [
'components' => [
@@ -46,7 +46,7 @@ protected function setUp()
$this->mockApplication($config, '\yii\web\Application');
}
- public function testTokenLocation()
+ public function testTokenLocation(): void
{
$tokenLocation = $this->getExpectedTokenLocation();
$client = $this->createClient();
diff --git a/tests/compatibility.php b/tests/compatibility.php
deleted file mode 100644
index f7fd3f2..0000000
--- a/tests/compatibility.php
+++ /dev/null
@@ -1,32 +0,0 @@
-setExpectedException($exception);
- }
-
- /**
- * @param string $message
- */
- public function expectExceptionMessage($message)
- {
- $this->setExpectedException($this->getExpectedException(), $message);
- }
- }
- }
-}
diff --git a/tests/data/Session.php b/tests/data/Session.php
index 66afc5e..483cf56 100644
--- a/tests/data/Session.php
+++ b/tests/data/Session.php
@@ -19,4 +19,4 @@ public function open()
{
// blank, override, preventing session start
}
-}
\ No newline at end of file
+}
diff --git a/tests/data/TestClient.php b/tests/data/TestClient.php
index db67602..fbcbba5 100644
--- a/tests/data/TestClient.php
+++ b/tests/data/TestClient.php
@@ -12,8 +12,8 @@ class TestClient extends BaseClient
/**
* {@inheritdoc}
*/
- protected function initUserAttributes()
+ protected function initUserAttributes(): array
{
return [];
}
-}
\ No newline at end of file
+}
diff --git a/tests/data/config.php b/tests/data/config.php
index 1336e11..5f365fc 100644
--- a/tests/data/config.php
+++ b/tests/data/config.php
@@ -1,4 +1,5 @@
[
'serviceAccount' => '', // e.g. 'your-service-account-id@developer.gserviceaccount.com'
- 'serviceAccountPrivateKey' => "", // e.g. "-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----\n"
+ 'serviceAccountPrivateKey' => '', // e.g. "-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----\n"
]
];
@@ -16,4 +17,4 @@
include(__DIR__ . '/config.local.php');
}
-return $config;
\ No newline at end of file
+return $config;
diff --git a/tests/signature/BaseMethodTest.php b/tests/signature/BaseMethodTest.php
index c60bcea..93186bf 100644
--- a/tests/signature/BaseMethodTest.php
+++ b/tests/signature/BaseMethodTest.php
@@ -23,7 +23,7 @@ protected function createTestSignatureMethod()
// Tests :
- public function testGenerateSignature()
+ public function testGenerateSignature(): void
{
$signatureMethod = $this->createTestSignatureMethod();
@@ -38,7 +38,7 @@ public function testGenerateSignature()
/**
* @depends testGenerateSignature
*/
- public function testVerify()
+ public function testVerify(): void
{
$signatureMethod = $this->createTestSignatureMethod();
diff --git a/tests/signature/HmacSha1Test.php b/tests/signature/HmacSha1Test.php
index e766793..043e635 100644
--- a/tests/signature/HmacSha1Test.php
+++ b/tests/signature/HmacSha1Test.php
@@ -7,7 +7,7 @@
class HmacSha1Test extends TestCase
{
- public function testGenerateSignature()
+ public function testGenerateSignature(): void
{
$signatureMethod = new HmacSha1();
diff --git a/tests/signature/HmacShaTest.php b/tests/signature/HmacShaTest.php
index 3fe06b5..3992b71 100644
--- a/tests/signature/HmacShaTest.php
+++ b/tests/signature/HmacShaTest.php
@@ -7,7 +7,7 @@
class HmacShaTest extends TestCase
{
- public function testGenerateSignature()
+ public function testGenerateSignature(): void
{
$signatureMethod = new HmacSha(['algorithm' => 'sha256']);
@@ -17,4 +17,4 @@ public function testGenerateSignature()
$signature = $signatureMethod->generateSignature($baseString, $key);
$this->assertNotEmpty($signature, 'Unable to generate signature!');
}
-}
\ No newline at end of file
+}
diff --git a/tests/signature/PlainTextTest.php b/tests/signature/PlainTextTest.php
index da893eb..223d9c6 100644
--- a/tests/signature/PlainTextTest.php
+++ b/tests/signature/PlainTextTest.php
@@ -7,7 +7,7 @@
class PlainTextTest extends TestCase
{
- public function testGenerateSignature()
+ public function testGenerateSignature(): void
{
$signatureMethod = new PlainText();
diff --git a/tests/signature/RsaShaTest.php b/tests/signature/RsaShaTest.php
index 50439a9..f9eb152 100644
--- a/tests/signature/RsaShaTest.php
+++ b/tests/signature/RsaShaTest.php
@@ -63,7 +63,7 @@ protected function getTestPrivateCertificate()
* Data provider for [[testGetName()]]
* @return array test data
*/
- public function dataProviderGetName()
+ public function dataProviderGetName(): array
{
return [
[OPENSSL_ALGO_SHA1, 'RSA-SHA1'],
@@ -78,7 +78,7 @@ public function dataProviderGetName()
* @param $algorithm
* @param $expectedName
*/
- public function testGetName($algorithm, $expectedName)
+ public function testGetName($algorithm, $expectedName): void
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Constants processing is unavailable at HHVM');
@@ -88,7 +88,7 @@ public function testGetName($algorithm, $expectedName)
$this->assertEquals($expectedName, $signatureMethod->getName());
}
- public function testGenerateSignature()
+ public function testGenerateSignature(): void
{
$signatureMethod = new RsaSha(['algorithm' => OPENSSL_ALGO_SHA1]);
$signatureMethod->setPrivateCertificate($this->getTestPrivateCertificate());
@@ -104,7 +104,7 @@ public function testGenerateSignature()
/**
* @depends testGenerateSignature
*/
- public function testVerify()
+ public function testVerify(): void
{
$signatureMethod = new RsaSha(['algorithm' => OPENSSL_ALGO_SHA1]);
$signatureMethod->setPrivateCertificate($this->getTestPrivateCertificate());
@@ -119,7 +119,7 @@ public function testVerify()
$this->assertTrue($signatureMethod->verify($generatedSignature, $baseString, $key), 'Generated signature is invalid!');
}
- public function testInitPrivateCertificate()
+ public function testInitPrivateCertificate(): void
{
$signatureMethod = new RsaSha(['algorithm' => OPENSSL_ALGO_SHA1]);
@@ -128,7 +128,7 @@ public function testInitPrivateCertificate()
$this->assertEquals(file_get_contents($certificateFileName), $signatureMethod->getPrivateCertificate(), 'Unable to fetch private certificate from file!');
}
- public function testInitPublicCertificate()
+ public function testInitPublicCertificate(): void
{
$signatureMethod = new RsaSha(['algorithm' => OPENSSL_ALGO_SHA1]);
diff --git a/tests/traits/OAuthDefaultReturnUrlTestTrait.php b/tests/traits/OAuthDefaultReturnUrlTestTrait.php
index de1b567..1ba8172 100644
--- a/tests/traits/OAuthDefaultReturnUrlTestTrait.php
+++ b/tests/traits/OAuthDefaultReturnUrlTestTrait.php
@@ -26,18 +26,18 @@ abstract public function defaultReturnUrlDataProvider();
*/
public function testDefaultReturnUrl($requestQueryParams, $parametersToKeepInReturnUrl, $expectedReturnUrl)
{
- $module = \Yii::createObject(\yii\base\Module::className(), ['module']);
+ $module = \Yii::createObject(\yii\base\Module::class, ['module']);
$request = \Yii::createObject([
- 'class' => \yii\web\Request::className(),
+ 'class' => \yii\web\Request::class,
'queryParams' => $requestQueryParams,
'scriptUrl' => '/index.php',
]);
$response = \Yii::createObject([
- 'class' => \yii\web\Response::className(),
+ 'class' => \yii\web\Response::class,
'charset' => 'UTF-8',
]);
$controller = \Yii::createObject([
- 'class' => \yii\web\Controller::className(),
+ 'class' => \yii\web\Controller::class,
'request' => $request,
'response' => $response,
], ['default', $module]);