Skip to content

Commit 47b9d69

Browse files
author
Mitch
committed
Rename load() to loadFromFile(), whitespace fixes
1 parent 2783e2f commit 47b9d69

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ImageResize.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ImageResize
4747
*/
4848
public static function createFromFile($filename){
4949
$s = new self();
50-
$s->load($filename);
50+
$s->loadFromFile($filename);
5151
return $s;
5252
}
5353

@@ -72,8 +72,8 @@ public static function createFromString($imageData){
7272
*/
7373
public function __construct($filename = null)
7474
{
75-
if(!empty($filename)) {
76-
$this->load($filename);
75+
if (!empty($filename)) {
76+
$this->loadFromFile($filename);
7777
}
7878
}
7979

@@ -88,7 +88,7 @@ public function loadFromString($imagedata)
8888
{
8989
$image_info = getimagesize('data://application/octet-stream;base64,' . base64_encode($imagedata));
9090

91-
if(!$image_info) {
91+
if (!$image_info) {
9292
throw new \Exception('Could not load image from string');
9393
}
9494

@@ -119,7 +119,7 @@ public function loadFromString($imagedata)
119119
* @return \static
120120
* @throws Exception
121121
*/
122-
public function load($filename)
122+
public function loadFromFile($filename)
123123
{
124124
$image_info = getimagesize($filename);
125125

0 commit comments

Comments
 (0)