Skip to content

Commit

Permalink
Rename ImageManager::make to ImageManager::read
Browse files Browse the repository at this point in the history
  • Loading branch information
olivervogel committed Oct 1, 2023
1 parent 635567e commit 764c6f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Intervention Image is a **image handling and manipulation library written in PHP
$manager = new ImageManager('gd')

// open an image file
$image = $manager->make('images/example.gif');
$image = $manager->read('images/example.gif');

// resize image instance
$image->resize(height: 300);
Expand Down
2 changes: 1 addition & 1 deletion src/ImageManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function create(int $width, int $height): ImageInterface
* @param mixed $source
* @return ImageInterface
*/
public function make($source): ImageInterface
public function read($source): ImageInterface
{
return $this->resolveDriverClass('InputHandler')->handle($source);
}
Expand Down
8 changes: 4 additions & 4 deletions tests/ImageManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public function testCreateGd()
}

/** @requires extension gd */
public function testMakeGd()
public function testReadGd()
{
$manager = new ImageManager('gd');
$image = $manager->make(__DIR__ . '/images/red.gif');
$image = $manager->read(__DIR__ . '/images/red.gif');
$this->assertInstanceOf(ImageInterface::class, $image);
}

Expand All @@ -41,10 +41,10 @@ public function testCreateImagick()
}

/** @requires extension imagick */
public function testMakeImagick()
public function testReadImagick()
{
$manager = new ImageManager('imagick');
$image = $manager->make(__DIR__ . '/images/red.gif');
$image = $manager->read(__DIR__ . '/images/red.gif');
$this->assertInstanceOf(ImageInterface::class, $image);
}
}

0 comments on commit 764c6f3

Please sign in to comment.