for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Clubdeuce\Tessitura\Resources;
use Clubdeuce\Tessitura\Base\Base;
use DateTime;
use DateTimeZone;
use Exception;
use InvalidArgumentException;
/**
* @method string[] response()
*/
class ProductionSeason extends Base
{
* @var string[]
protected array $_response = [];
* @var Performance[]
protected array $_performances = [];
* @throws InvalidArgumentException
public function firstPerformanceDate(string $timezone = 'America/New_York'): DateTime|bool
try {
$timezone = new DateTimeZone($timezone);
} catch (Exception $e) {
throw new InvalidArgumentException($e->getMessage());
}
$date = isset($this->response()['FirstPerformanceDate']) ? $this->response()['FirstPerformanceDate'] : false;
if ($date) {
return DateTime::createFromFormat(' Y-m-d\TG:i:sp', $date, $timezone);
trigger_error($e->getMessage(), E_USER_ERROR);
return false;
public function lastPerformanceDate(string $timezone = 'America/New_York'): DateTime|bool
$date = isset($this->response()['LastPerformanceDate']) ? $this->response()['LastPerformanceDate'] : false;
* @return Performance[]
public function performances(): array
return $this->_performances;