mirror of
https://github.com/Intervention/image.git
synced 2025-08-01 03:20:17 +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.
|
||||
|
||||
- Simple interface for common image editing tasks
|
||||
- Interchangable driver architecture
|
||||
- Interchangeable driver architecture
|
||||
- Support for animated images
|
||||
- Framework-agnostic
|
||||
- PSR-12 compliant
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ class CropModifier extends GenericCropModifier implements SpecializedInterface
|
||||
);
|
||||
}
|
||||
|
||||
// set new content as recource
|
||||
// set new content as resource
|
||||
$frame->setNative($modified);
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -254,7 +254,7 @@ final class Image implements ImageInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see ImgageInterface::setExif()
|
||||
* @see ImageInterface::setExif()
|
||||
*/
|
||||
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
|
||||
* @param string|DriverInterface $driver
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user