diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3eae125..1fb7c42 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,10 @@ name: ci -on: [ push, pull_request ] +on: + push: + branches: [main] + pull_request: + branches: [main] jobs: build-test: @@ -9,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '7.4', '8.0', '8.1' ] + php-versions: [ '7.4', '8.0', '8.1', '8.2' ] steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 9890cb1..61cc928 100644 --- a/composer.json +++ b/composer.json @@ -28,15 +28,15 @@ } ], "require": { - "php": "^7.4 | ^8.0 | ^8.1", + "php": "^7.4 | ^8.0 | ^8.1 | ^8.2", "ext-json": "*", "researchgate/libris": "^2.3.0" }, "require-dev": { "phpunit/phpunit": "^9.3", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.9", - "phpstan/phpstan": "^0.12.42", + "vimeo/psalm": "^5.15.0", + "phpstan/phpstan": "^1.10.38", "friendsofphp/php-cs-fixer": "^3.1" }, "autoload": { diff --git a/src/Model/Container.php b/src/Model/Container.php index 08964f2..8a61ff3 100644 --- a/src/Model/Container.php +++ b/src/Model/Container.php @@ -3,13 +3,15 @@ namespace Geissler\Converter\Model; use ReturnTypeWillChange; -use Geissler\Converter\Model\Entry; /** * Abstract container to access groups of objects as "array"-object. * * @author Benjamin Geißler * @license MIT + * + * @template-implements \IteratorAggregate + * @template-implements \ArrayAccess */ abstract class Container implements \IteratorAggregate, \ArrayAccess, \Countable { diff --git a/src/Model/Entry.php b/src/Model/Entry.php index ea540f7..5d31796 100644 --- a/src/Model/Entry.php +++ b/src/Model/Entry.php @@ -950,7 +950,7 @@ public function getInterviewer() * @param $issue * @return Entry */ - public function setIssue($issue) + public function setIssue(string $issue) { $this->issue = $issue; return $this; @@ -1582,7 +1582,7 @@ public function getSubmitted() * @param $title * @return Entry */ - public function setTitle($title) + public function setTitle(string $title) { $this->title = $title; return $this; @@ -1690,7 +1690,7 @@ public function getVersion() * @param $volume * @return Entry */ - public function setVolume($volume) + public function setVolume(string $volume) { $this->volume = $volume; return $this;