Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PhotoboothProject/photobooth
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5a128647b22fde026f27f5c2b313ef134717c414
Choose a base ref
..
head repository: PhotoboothProject/photobooth
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bb8d3006298a893c67a208dd7ba28cf2f5001f83
Choose a head ref
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/Factory/CollageConfigFactory.php
5 changes: 4 additions & 1 deletion src/Factory/CollageConfigFactory.php
Original file line number Diff line number Diff line change
@@ -3,14 +3,17 @@
namespace Photobooth\Factory;

use Photobooth\Dto\CollageConfig;
use Photobooth\Enum\CollageLayoutEnum;
use Photobooth\Utility\PathUtility;

class CollageConfigFactory
{
public static function fromConfig(array $config): CollageConfig
{
$collageConfig = new CollageConfig();
$collageConfig->collageLayout = $config['collage']['layout'];
$collageConfig->collageLayout = $config['collage']['layout'] instanceof CollageLayoutEnum
? $config['collage']['layout']->value
: (string) $config['collage']['layout'];
$collageConfig->collageResolution = (int) substr($config['collage']['resolution'], 0, -3);
$collageConfig->collageBackgroundColor = $config['collage']['background_color'];
$collageConfig->collageFrame = $config['collage']['frame'];