Merge pull request #1068 from phil-davis/run-php-8.1-in-CI

Run PHP 8.1 in CI
This commit is contained in:
ByteHamster 2022-01-01 13:22:44 +01:00 committed by GitHub
commit b0fff14c5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View file

@ -17,6 +17,8 @@ jobs:
include:
- php-versions: '7.1'
cs-fixer: false
- php-versions: '8.1'
cs-fixer: false
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -39,15 +39,15 @@ class Collection extends \Flake\Core\FLObject implements \Iterator {
return key($this->aCollection);
}
function next() {
return next($this->aCollection);
function next(): void {
next($this->aCollection);
}
function rewind() {
function rewind(): void {
$this->reset();
}
function valid() {
function valid(): bool {
$key = key($this->aCollection);
return ($key !== null && $key !== false);

View file

@ -31,12 +31,12 @@ namespace Flake\Core\Datastructure;
* @extends \SplDoublyLinkedList<\Flake\Core\Datastructure\Chainable>
*/
class Chain extends \SplDoublyLinkedList {
function push($value) {
function push($value): void {
$value->chain($this, $this->count());
parent::push($value);
}
function offsetUnset($offset) {
function offsetUnset($offset): void {
throw new \Exception("Cannot delete Chainable in Chain");
}

View file

@ -36,7 +36,7 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
$this->__key = $key;
}
function offsetSet($offset, $value) {
function offsetSet($offset, $value): void {
if (is_null($this->__container)) {
return;
}
@ -44,7 +44,7 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
$this->__container->offsetSet($offset, $value);
}
function offsetExists($offset) {
function offsetExists($offset): bool {
if (is_null($this->__container)) {
return false;
}
@ -52,7 +52,7 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
return $this->__container->offsetExists($offset);
}
function offsetUnset($offset) {
function offsetUnset($offset): void {
if (is_null($this->__container)) {
return;
}
@ -70,7 +70,7 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
return $oRes;
}
function rewind() {
function rewind(): void {
$this->__container->rewind();
}
@ -82,10 +82,8 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
return $this->__container->key();
}
function &next() {
$oRes = $this->__container->next();
return $oRes;
function &next(): void {
$this->__container->next();
}
function &prev() {
@ -94,11 +92,11 @@ abstract class ChainLink implements \Flake\Core\Datastructure\Chainable {
return $oPrev;
}
function valid() {
function valid(): bool {
return $this->__container->valid();
}
function count() {
function count(): int {
return $this->__container->count();
}