Merge pull request #2568 from nextcloud/fix/php-8.1-types
add types for internal PHP classes
This commit is contained in:
Коммит
277d394825
|
@ -8,11 +8,11 @@ on:
|
|||
- stable*
|
||||
|
||||
jobs:
|
||||
psalm:
|
||||
psalm-22:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ocp-version: [ 'dev-master', 'dev-stable22' ]
|
||||
ocp-version: [ 'dev-stable22' ]
|
||||
php-versions: ['7.4', '8.0']
|
||||
|
||||
name: Psalm
|
||||
|
@ -31,3 +31,27 @@ jobs:
|
|||
|
||||
- name: Run coding standards check
|
||||
run: composer run psalm
|
||||
|
||||
psalm-master:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ocp-version: [ 'dev-master']
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
|
||||
name: Psalm
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Setup composer and PHP
|
||||
uses: ./.github/actions/setup-composer
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
php-tools: composer, psalm
|
||||
|
||||
- name: Install Nextcloud API
|
||||
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }}
|
||||
|
||||
- name: Run coding standards check
|
||||
run: composer run psalm
|
||||
|
|
|
@ -76,6 +76,9 @@ class Comment extends Entity implements JsonSerializable {
|
|||
$this->shareMapper = Container::queryClass(ShareMapper::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -81,6 +81,9 @@ class Log extends Entity implements JsonSerializable {
|
|||
$this->addType('processed', 'int');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -124,6 +124,9 @@ class Option extends Entity implements JsonSerializable {
|
|||
$this->shareMapper = Container::queryClass(ShareMapper::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -190,6 +190,9 @@ class Poll extends Entity implements JsonSerializable {
|
|||
$this->optionMapper = Container::queryClass(OptionMapper::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -74,6 +74,9 @@ class Preferences extends Entity implements JsonSerializable {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -132,6 +132,9 @@ class Share extends Entity implements JsonSerializable {
|
|||
$this->appSettings = new AppSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -51,6 +51,9 @@ class Subscription extends Entity implements JsonSerializable {
|
|||
$this->addType('pollId', 'int');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -76,6 +76,9 @@ class Vote extends Entity implements JsonSerializable {
|
|||
$this->shareMapper = Container::queryClass(ShareMapper::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -59,6 +59,9 @@ class Watch extends Entity implements JsonSerializable {
|
|||
$this->addType('updated', 'int');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
|
|
|
@ -168,6 +168,9 @@ class AppSettings implements JsonSerializable {
|
|||
$this->config->setAppValue(self::APP_NAME, $key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
// convert group ids to group objects
|
||||
$publicSharesGroups = [];
|
||||
|
|
Загрузка…
Ссылка в новой задаче