Skip to content

Commit

Permalink
stan error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GytisZum committed May 27, 2024
1 parent 72fafc3 commit ad8fd43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
File renamed without changes.
9 changes: 5 additions & 4 deletions subscription/Provider/SubscriptionStartDateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use DateTimeZone;
use Mollie\Adapter\ConfigurationAdapter;
use Mollie\Subscription\Config\Config;
use Mollie\Subscription\DTO\Object\Interval;
use Mollie\Subscription\Exception\SubscriptionIntervalException;
use Mollie\Subscription\Utility\Clock;

Expand All @@ -33,18 +32,19 @@ class SubscriptionStartDateProvider
/** @var ConfigurationAdapter */
private $configuration;

public function __construct(ConfigurationAdapter $configuration, Clock $clock)
public function __construct(ConfigurationAdapter $configuration)
{
$this->configuration = $configuration;
$this->clock = $clock;
}

/**
* Returns subscription date time
*
* @return string
*
* @throws SubscriptionIntervalException
*/
public function getSubscriptionStartDate(Combination $combination): string
public function getSubscriptionStartDate(Combination $combination)
{
$currentTime = new DateTime('now', new DateTimeZone('UTC'));

Expand All @@ -68,6 +68,7 @@ public function getSubscriptionStartDate(Combination $combination): string

// Add the interval to the current time
$currentTime->add($interval);

return $currentTime->format('Y-m-d');
}

Expand Down

0 comments on commit ad8fd43

Please sign in to comment.