1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-01 03:20:17 +02:00
This commit is contained in:
Viktor Szépe
2024-03-23 08:55:46 +01:00
committed by GitHub
parent 7f4ff15d51
commit b0b76eb97e
11 changed files with 23 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ API for the two most popular image manipulation extensions. You can choose
between the GD library or Imagick as the base layer for all operations.
- Simple interface for common image editing tasks
- Interchangable driver architecture
- Interchangeable driver architecture
- Support for animated images
- Framework-agnostic
- PSR-12 compliant

View File

@@ -124,27 +124,27 @@ abstract class AbstractFontProcessor implements FontProcessorInterface
}
$wrapped = [];
$formatedLine = new Line();
$formattedLine = new Line();
foreach ($line as $word) {
// calculate width of newly formated line
$lineWidth = $this->boxSize(match ($formatedLine->count()) {
// calculate width of newly formatted line
$lineWidth = $this->boxSize(match ($formattedLine->count()) {
0 => $word,
default => (string) $formatedLine . ' ' . $word,
default => (string) $formattedLine . ' ' . $word,
}, $font)->width();
// decide if word fits on current line or a new line must be created
if ($line->count() === 1 || $lineWidth <= $font->wrapWidth()) {
$formatedLine->add($word);
$formattedLine->add($word);
} else {
if ($formatedLine->count()) {
$wrapped[] = $formatedLine;
if ($formattedLine->count()) {
$wrapped[] = $formattedLine;
}
$formatedLine = new Line($word);
$formattedLine = new Line($word);
}
}
$wrapped[] = $formatedLine;
$wrapped[] = $formattedLine;
return $wrapped;
}

View File

@@ -80,7 +80,7 @@ class ContainModifier extends GenericContainModifier implements SpecializedInter
$frame->size()->height()
);
// set new content as recource
// set new content as resource
$frame->setNative($modified);
}
}

View File

@@ -116,7 +116,7 @@ class CropModifier extends GenericCropModifier implements SpecializedInterface
);
}
// set new content as recource
// set new content as resource
$frame->setNative($modified);
}
}

View File

@@ -76,7 +76,7 @@ class ResizeCanvasModifier extends GenericResizeCanvasModifier implements Specia
$frame->size()->height()
);
// set new content as recource
// set new content as resource
$frame->setNative($modified);
}
}

View File

@@ -47,7 +47,7 @@ class ResizeModifier extends GenericResizeModifier implements SpecializedInterfa
$frame->size()->height()
);
// set new content as recource
// set new content as resource
$frame->setNative($modified);
}

View File

@@ -159,7 +159,7 @@ class Core implements CoreInterface, Iterator
/**
* {@inheritdoc}
*
* @see Interator::rewind()
* @see Iterator::rewind()
*/
public function current(): mixed
{
@@ -171,7 +171,7 @@ class Core implements CoreInterface, Iterator
/**
* {@inheritdoc}
*
* @see Interator::rewind()
* @see Iterator::rewind()
*/
public function next(): void
{
@@ -181,7 +181,7 @@ class Core implements CoreInterface, Iterator
/**
* {@inheritdoc}
*
* @see Interator::rewind()
* @see Iterator::rewind()
*/
public function key(): mixed
{
@@ -191,7 +191,7 @@ class Core implements CoreInterface, Iterator
/**
* {@inheritdoc}
*
* @see Interator::rewind()
* @see Iterator::rewind()
*/
public function valid(): bool
{
@@ -207,7 +207,7 @@ class Core implements CoreInterface, Iterator
/**
* {@inheritdoc}
*
* @see Interator::rewind()
* @see Iterator::rewind()
*/
public function rewind(): void
{

View File

@@ -254,7 +254,7 @@ final class Image implements ImageInterface
/**
* {@inheritdoc}
*
* @see ImgageInterface::setExif()
* @see ImageInterface::setExif()
*/
public function setExif(CollectionInterface $exif): ImageInterface
{

View File

@@ -25,7 +25,7 @@ final class ImageManager
}
/**
* Create image mangager with given driver
* Create image manager with given driver
*
* @link https://image.intervention.io/v3/basics/image-manager
* @param string|DriverInterface $driver

View File

@@ -10,7 +10,7 @@ use Intervention\Image\Typography\TextBlock;
interface FontProcessorInterface
{
/**
* Calculate size of bounding box of given text in conjuction with the given font
* Calculate size of bounding box of given text in conjunction with the given font
*
* @throws FontException
* @return SizeInterface

View File

@@ -14,7 +14,7 @@ interface ResolutionInterface
public function x(): float;
/**
* Set resolution on x-axix
* Set resolution on x-axis
*
* @param float $x
* @return ResolutionInterface