Commit 4fbb06ba by Евгений

Изменил название переменной

1 parent 981f5da8
...@@ -64,8 +64,8 @@ class AdExtensionsAdd extends Command ...@@ -64,8 +64,8 @@ class AdExtensionsAdd extends Command
]); ]);
} }
$factory = new AddAdExtensions(); $request = new AddAdExtensions();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalAdExtensions' => $goalAdExtensions, 'goalAdExtensions' => $goalAdExtensions,
]); ]);
......
...@@ -46,8 +46,8 @@ class AdExtensionsLoad extends Command ...@@ -46,8 +46,8 @@ class AdExtensionsLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetAdExtensions(); $request = new GetAdExtensions();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ModifiedSince' => $token->check_changes_ad_extension, 'ModifiedSince' => $token->check_changes_ad_extension,
]); ]);
......
...@@ -64,8 +64,8 @@ class AdGroupsAdd extends Command ...@@ -64,8 +64,8 @@ class AdGroupsAdd extends Command
]); ]);
} }
$factory = new AddAdGroups(); $request = new AddAdGroups();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalAdGroups' => $goalAdGroups, 'goalAdGroups' => $goalAdGroups,
]); ]);
......
...@@ -60,8 +60,8 @@ class AdGroupsLoadKeywords extends Command ...@@ -60,8 +60,8 @@ class AdGroupsLoadKeywords extends Command
->toArray(); ->toArray();
foreach (array_chunk($ad_group_ids, 1000) as $ids_limit) { foreach (array_chunk($ad_group_ids, 1000) as $ids_limit) {
$factory = new GetKeywords(); $request = new GetKeywords();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'AdGroupIds' => $ids_limit, 'AdGroupIds' => $ids_limit,
]); ]);
......
...@@ -59,15 +59,15 @@ class AdGroupsLoadUpdated extends Command ...@@ -59,15 +59,15 @@ class AdGroupsLoadUpdated extends Command
$ids = $adGroups->pluck('external_id')->toArray(); $ids = $adGroups->pluck('external_id')->toArray();
$factory = new GetAdGroups(); $request = new GetAdGroups();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'Ids' => $ids, 'Ids' => $ids,
]); ]);
foreach (array_chunk($ids, 1000) as $ids_limit) { foreach (array_chunk($ids, 1000) as $ids_limit) {
$factory = new GetKeywords(); $request = new GetKeywords();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'AdGroupIds' => $ids_limit, 'AdGroupIds' => $ids_limit,
]); ]);
......
...@@ -65,8 +65,8 @@ class AdGroupsUpdate extends Command ...@@ -65,8 +65,8 @@ class AdGroupsUpdate extends Command
]); ]);
} }
$factory = new UpdateAdGroups(); $request = new UpdateAdGroups();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalAdGroups' => $goalAdGroups, 'goalAdGroups' => $goalAdGroups,
]); ]);
......
...@@ -115,8 +115,8 @@ class AdvertisementsAdd extends Command ...@@ -115,8 +115,8 @@ class AdvertisementsAdd extends Command
]); ]);
} }
$factory = new AddAds(); $request = new AddAds();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalAds' => $goalAds, 'goalAds' => $goalAds,
]); ]);
......
...@@ -58,8 +58,8 @@ class AdvertisementsLoadUpdated extends Command ...@@ -58,8 +58,8 @@ class AdvertisementsLoadUpdated extends Command
$ids = $advertisements->pluck('external_id')->toArray(); $ids = $advertisements->pluck('external_id')->toArray();
$factory = new GetAds(); $request = new GetAds();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'Ids' => $ids, 'Ids' => $ids,
]); ]);
......
...@@ -109,8 +109,8 @@ class AdvertisementsUpdate extends Command ...@@ -109,8 +109,8 @@ class AdvertisementsUpdate extends Command
} }
$factory = new UpdateAds(); $request = new UpdateAds();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalAds' => $goalAds, 'goalAds' => $goalAds,
]); ]);
......
...@@ -87,8 +87,8 @@ class BidModifiersAdd extends Command ...@@ -87,8 +87,8 @@ class BidModifiersAdd extends Command
} }
$factory = new AddBidModifiers(); $request = new AddBidModifiers();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalBidModifiers' => $goalBidModifiers, 'goalBidModifiers' => $goalBidModifiers,
]); ]);
......
...@@ -55,8 +55,8 @@ class CampaignsAdd extends Command ...@@ -55,8 +55,8 @@ class CampaignsAdd extends Command
]); ]);
} }
$factory = new AddCampaigns(); $request = new AddCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'dictionaryCampaigns' => $token->dictionaryCampaignsEnabledForNotExternalForNotReserveCreate, 'dictionaryCampaigns' => $token->dictionaryCampaignsEnabledForNotExternalForNotReserveCreate,
]); ]);
......
...@@ -42,8 +42,8 @@ class CampaignsCheckChange extends Command ...@@ -42,8 +42,8 @@ class CampaignsCheckChange extends Command
$token_main = Tokens::where('type', Tokens::MAIN)->first(); $token_main = Tokens::where('type', Tokens::MAIN)->first();
if ($token_main) { if ($token_main) {
$factory = new CheckCampaignsChanges(); $request = new CheckCampaignsChanges();
$factory->setToken($token_main) $request->setToken($token_main)
->call(); ->call();
} }
...@@ -52,8 +52,8 @@ class CampaignsCheckChange extends Command ...@@ -52,8 +52,8 @@ class CampaignsCheckChange extends Command
->where('type', '!=', Tokens::MAIN)->get(); ->where('type', '!=', Tokens::MAIN)->get();
foreach ($tokens as $token) { foreach ($tokens as $token) {
$factory = new CheckCampaignsChanges(); $request = new CheckCampaignsChanges();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
} }
......
...@@ -49,8 +49,8 @@ class CampaignsCheckUpdatedChildren extends Command ...@@ -49,8 +49,8 @@ class CampaignsCheckUpdatedChildren extends Command
$campaign_ids_group = Campaigns::forUpdatedChildren()->pluck('external_id')->chunk(3000)->toArray(); $campaign_ids_group = Campaigns::forUpdatedChildren()->pluck('external_id')->chunk(3000)->toArray();
foreach ($campaign_ids_group as $campaign_ids) { foreach ($campaign_ids_group as $campaign_ids) {
$factory = new CheckChanges(); $request = new CheckChanges();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'CampaignIds' => $campaign_ids, 'CampaignIds' => $campaign_ids,
'FieldNames' => [ 'FieldNames' => [
...@@ -73,8 +73,8 @@ class CampaignsCheckUpdatedChildren extends Command ...@@ -73,8 +73,8 @@ class CampaignsCheckUpdatedChildren extends Command
->pluck('external_id')->chunk(3000)->toArray(); ->pluck('external_id')->chunk(3000)->toArray();
foreach ($campaign_ids_group as $campaign_ids) { foreach ($campaign_ids_group as $campaign_ids) {
$factory = new CheckChanges(); $request = new CheckChanges();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'CampaignIds' => $campaign_ids, 'CampaignIds' => $campaign_ids,
'FieldNames' => [ 'FieldNames' => [
......
...@@ -45,8 +45,8 @@ class CampaignsFirstLoad extends Command ...@@ -45,8 +45,8 @@ class CampaignsFirstLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetCampaigns(); $request = new GetCampaigns();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
Artisan::call(DictionariesLoad::class); Artisan::call(DictionariesLoad::class);
......
...@@ -53,8 +53,8 @@ class CampaignsLoadAds extends Command ...@@ -53,8 +53,8 @@ class CampaignsLoadAds extends Command
} }
foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) { foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) {
$factory = new GetAds(); $request = new GetAds();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'CampaignIds' => $campaign_ids, 'CampaignIds' => $campaign_ids,
]); ]);
......
...@@ -53,8 +53,8 @@ class CampaignsLoadBidModifiers extends Command ...@@ -53,8 +53,8 @@ class CampaignsLoadBidModifiers extends Command
} }
foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) { foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) {
$factory = new GetBidModifiers(); $request = new GetBidModifiers();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'CampaignIds' => $campaign_ids, 'CampaignIds' => $campaign_ids,
]); ]);
......
...@@ -53,8 +53,8 @@ class CampaignsLoadGroups extends Command ...@@ -53,8 +53,8 @@ class CampaignsLoadGroups extends Command
} }
foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) { foreach ($campaigns->pluck('external_id')->chunk(10)->toArray() as $campaign_ids) {
$factory = new GetAdGroups(); $request = new GetAdGroups();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'CampaignIds' => $campaign_ids, 'CampaignIds' => $campaign_ids,
]); ]);
......
...@@ -49,8 +49,8 @@ class CampaignsLoadUpdated extends Command ...@@ -49,8 +49,8 @@ class CampaignsLoadUpdated extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetCampaigns(); $request = new GetCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ids' => $campaigns->pluck('external_id')->toArray(), 'ids' => $campaigns->pluck('external_id')->toArray(),
]); ]);
...@@ -63,8 +63,8 @@ class CampaignsLoadUpdated extends Command ...@@ -63,8 +63,8 @@ class CampaignsLoadUpdated extends Command
->get(); ->get();
foreach ($tokens as $token) { foreach ($tokens as $token) {
$factory = new GetCampaigns(); $request = new GetCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ids' => $token->dictionaryCampaignsEnabledForExternalSynchronizedUpdatedSelf 'ids' => $token->dictionaryCampaignsEnabledForExternalSynchronizedUpdatedSelf
->pluck('external_id')->toArray(), ->pluck('external_id')->toArray(),
......
...@@ -70,8 +70,8 @@ class CampaignsResume extends Command ...@@ -70,8 +70,8 @@ class CampaignsResume extends Command
]); ]);
} }
$factory = new ResumeCampaigns(); $request = new ResumeCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ids' => $token->dictionaryCampaignsEnabledForExternalDisabledForNotReserveResume->pluck('external_id')->toArray(), 'ids' => $token->dictionaryCampaignsEnabledForExternalDisabledForNotReserveResume->pluck('external_id')->toArray(),
]); ]);
......
...@@ -68,8 +68,8 @@ class CampaignsSuspend extends Command ...@@ -68,8 +68,8 @@ class CampaignsSuspend extends Command
]); ]);
} }
$factory = new SuspendCampaigns(); $request = new SuspendCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ids' => $token->dictionaryCampaignsNotEnabledForExternalNotDisabledForNotReserveSuspend->pluck('external_id')->toArray(), 'ids' => $token->dictionaryCampaignsNotEnabledForExternalNotDisabledForNotReserveSuspend->pluck('external_id')->toArray(),
]); ]);
......
...@@ -54,8 +54,8 @@ class CampaignsUpdate extends Command ...@@ -54,8 +54,8 @@ class CampaignsUpdate extends Command
]); ]);
} }
$factory = new UpdateCampaigns(); $request = new UpdateCampaigns();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'dictionaryCampaigns' => $token->dictionaryCampaignsEnabledForExternalUpdatedNeedUpdatedForNotReserveUpdate, 'dictionaryCampaigns' => $token->dictionaryCampaignsEnabledForExternalUpdatedNeedUpdatedForNotReserveUpdate,
]); ]);
......
...@@ -45,8 +45,8 @@ class DictionariesLoad extends Command ...@@ -45,8 +45,8 @@ class DictionariesLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetDictionaries(); $request = new GetDictionaries();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
return 0; return 0;
......
...@@ -82,8 +82,8 @@ class KeywordsAdd extends Command ...@@ -82,8 +82,8 @@ class KeywordsAdd extends Command
]); ]);
} }
$factory = new AddKeywords(); $request = new AddKeywords();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalKeywords' => $goalKeywords, 'goalKeywords' => $goalKeywords,
]); ]);
......
...@@ -57,8 +57,8 @@ class KeywordsDelete extends Command ...@@ -57,8 +57,8 @@ class KeywordsDelete extends Command
continue; continue;
} }
$factory = new DeleteKeywords(); $request = new DeleteKeywords();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'ids' => $ids 'ids' => $ids
]); ]);
......
...@@ -66,8 +66,8 @@ class KeywordsUpdate extends Command ...@@ -66,8 +66,8 @@ class KeywordsUpdate extends Command
]); ]);
} }
$factory = new UpdateKeywords(); $request = new UpdateKeywords();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalKeywords' => $goalKeywords, 'goalKeywords' => $goalKeywords,
]); ]);
......
...@@ -64,8 +64,8 @@ class NegativeKeywordSharedSetsAdd extends Command ...@@ -64,8 +64,8 @@ class NegativeKeywordSharedSetsAdd extends Command
]); ]);
} }
$factory = new AddNegativeKeywordSharedSets(); $request = new AddNegativeKeywordSharedSets();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalNegativeKeywordSharedSets' => $goalNegativeKeywordSharedSets, 'goalNegativeKeywordSharedSets' => $goalNegativeKeywordSharedSets,
]); ]);
......
...@@ -46,8 +46,8 @@ class NegativeKeywordSharedSetsLoad extends Command ...@@ -46,8 +46,8 @@ class NegativeKeywordSharedSetsLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetNegativeKeywordSharedSets(); $request = new GetNegativeKeywordSharedSets();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
return 0; return 0;
......
...@@ -64,8 +64,8 @@ class SitelinksAdd extends Command ...@@ -64,8 +64,8 @@ class SitelinksAdd extends Command
]); ]);
} }
$factory = new AddSitelinks(); $request = new AddSitelinks();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalSitelinks' => $goalSitelinks, 'goalSitelinks' => $goalSitelinks,
]); ]);
......
...@@ -46,8 +46,8 @@ class SitelinksLoad extends Command ...@@ -46,8 +46,8 @@ class SitelinksLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetSitelinks(); $request = new GetSitelinks();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
return 0; return 0;
......
...@@ -65,8 +65,8 @@ class VCardsAdd extends Command ...@@ -65,8 +65,8 @@ class VCardsAdd extends Command
]); ]);
} }
$factory = new AddVCards(); $request = new AddVCards();
$factory->setToken($token) $request->setToken($token)
->call([ ->call([
'goalVCards' => $goalVCards, 'goalVCards' => $goalVCards,
]); ]);
......
...@@ -46,8 +46,8 @@ class VCardsLoad extends Command ...@@ -46,8 +46,8 @@ class VCardsLoad extends Command
throw new \Exception('Не найден токен блин'); throw new \Exception('Не найден токен блин');
} }
$factory = new GetVCards(); $request = new GetVCards();
$factory->setToken($token) $request->setToken($token)
->call(); ->call();
return 0; return 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!