Skip to content

Commit

Permalink
refactoring method call
Browse files Browse the repository at this point in the history
  • Loading branch information
DantSu committed Aug 23, 2023
1 parent 4435522 commit 59a3e92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public static function fromForm(array $file): Image
public function form(array $file): Image
{
if (isset($file) && isset($file["name"]) && $file["name"] != "") {
$this->fromPath($file["tmp_name"]);
$this->path($file["tmp_name"]);
}
return $this;
}
Expand Down Expand Up @@ -278,7 +278,7 @@ public static function fromBase64(string $base64): Image
*/
public function base64(string $base64): Image
{
return $this->fromData(\base64_decode($base64));
return $this->data(\base64_decode($base64));
}

/**
Expand Down Expand Up @@ -329,7 +329,7 @@ public function curl(string $url, array $curlOptions = [], bool $failOnError = f
return $this->resetFields();
}

return $this->fromData($image);
return $this->data($image);
}


Expand Down

0 comments on commit 59a3e92

Please sign in to comment.