Skip to content

Commit ae8df16

Browse files
committed
Remove the createThumbs function in the image class
1 parent 5043379 commit ae8df16

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

libraries/src/Image/Image.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -367,27 +367,6 @@ public function createThumbnails($thumbSizes, $creationMethod = self::SCALE_INSI
367367
return $thumbsCreated;
368368
}
369369

370-
/**
371-
* Method to create thumbnails from the current image and save them to disk. It allows creation by resizing or cropping the original image.
372-
*
373-
* @param mixed $thumbSizes string or array of strings. Example: $thumbSizes = ['150x75','250x150'];
374-
* @param integer $creationMethod 1-3 resize $scaleMethod | 4 create cropping
375-
* @param string $thumbsFolder destination thumbs folder. null generates a thumbs folder in the image folder
376-
*
377-
* @return array
378-
*
379-
* @since 2.5.0
380-
* @throws \LogicException
381-
* @throws \InvalidArgumentException
382-
*
383-
* @deprecated 4.0 will be removed in 6.0
384-
* Use \Joomla\CMS\Image\createThumbnails instead
385-
*/
386-
public function createThumbs($thumbSizes, $creationMethod = self::SCALE_INSIDE, $thumbsFolder = null)
387-
{
388-
return $this->createThumbnails($thumbSizes, $creationMethod, $thumbsFolder, false);
389-
}
390-
391370
/**
392371
* Method to crop the current image.
393372
*

tests/Unit/Libraries/Cms/Image/ImageTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -884,27 +884,27 @@ public function testGenerateThumbs()
884884
}
885885

886886
/**
887-
* Test the Image::createThumbs method without a loaded image.
887+
* Test the Image::createThumbnails method without a loaded image.
888888
*
889889
* @return void
890890
*
891-
* @covers \Joomla\CMS\Image\Image::createThumbs
891+
* @covers \Joomla\CMS\Image\Image::createThumbnails
892892
*
893893
* @since 1.1.3
894894
*/
895-
public function testCreateThumbsWithoutLoadedImage()
895+
public function testcreateThumbnailsWithoutLoadedImage()
896896
{
897897
$this->expectException(\LogicException::class);
898898

899-
$thumbs = $this->instance->createThumbs('50x38');
899+
$thumbs = $this->instance->createThumbnails('50x38');
900900
}
901901

902902
/**
903903
* Test the Image::generateThumbs method with invalid folder.
904904
*
905905
* @return void
906906
*
907-
* @covers \Joomla\CMS\Image\Image::createThumbs
907+
* @covers \Joomla\CMS\Image\Image::createThumbnails
908908
*
909909
* @since 1.1.3
910910
*/
@@ -913,23 +913,23 @@ public function testGenerateThumbsWithInvalidFolder()
913913
$this->expectException(\InvalidArgumentException::class);
914914

915915
$this->instance->loadFile($this->testFile);
916-
$this->instance->createThumbs('50x38', Image::SCALE_INSIDE, '/foo/bar');
916+
$this->instance->createThumbnails('50x38', Image::SCALE_INSIDE, '/foo/bar');
917917
}
918918

919919
/**
920-
* Test the Image::createThumbs method.
920+
* Test the Image::createThumbnails method.
921921
*
922922
* @return void
923923
*
924-
* @covers \Joomla\CMS\Image\Image::createThumbs
924+
* @covers \Joomla\CMS\Image\Image::createThumbnails
925925
*
926926
* @since 1.1.3
927927
*/
928-
public function testCreateThumbs()
928+
public function testcreateThumbnails()
929929
{
930930
$this->instance->loadFile($this->testFile);
931931

932-
$thumbs = $this->instance->createThumbs('50x38', Image::CROP);
932+
$thumbs = $this->instance->createThumbnails('50x38', Image::CROP);
933933
$outFileGif = TestHelper::getValue($thumbs[0], 'path');
934934

935935
$a = Image::getImageFileProperties($this->testFile);

0 commit comments

Comments
 (0)