CompositeEye.php 758 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types = 1);
  3. namespace BaconQrCode\Renderer\Eye;
  4. use BaconQrCode\Renderer\Path\Path;
  5. /**
  6. * Combines the style of two different eyes.
  7. */
  8. final class CompositeEye implements EyeInterface
  9. {
  10. /**
  11. * @var EyeInterface
  12. */
  13. private $externalEye;
  14. /**
  15. * @var EyeInterface
  16. */
  17. private $internalEye;
  18. public function __construct(EyeInterface $externalEye, EyeInterface $internalEye)
  19. {
  20. $this->externalEye = $externalEye;
  21. $this->internalEye = $internalEye;
  22. }
  23. public function getExternalPath() : Path
  24. {
  25. return $this->externalEye->getExternalPath();
  26. }
  27. public function getInternalPath() : Path
  28. {
  29. return $this->externalEye->getInternalPath();
  30. }
  31. }