Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/ShoppingAds/AddShoppingProductListingGroupTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ private static function removeListingGroupTree(
private static function createListingGroupSubdivision(
int $customerId,
int $adGroupId,
string $parentAdGroupCriterionResourceName = null,
ListingDimensionInfo $listingDimensionInfo = null
?string $parentAdGroupCriterionResourceName = null,
?ListingDimensionInfo $listingDimensionInfo = null
) {
static $tempId = 0;
$listingGroupInfo = new ListingGroupInfo([
Expand Down
4 changes: 2 additions & 2 deletions examples/Travel/AddHotelListingGroupTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ private static function addLevel2Nodes(
*/
private static function createListingGroupInfo(
int $listingGroupType,
string $parentCriterionResourceName = null,
ListingDimensionInfo $caseValue = null
?string $parentCriterionResourceName = null,
?ListingDimensionInfo $caseValue = null
) {
$listingGroupInfo = new ListingGroupInfo([
'type' => $listingGroupType
Expand Down
6 changes: 3 additions & 3 deletions src/Google/Ads/GoogleAds/Lib/AbstractGoogleAdsBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ abstract class AbstractGoogleAdsBuilder implements GoogleAdsBuilder
private $environmentalVariables;

public function __construct(
ConfigurationLoader $configurationLoader = null,
EnvironmentalVariables $environmentalVariables = null
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null
) {
$this->configurationLoader = $configurationLoader ?? new ConfigurationLoader();
$this->environmentalVariables = $environmentalVariables ?? new EnvironmentalVariables();
Expand All @@ -47,7 +47,7 @@ public function __construct(
* @return self this builder populated from the configuration
* @throws InvalidArgumentException if the configuration file could not be found
*/
public function fromFile(string $path = null): GoogleAdsBuilder
public function fromFile(?string $path = null): GoogleAdsBuilder
{
if ($path === null) {
$path = $this->environmentalVariables->get(
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/ConfigurationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class ConfigurationLoader
* @param EnvironmentalVariables $environmentalVariables
*/
public function __construct(
EnvironmentalVariables $environmentalVariables = null
?EnvironmentalVariables $environmentalVariables = null
) {
$this->environmentalVariables = $environmentalVariables ?? new EnvironmentalVariables();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class InsecureCredentialsWrapper extends CredentialsWrapper
*/
public function __construct(
FetchAuthTokenInterface $credentialsFetcher,
callable $authHttpHandler = null
?callable $authHttpHandler = null
) {
parent::__construct($credentialsFetcher, $authHttpHandler);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/OAuth2TokenBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class OAuth2TokenBuilder extends AbstractGoogleAdsBuilder
private $adcFetcher;

public function __construct(
ConfigurationLoader $configurationLoader = null,
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null,
) {
parent::__construct($configurationLoader, $environmentalVariables);
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V20/GoogleAdsCallLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(
LoggerInterface $logger,
$filterLevel,
$endpoint,
LogMessageFormatter $logMessageFormatter = null,
?LogMessageFormatter $logMessageFormatter = null,
$context = []
) {
$this->logger = $logger;
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V20/GoogleAdsClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ final class GoogleAdsClientBuilder extends AbstractGoogleAdsBuilder
private $adsAssistant;

public function __construct(
ConfigurationLoader $configurationLoader = null,
EnvironmentalVariables $environmentalVariables = null
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null
) {
parent::__construct($configurationLoader, $environmentalVariables);
$this->loggerFactory = new LoggerFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V20/InfoRedactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct()
*/
public function redactHeaders(
array $headers,
array $headerKeysToRedactedValues = null
?array $headerKeysToRedactedValues = null
) {
$headerKeysToRedactedValues =
$headerKeysToRedactedValues ?: self::getDefaultHeaderKeysToRedactedValues();
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V20/LogMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ final class LogMessageFormatter
private $infoRedactor;

public function __construct(
StatusMetadataExtractor $statusMetadataExtractor = null,
InfoRedactor $infoRedactor = null
?StatusMetadataExtractor $statusMetadataExtractor = null,
?InfoRedactor $infoRedactor = null
) {
$this->statusMetadataExtractor = $statusMetadataExtractor ?? new StatusMetadataExtractor();
$this->infoRedactor = $infoRedactor ?? new InfoRedactor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class ServerStreamingGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbs
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class UnaryGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbstract
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class UnaryGoogleAdsResponseMetadataCallable extends GoogleAdsMiddlewareAbstract

private $adsClient;

public function __construct(callable $nextHandler = null, $adsClient = null)
public function __construct(?callable $nextHandler = null, $adsClient = null)
{
$this->adsClient = $adsClient;
parent::__construct($nextHandler);
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V21/GoogleAdsCallLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(
LoggerInterface $logger,
$filterLevel,
$endpoint,
LogMessageFormatter $logMessageFormatter = null,
?LogMessageFormatter $logMessageFormatter = null,
$context = []
) {
$this->logger = $logger;
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V21/GoogleAdsClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ final class GoogleAdsClientBuilder extends AbstractGoogleAdsBuilder
private $adsAssistant;

public function __construct(
ConfigurationLoader $configurationLoader = null,
EnvironmentalVariables $environmentalVariables = null
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null
) {
parent::__construct($configurationLoader, $environmentalVariables);
$this->loggerFactory = new LoggerFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V21/InfoRedactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct()
*/
public function redactHeaders(
array $headers,
array $headerKeysToRedactedValues = null
?array $headerKeysToRedactedValues = null
) {
$headerKeysToRedactedValues =
$headerKeysToRedactedValues ?: self::getDefaultHeaderKeysToRedactedValues();
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V21/LogMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ final class LogMessageFormatter
private $infoRedactor;

public function __construct(
StatusMetadataExtractor $statusMetadataExtractor = null,
InfoRedactor $infoRedactor = null
?StatusMetadataExtractor $statusMetadataExtractor = null,
?InfoRedactor $infoRedactor = null
) {
$this->statusMetadataExtractor = $statusMetadataExtractor ?? new StatusMetadataExtractor();
$this->infoRedactor = $infoRedactor ?? new InfoRedactor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class ServerStreamingGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbs
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class UnaryGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbstract
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class UnaryGoogleAdsResponseMetadataCallable extends GoogleAdsMiddlewareAbstract

private $adsClient;

public function __construct(callable $nextHandler = null, $adsClient = null)
public function __construct(?callable $nextHandler = null, $adsClient = null)
{
$this->adsClient = $adsClient;
parent::__construct($nextHandler);
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V22/GoogleAdsCallLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(
LoggerInterface $logger,
$filterLevel,
$endpoint,
LogMessageFormatter $logMessageFormatter = null,
?LogMessageFormatter $logMessageFormatter = null,
$context = []
) {
$this->logger = $logger;
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V22/GoogleAdsClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ final class GoogleAdsClientBuilder extends AbstractGoogleAdsBuilder
private $adsAssistant;

public function __construct(
ConfigurationLoader $configurationLoader = null,
EnvironmentalVariables $environmentalVariables = null
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null
) {
parent::__construct($configurationLoader, $environmentalVariables);
$this->loggerFactory = new LoggerFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V22/InfoRedactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct()
*/
public function redactHeaders(
array $headers,
array $headerKeysToRedactedValues = null
?array $headerKeysToRedactedValues = null
) {
$headerKeysToRedactedValues =
$headerKeysToRedactedValues ?: self::getDefaultHeaderKeysToRedactedValues();
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V22/LogMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ final class LogMessageFormatter
private $infoRedactor;

public function __construct(
StatusMetadataExtractor $statusMetadataExtractor = null,
InfoRedactor $infoRedactor = null
?StatusMetadataExtractor $statusMetadataExtractor = null,
?InfoRedactor $infoRedactor = null
) {
$this->statusMetadataExtractor = $statusMetadataExtractor ?? new StatusMetadataExtractor();
$this->infoRedactor = $infoRedactor ?? new InfoRedactor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class ServerStreamingGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbs
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V23/GoogleAdsCallLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(
LoggerInterface $logger,
$filterLevel,
$endpoint,
LogMessageFormatter $logMessageFormatter = null,
?LogMessageFormatter $logMessageFormatter = null,
$context = []
) {
$this->logger = $logger;
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V23/GoogleAdsClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ final class GoogleAdsClientBuilder extends AbstractGoogleAdsBuilder
private $adsAssistant;

public function __construct(
ConfigurationLoader $configurationLoader = null,
EnvironmentalVariables $environmentalVariables = null
?ConfigurationLoader $configurationLoader = null,
?EnvironmentalVariables $environmentalVariables = null
) {
parent::__construct($configurationLoader, $environmentalVariables);
$this->loggerFactory = new LoggerFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Lib/V23/InfoRedactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function __construct()
*/
public function redactHeaders(
array $headers,
array $headerKeysToRedactedValues = null
?array $headerKeysToRedactedValues = null
) {
$headerKeysToRedactedValues =
$headerKeysToRedactedValues ?: self::getDefaultHeaderKeysToRedactedValues();
Expand Down
4 changes: 2 additions & 2 deletions src/Google/Ads/GoogleAds/Lib/V23/LogMessageFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ final class LogMessageFormatter
private $infoRedactor;

public function __construct(
StatusMetadataExtractor $statusMetadataExtractor = null,
InfoRedactor $infoRedactor = null
?StatusMetadataExtractor $statusMetadataExtractor = null,
?InfoRedactor $infoRedactor = null
) {
$this->statusMetadataExtractor = $statusMetadataExtractor ?? new StatusMetadataExtractor();
$this->infoRedactor = $infoRedactor ?? new InfoRedactor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class ServerStreamingGoogleAdsExceptionMiddleware extends GoogleAdsMiddlewareAbs
* @param StatusMetadataExtractor|null $statusMetadataExtractor
*/
public function __construct(
callable $nextHandler = null,
StatusMetadataExtractor $statusMetadataExtractor = null
?callable $nextHandler = null,
?StatusMetadataExtractor $statusMetadataExtractor = null
) {
parent::__construct($nextHandler);
$this->statusMetadataExtractor = $statusMetadataExtractor ?: new StatusMetadataExtractor();
Expand Down
2 changes: 1 addition & 1 deletion src/Google/Ads/GoogleAds/Util/ApiVersionSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ApiVersionSupport
* @param string|null $rootPath the root path of the library, the one that contains this class
* file is used by default
*/
public function __construct(string $rootPath = null)
public function __construct(?string $rootPath = null)
{
$this->rootPath = $rootPath ?: dirname(__DIR__, 5);
}
Expand Down