mirror of
https://github.com/Intervention/image.git
synced 2025-08-23 22:12:51 +02:00
Add type hints
This commit is contained in:
@@ -51,7 +51,7 @@ final class CollectionTest extends BaseTestCase
|
|||||||
{
|
{
|
||||||
$collection = new Collection(['foo', 'bar', 'baz']);
|
$collection = new Collection(['foo', 'bar', 'baz']);
|
||||||
$this->assertEquals(3, $collection->count());
|
$this->assertEquals(3, $collection->count());
|
||||||
$collection = $collection->filter(function ($text) {
|
$collection = $collection->filter(function ($text): bool {
|
||||||
return substr($text, 0, 1) == 'b';
|
return substr($text, 0, 1) == 'b';
|
||||||
});
|
});
|
||||||
$this->assertEquals(2, $collection->count());
|
$this->assertEquals(2, $collection->count());
|
||||||
|
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||||||
namespace Intervention\Image\Tests\Unit\Modifiers;
|
namespace Intervention\Image\Tests\Unit\Modifiers;
|
||||||
|
|
||||||
use Intervention\Image\Geometry\Point;
|
use Intervention\Image\Geometry\Point;
|
||||||
|
use Intervention\Image\Interfaces\FontInterface;
|
||||||
use Intervention\Image\Modifiers\TextModifier;
|
use Intervention\Image\Modifiers\TextModifier;
|
||||||
use Intervention\Image\Tests\BaseTestCase;
|
use Intervention\Image\Tests\BaseTestCase;
|
||||||
use Intervention\Image\Typography\Font;
|
use Intervention\Image\Typography\Font;
|
||||||
@@ -17,7 +18,7 @@ final class TextModifierTest extends BaseTestCase
|
|||||||
{
|
{
|
||||||
$modifier = new class ('test', new Point(), new Font()) extends TextModifier
|
$modifier = new class ('test', new Point(), new Font()) extends TextModifier
|
||||||
{
|
{
|
||||||
public function testStrokeOffsets($font)
|
public function testStrokeOffsets(FontInterface $font)
|
||||||
{
|
{
|
||||||
return $this->strokeOffsets($font);
|
return $this->strokeOffsets($font);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user