Skip to content

Commit 02a8145

Browse files
committed
Mark Image::destroy as deprecated and ignore code coverage
1 parent 12c5b1e commit 02a8145

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/Image.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ public function __construct(string $filename)
9090
$this->instance = $instance;
9191
}
9292

93-
public function __destruct()
94-
{
95-
$this->destroy();
96-
}
97-
9893
public function __toString() : string
9994
{
10095
return $this->getDataUrl();
@@ -104,6 +99,10 @@ public function __toString() : string
10499
* Destroys the GdImage instance.
105100
*
106101
* @return bool
102+
*
103+
* @deprecated
104+
*
105+
* @codeCoverageIgnore
107106
*/
108107
public function destroy() : bool
109108
{

tests/ImageTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ public function testResolution() : void
7878
//$this->image->setResolution(0);
7979
}
8080

81-
public function testDestroy() : void
82-
{
83-
self::assertTrue($this->image->destroy());
84-
self::assertTrue($this->image->destroy());
85-
}
86-
8781
public function testInstance() : void
8882
{
8983
self::assertInstanceOf(\GdImage::class, $this->image->getInstance());

0 commit comments

Comments
 (0)