Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
cesargb committed Nov 10, 2022
1 parent 128819a commit 56bb732
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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 @@ composer require descom/image-x
use Descom\ImageX\ImageX;

return ImageX::from($filename)
->convert('w_200,h_200,bg_000000')
->transform('w_200,h_200,bg_000000')
->auto() // Auto format to image; webp, jpg
->response(); // ->save($otherFilename);
```
Expand Down
2 changes: 1 addition & 1 deletion src/ImageX.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function auto(): self
return $this;
}

public function convert(string $options): static
public function transform(string $options): static
{
$options = Options::build($options);

Expand Down
4 changes: 2 additions & 2 deletions tests/ImageXTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testCrop()
$filenameTarget = $this->pathTmp.'/'.str_replace(',', '', $testing['options']).'.jpg';

ImageX::from($this->origen)
->convert($testing['options'])
->transform($testing['options'])
->save($filenameTarget);

$this->assertEquals($testing['hash'], hash_file('sha256', $filenameTarget));
Expand Down Expand Up @@ -94,7 +94,7 @@ public function testFormatAuto()
$filenameTarget = $this->pathTmp.'/'.str_replace(',', '', $testing['options']).'.jpg';

ImageX::from($this->origen)
->convert($testing['options'])
->transform($testing['options'])
->auto()
->save($filenameTarget);

Expand Down

0 comments on commit 56bb732

Please sign in to comment.