public function buildConfiguration() { $config = Configuration::fromEnvironmentVariable(CloudinaryEnvironmentVariable::fromString($this->getEnvironmentVariable())); if ($this->getCdnSubdomainFlag()) { $config->enableCdnSubdomain(); } $config->getDefaultTransformation()->withGravity(Gravity::fromString($this->getDefaultGravity()))->withFetchFormat(FetchFormat::fromString($this->getFetchFormat()))->withQuality(Quality::fromString($this->getImageQuality()))->withDpr(Dpr::fromString($this->getImageDpr())); return $config; }
function it_overrides_quality_if_provided() { $transformationArray = self::builder()->withQuality(Quality::fromString('100'))->build(); $transformationArray->offsetGet('quality')->shouldBe('100'); }