refactor: PHP 8 features

This commit is contained in:
Nuno Maduro
2021-10-24 18:29:59 +01:00
parent e8c2fe6e35
commit 2b687a7269
43 changed files with 283 additions and 635 deletions

View File

@ -18,10 +18,8 @@ use PHPUnit\Framework\TestCase;
* Creates a new expectation.
*
* @param mixed $value the Value
*
* @return Expectation|Extendable
*/
function expect($value = null)
function expect($value = null): Expectation|Extendable
{
if (func_num_args() === 0) {
return new Extendable(Expectation::class);
@ -60,7 +58,7 @@ if (!function_exists('dataset')) {
*
* @param Closure|iterable<int|string, mixed> $dataset
*/
function dataset(string $name, $dataset): void
function dataset(string $name, Closure|iterable $dataset): void
{
Datasets::set($name, $dataset);
}