Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
Result -> Geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed May 14, 2023
1 parent 28761ca commit 4f69a79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/DTO/Result.php → src/DTO/Geometry.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Collection;

class Result implements Arrayable
class Geometry implements Arrayable
{
public readonly int $containerHeight;
public readonly int $widowCount;
Expand Down
10 changes: 5 additions & 5 deletions src/LayoutJustify.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use LycheeOrg\PhpFlickrJustifiedLayout\DTO\Item;
use LycheeOrg\PhpFlickrJustifiedLayout\DTO\LayoutData;
use LycheeOrg\PhpFlickrJustifiedLayout\DTO\Param;
use LycheeOrg\PhpFlickrJustifiedLayout\DTO\Result;
use LycheeOrg\PhpFlickrJustifiedLayout\DTO\Geometry;

class LayoutJustify
{
Expand Down Expand Up @@ -70,7 +70,7 @@ private function addRow(Row $row): Collection
*
* @param Collection<int,Item> $itemLayoutData Array of items to lay out, with data required to lay out each item
*
* @return Result The newly-calculated layout, containing the new container height, and lists of layout items
* @return Geometry The newly-calculated layout, containing the new container height, and lists of layout items
*/
private function computeLayout(Collection $itemLayoutData)
{
Expand Down Expand Up @@ -150,7 +150,7 @@ private function computeLayout(Collection $itemLayoutData)
// Then add our bottom container padding
$this->layoutData->_containerHeight = $this->layoutData->_containerHeight + $this->layoutConfig->containerPadding->bottom;

return new Result($this->layoutData);
return new Geometry($this->layoutData);
}

/**
Expand All @@ -160,9 +160,9 @@ private function computeLayout(Collection $itemLayoutData)
* @param Collection<int,AspectRatio>|Collection<int,WidthHeight> $input Array of objects with widths and heights
* @param LayoutConfig $config Configuration
*
* @return Result A list of aspect ratios
* @return Geometry A list of aspect ratios
*/
public function compute(Collection $input, LayoutConfig $config = new LayoutConfig()): Result
public function compute(Collection $input, LayoutConfig $config = new LayoutConfig()): Geometry
{
$this->layoutConfig = $config;
$this->layoutData = new LayoutData();
Expand Down

0 comments on commit 4f69a79

Please sign in to comment.