mirror of
https://github.com/Intervention/image.git
synced 2025-08-06 05:47:25 +02:00
Fix typos (#1319)
This commit is contained in:
@@ -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.
|
between the GD library or Imagick as the base layer for all operations.
|
||||||
|
|
||||||
- Simple interface for common image editing tasks
|
- Simple interface for common image editing tasks
|
||||||
- Interchangable driver architecture
|
- Interchangeable driver architecture
|
||||||
- Support for animated images
|
- Support for animated images
|
||||||
- Framework-agnostic
|
- Framework-agnostic
|
||||||
- PSR-12 compliant
|
- PSR-12 compliant
|
||||||
|
@@ -124,27 +124,27 @@ abstract class AbstractFontProcessor implements FontProcessorInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$wrapped = [];
|
$wrapped = [];
|
||||||
$formatedLine = new Line();
|
$formattedLine = new Line();
|
||||||
|
|
||||||
foreach ($line as $word) {
|
foreach ($line as $word) {
|
||||||
// calculate width of newly formated line
|
// calculate width of newly formatted line
|
||||||
$lineWidth = $this->boxSize(match ($formatedLine->count()) {
|
$lineWidth = $this->boxSize(match ($formattedLine->count()) {
|
||||||
0 => $word,
|
0 => $word,
|
||||||
default => (string) $formatedLine . ' ' . $word,
|
default => (string) $formattedLine . ' ' . $word,
|
||||||
}, $font)->width();
|
}, $font)->width();
|
||||||
|
|
||||||
// decide if word fits on current line or a new line must be created
|
// decide if word fits on current line or a new line must be created
|
||||||
if ($line->count() === 1 || $lineWidth <= $font->wrapWidth()) {
|
if ($line->count() === 1 || $lineWidth <= $font->wrapWidth()) {
|
||||||
$formatedLine->add($word);
|
$formattedLine->add($word);
|
||||||
} else {
|
} else {
|
||||||
if ($formatedLine->count()) {
|
if ($formattedLine->count()) {
|
||||||
$wrapped[] = $formatedLine;
|
$wrapped[] = $formattedLine;
|
||||||
}
|
}
|
||||||
$formatedLine = new Line($word);
|
$formattedLine = new Line($word);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$wrapped[] = $formatedLine;
|
$wrapped[] = $formattedLine;
|
||||||
|
|
||||||
return $wrapped;
|
return $wrapped;
|
||||||
}
|
}
|
||||||
|
@@ -80,7 +80,7 @@ class ContainModifier extends GenericContainModifier implements SpecializedInter
|
|||||||
$frame->size()->height()
|
$frame->size()->height()
|
||||||
);
|
);
|
||||||
|
|
||||||
// set new content as recource
|
// set new content as resource
|
||||||
$frame->setNative($modified);
|
$frame->setNative($modified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,7 @@ class CropModifier extends GenericCropModifier implements SpecializedInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set new content as recource
|
// set new content as resource
|
||||||
$frame->setNative($modified);
|
$frame->setNative($modified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -76,7 +76,7 @@ class ResizeCanvasModifier extends GenericResizeCanvasModifier implements Specia
|
|||||||
$frame->size()->height()
|
$frame->size()->height()
|
||||||
);
|
);
|
||||||
|
|
||||||
// set new content as recource
|
// set new content as resource
|
||||||
$frame->setNative($modified);
|
$frame->setNative($modified);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ class ResizeModifier extends GenericResizeModifier implements SpecializedInterfa
|
|||||||
$frame->size()->height()
|
$frame->size()->height()
|
||||||
);
|
);
|
||||||
|
|
||||||
// set new content as recource
|
// set new content as resource
|
||||||
$frame->setNative($modified);
|
$frame->setNative($modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -159,7 +159,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see Interator::rewind()
|
* @see Iterator::rewind()
|
||||||
*/
|
*/
|
||||||
public function current(): mixed
|
public function current(): mixed
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see Interator::rewind()
|
* @see Iterator::rewind()
|
||||||
*/
|
*/
|
||||||
public function next(): void
|
public function next(): void
|
||||||
{
|
{
|
||||||
@@ -181,7 +181,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see Interator::rewind()
|
* @see Iterator::rewind()
|
||||||
*/
|
*/
|
||||||
public function key(): mixed
|
public function key(): mixed
|
||||||
{
|
{
|
||||||
@@ -191,7 +191,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see Interator::rewind()
|
* @see Iterator::rewind()
|
||||||
*/
|
*/
|
||||||
public function valid(): bool
|
public function valid(): bool
|
||||||
{
|
{
|
||||||
@@ -207,7 +207,7 @@ class Core implements CoreInterface, Iterator
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see Interator::rewind()
|
* @see Iterator::rewind()
|
||||||
*/
|
*/
|
||||||
public function rewind(): void
|
public function rewind(): void
|
||||||
{
|
{
|
||||||
|
@@ -254,7 +254,7 @@ final class Image implements ImageInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*
|
*
|
||||||
* @see ImgageInterface::setExif()
|
* @see ImageInterface::setExif()
|
||||||
*/
|
*/
|
||||||
public function setExif(CollectionInterface $exif): ImageInterface
|
public function setExif(CollectionInterface $exif): ImageInterface
|
||||||
{
|
{
|
||||||
|
@@ -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
|
* @link https://image.intervention.io/v3/basics/image-manager
|
||||||
* @param string|DriverInterface $driver
|
* @param string|DriverInterface $driver
|
||||||
|
@@ -10,7 +10,7 @@ use Intervention\Image\Typography\TextBlock;
|
|||||||
interface FontProcessorInterface
|
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
|
* @throws FontException
|
||||||
* @return SizeInterface
|
* @return SizeInterface
|
||||||
|
@@ -14,7 +14,7 @@ interface ResolutionInterface
|
|||||||
public function x(): float;
|
public function x(): float;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set resolution on x-axix
|
* Set resolution on x-axis
|
||||||
*
|
*
|
||||||
* @param float $x
|
* @param float $x
|
||||||
* @return ResolutionInterface
|
* @return ResolutionInterface
|
||||||
|
Reference in New Issue
Block a user