Skip to content

Commit 82068f6

Browse files
committed
Make Image::setInstance method protected
1 parent 84617e2 commit 82068f6

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getInstance() : GdImage
123123
*
124124
* @return static
125125
*/
126-
public function setInstance(GdImage $instance) : static
126+
protected function setInstance(GdImage $instance) : static
127127
{
128128
$this->instance = $instance;
129129
return $this;

tests/ImageTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ public function testResolution() : void
8383
public function testInstance() : void
8484
{
8585
self::assertInstanceOf(\GdImage::class, $this->image->getInstance());
86-
$instance = \imagecreatefrompng(__DIR__ . '/Support/tree.png');
87-
self::assertNotSame($instance, $this->image->getInstance());
88-
$this->image->setInstance($instance); // @phpstan-ignore-line
89-
self::assertSame($instance, $this->image->getInstance());
90-
$this->expectException(\TypeError::class);
91-
$instance = \fopen(__FILE__, 'rb');
92-
$this->image->setInstance($instance); // @phpstan-ignore-line
9386
}
9487

9588
public function testQualityPng() : void

0 commit comments

Comments
 (0)