Skip to content

Commit

Permalink
Merge pull request #130 from dantleech/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
dantleech committed Mar 16, 2024
2 parents 84e0355 + 51d8871 commit 0f44c5f
Show file tree
Hide file tree
Showing 11 changed files with 93 additions and 120 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
php-version:
- '7.3'
- '8.0'

steps:
-
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
php-version:
- '7.3'
- '8.0'

steps:
-
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
strategy:
matrix:
php-version:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'

steps:
-
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Set PHP 7.3
- name: Set PHP 8.0
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '8.0'

- name: Compile fink.phar
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/vendor
/bin/fink.phar
/.php_cs.cache
/.php-cs-fixer.cache
/composer.lock
/tests/Workspace
/.phpactor.yml
Expand Down
6 changes: 5 additions & 1 deletion .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<?php

use PhpCsFixer\Config;

$finder = PhpCsFixer\Finder::create()
->in('lib')
->in('tests')
;

return PhpCsFixer\Config::create()
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
Expand All @@ -20,3 +23,4 @@
])
->setFinder($finder)
;

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.11.0] 2024-03-16

- Bump minimum version to PHP 8.0
- Include `.dat` files @M-arcus

## [0.10.2] 2021-01-28

- Consider `base` element when resolving URLs (#109) - @eHtmlu
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3||^8.0",
"php": "^8.0",
"amphp/dns": "^v1.2.2",
"amphp/file": "^1",
"amphp/http-client": "^4.1.0",
Expand All @@ -25,10 +25,10 @@
},
"require-dev": {
"amphp/phpunit-util": "^1.3",
"friendsofphp/php-cs-fixer": "^2.14",
"friendsofphp/php-cs-fixer": "^3.0",
"phpactor/test-utils": "^1.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^0.12.0",
"phpstan/phpstan": "^1.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
Expand Down
3 changes: 3 additions & 0 deletions lib/Model/ImmutableReportStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
use Countable;
use IteratorAggregate;

/**
* @extends IteratorAggregate<Report>
*/
interface ImmutableReportStore extends Countable, IteratorAggregate
{
}
2 changes: 1 addition & 1 deletion lib/Model/Store/CircularReportStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function add(Report $report): void
/**
* {@inheritDoc}
*/
public function count()
public function count(): int
{
return count($this->reports);
}
Expand Down
7 changes: 4 additions & 3 deletions lib/Model/Store/NullReportStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
use ArrayIterator;
use DTL\Extension\Fink\Model\Report;
use DTL\Extension\Fink\Model\ReportStore;
use Traversable;

class NullReportStore implements ReportStore
{
/**
* {@inheritDoc}
*/
public function count()
public function count(): int
{
return 0;
}

/**
* {@inheritDoc}
* @return Traversable<int,Report>
*/
public function getIterator()
public function getIterator(): Traversable
{
return new ArrayIterator();
}
Expand Down
5 changes: 3 additions & 2 deletions lib/Model/Urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use ArrayIterator;
use IteratorAggregate;
use Traversable;

class Urls implements IteratorAggregate
{
Expand Down Expand Up @@ -32,9 +33,9 @@ private function add(Url $url)
}

/**
* {@inheritDoc}
* @return Traversable<int,Url>
*/
public function getIterator()
public function getIterator(): Traversable
{
return new ArrayIterator($this->urls);
}
Expand Down
Loading

0 comments on commit 0f44c5f

Please sign in to comment.