diff --git a/src/ReactPHPVK/Actions/Sections/Account.php b/src/ReactPHPVK/Actions/Sections/Account.php index 2e11725..a7a5443 100644 --- a/src/ReactPHPVK/Actions/Sections/Account.php +++ b/src/ReactPHPVK/Actions/Sections/Account.php @@ -28,26 +28,6 @@ class Account { private Provider $_provider; - private ?Account\Ban $ban = null; - private ?Account\ChangePassword $changePassword = null; - private ?Account\GetActiveOffers $getActiveOffers = null; - private ?Account\GetAppPermissions $getAppPermissions = null; - private ?Account\GetBanned $getBanned = null; - private ?Account\GetCounters $getCounters = null; - private ?Account\GetInfo $getInfo = null; - private ?Account\GetProfileInfo $getProfileInfo = null; - private ?Account\GetPushSettings $getPushSettings = null; - private ?Account\RegisterDevice $registerDevice = null; - private ?Account\SaveProfileInfo $saveProfileInfo = null; - private ?Account\SetInfo $setInfo = null; - private ?Account\SetNameInMenu $setNameInMenu = null; - private ?Account\SetOffline $setOffline = null; - private ?Account\SetOnline $setOnline = null; - private ?Account\SetPushSettings $setPushSettings = null; - private ?Account\SetSilenceMode $setSilenceMode = null; - private ?Account\Unban $unban = null; - private ?Account\UnregisterDevice $unregisterDevice = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -58,10 +38,7 @@ public function __construct(Provider $provider) */ public function ban(): Ban { - if (!$this->ban) { - $this->ban = new Ban($this->_provider); - } - return $this->ban; + return new Ban($this->_provider); } /** @@ -69,10 +46,7 @@ public function ban(): Ban */ public function changePassword(): ChangePassword { - if (!$this->changePassword) { - $this->changePassword = new ChangePassword($this->_provider); - } - return $this->changePassword; + return new ChangePassword($this->_provider); } /** @@ -80,10 +54,7 @@ public function changePassword(): ChangePassword */ public function getActiveOffers(): GetActiveOffers { - if (!$this->getActiveOffers) { - $this->getActiveOffers = new GetActiveOffers($this->_provider); - } - return $this->getActiveOffers; + return new GetActiveOffers($this->_provider); } /** @@ -91,10 +62,7 @@ public function getActiveOffers(): GetActiveOffers */ public function getAppPermissions(): GetAppPermissions { - if (!$this->getAppPermissions) { - $this->getAppPermissions = new GetAppPermissions($this->_provider); - } - return $this->getAppPermissions; + return new GetAppPermissions($this->_provider); } /** @@ -102,10 +70,7 @@ public function getAppPermissions(): GetAppPermissions */ public function getBanned(): GetBanned { - if (!$this->getBanned) { - $this->getBanned = new GetBanned($this->_provider); - } - return $this->getBanned; + return new GetBanned($this->_provider); } /** @@ -113,10 +78,7 @@ public function getBanned(): GetBanned */ public function getCounters(): GetCounters { - if (!$this->getCounters) { - $this->getCounters = new GetCounters($this->_provider); - } - return $this->getCounters; + return new GetCounters($this->_provider); } /** @@ -124,10 +86,7 @@ public function getCounters(): GetCounters */ public function getInfo(): GetInfo { - if (!$this->getInfo) { - $this->getInfo = new GetInfo($this->_provider); - } - return $this->getInfo; + return new GetInfo($this->_provider); } /** @@ -135,10 +94,7 @@ public function getInfo(): GetInfo */ public function getProfileInfo(): GetProfileInfo { - if (!$this->getProfileInfo) { - $this->getProfileInfo = new GetProfileInfo($this->_provider); - } - return $this->getProfileInfo; + return new GetProfileInfo($this->_provider); } /** @@ -146,10 +102,7 @@ public function getProfileInfo(): GetProfileInfo */ public function getPushSettings(): GetPushSettings { - if (!$this->getPushSettings) { - $this->getPushSettings = new GetPushSettings($this->_provider); - } - return $this->getPushSettings; + return new GetPushSettings($this->_provider); } /** @@ -157,10 +110,7 @@ public function getPushSettings(): GetPushSettings */ public function registerDevice(): RegisterDevice { - if (!$this->registerDevice) { - $this->registerDevice = new RegisterDevice($this->_provider); - } - return $this->registerDevice; + return new RegisterDevice($this->_provider); } /** @@ -168,10 +118,7 @@ public function registerDevice(): RegisterDevice */ public function saveProfileInfo(): SaveProfileInfo { - if (!$this->saveProfileInfo) { - $this->saveProfileInfo = new SaveProfileInfo($this->_provider); - } - return $this->saveProfileInfo; + return new SaveProfileInfo($this->_provider); } /** @@ -179,10 +126,7 @@ public function saveProfileInfo(): SaveProfileInfo */ public function setInfo(): SetInfo { - if (!$this->setInfo) { - $this->setInfo = new SetInfo($this->_provider); - } - return $this->setInfo; + return new SetInfo($this->_provider); } /** @@ -190,10 +134,7 @@ public function setInfo(): SetInfo */ public function setNameInMenu(): SetNameInMenu { - if (!$this->setNameInMenu) { - $this->setNameInMenu = new SetNameInMenu($this->_provider); - } - return $this->setNameInMenu; + return new SetNameInMenu($this->_provider); } /** @@ -201,10 +142,7 @@ public function setNameInMenu(): SetNameInMenu */ public function setOffline(): SetOffline { - if (!$this->setOffline) { - $this->setOffline = new SetOffline($this->_provider); - } - return $this->setOffline; + return new SetOffline($this->_provider); } /** @@ -212,10 +150,7 @@ public function setOffline(): SetOffline */ public function setOnline(): SetOnline { - if (!$this->setOnline) { - $this->setOnline = new SetOnline($this->_provider); - } - return $this->setOnline; + return new SetOnline($this->_provider); } /** @@ -223,10 +158,7 @@ public function setOnline(): SetOnline */ public function setPushSettings(): SetPushSettings { - if (!$this->setPushSettings) { - $this->setPushSettings = new SetPushSettings($this->_provider); - } - return $this->setPushSettings; + return new SetPushSettings($this->_provider); } /** @@ -234,10 +166,7 @@ public function setPushSettings(): SetPushSettings */ public function setSilenceMode(): SetSilenceMode { - if (!$this->setSilenceMode) { - $this->setSilenceMode = new SetSilenceMode($this->_provider); - } - return $this->setSilenceMode; + return new SetSilenceMode($this->_provider); } /** @@ -245,10 +174,7 @@ public function setSilenceMode(): SetSilenceMode */ public function unban(): Unban { - if (!$this->unban) { - $this->unban = new Unban($this->_provider); - } - return $this->unban; + return new Unban($this->_provider); } /** @@ -256,10 +182,7 @@ public function unban(): Unban */ public function unregisterDevice(): UnregisterDevice { - if (!$this->unregisterDevice) { - $this->unregisterDevice = new UnregisterDevice($this->_provider); - } - return $this->unregisterDevice; + return new UnregisterDevice($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Account/Ban.php b/src/ReactPHPVK/Actions/Sections/Account/Ban.php index e5060f2..85928e0 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/Ban.php +++ b/src/ReactPHPVK/Actions/Sections/Account/Ban.php @@ -46,7 +46,7 @@ public function setOwnerId(int $value): Ban * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/ChangePassword.php b/src/ReactPHPVK/Actions/Sections/Account/ChangePassword.php index 8104a33..eeafda9 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/ChangePassword.php +++ b/src/ReactPHPVK/Actions/Sections/Account/ChangePassword.php @@ -87,7 +87,7 @@ public function setNewPassword(string $value): ChangePassword * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetActiveOffers.php b/src/ReactPHPVK/Actions/Sections/Account/GetActiveOffers.php index 973048f..c60235e 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetActiveOffers.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetActiveOffers.php @@ -59,7 +59,7 @@ public function setCount(int $value): GetActiveOffers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetAppPermissions.php b/src/ReactPHPVK/Actions/Sections/Account/GetAppPermissions.php index a9cdcb9..7d2dcd7 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetAppPermissions.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetAppPermissions.php @@ -48,7 +48,7 @@ public function setUserId(int $value): GetAppPermissions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetBanned.php b/src/ReactPHPVK/Actions/Sections/Account/GetBanned.php index b9cdc85..6f48a14 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetBanned.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetBanned.php @@ -61,7 +61,7 @@ public function setCount(int $value): GetBanned * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetCounters.php b/src/ReactPHPVK/Actions/Sections/Account/GetCounters.php index 6e7cd79..9f360fc 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetCounters.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetCounters.php @@ -48,7 +48,7 @@ public function setFilter(array $value): GetCounters * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetInfo.php b/src/ReactPHPVK/Actions/Sections/Account/GetInfo.php index 6ed6bfd..096b837 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetInfo.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetInfo.php @@ -48,7 +48,7 @@ public function setFields(array $value): GetInfo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetProfileInfo.php b/src/ReactPHPVK/Actions/Sections/Account/GetProfileInfo.php index 91e2df3..1703fdc 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetProfileInfo.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetProfileInfo.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetProfileInfo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/GetPushSettings.php b/src/ReactPHPVK/Actions/Sections/Account/GetPushSettings.php index 72d3f3b..4325326 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/GetPushSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Account/GetPushSettings.php @@ -48,7 +48,7 @@ public function setDeviceId(string $value): GetPushSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/RegisterDevice.php b/src/ReactPHPVK/Actions/Sections/Account/RegisterDevice.php index fd5421f..e1ac7cd 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/RegisterDevice.php +++ b/src/ReactPHPVK/Actions/Sections/Account/RegisterDevice.php @@ -124,7 +124,7 @@ public function setSandbox(bool $value): RegisterDevice * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SaveProfileInfo.php b/src/ReactPHPVK/Actions/Sections/Account/SaveProfileInfo.php index 70ab47b..fd9a77c 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SaveProfileInfo.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SaveProfileInfo.php @@ -217,7 +217,7 @@ public function setStatus(string $value): SaveProfileInfo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetInfo.php b/src/ReactPHPVK/Actions/Sections/Account/SetInfo.php index dedabff..2ec243c 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetInfo.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetInfo.php @@ -61,7 +61,7 @@ public function setValue(string $value): SetInfo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetNameInMenu.php b/src/ReactPHPVK/Actions/Sections/Account/SetNameInMenu.php index 3de2465..4dd837f 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetNameInMenu.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetNameInMenu.php @@ -61,7 +61,7 @@ public function setName(string $value): SetNameInMenu * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetOffline.php b/src/ReactPHPVK/Actions/Sections/Account/SetOffline.php index dd8ce03..aee9c77 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetOffline.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetOffline.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): SetOffline * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetOnline.php b/src/ReactPHPVK/Actions/Sections/Account/SetOnline.php index 89247a5..434c0e0 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetOnline.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetOnline.php @@ -48,7 +48,7 @@ public function setVoip(bool $value): SetOnline * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetPushSettings.php b/src/ReactPHPVK/Actions/Sections/Account/SetPushSettings.php index 57ac826..4c35f48 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetPushSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetPushSettings.php @@ -87,7 +87,7 @@ public function setValue(array $value): SetPushSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/SetSilenceMode.php b/src/ReactPHPVK/Actions/Sections/Account/SetSilenceMode.php index 82c730b..4c1eff3 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/SetSilenceMode.php +++ b/src/ReactPHPVK/Actions/Sections/Account/SetSilenceMode.php @@ -87,7 +87,7 @@ public function setSound(int $value): SetSilenceMode * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/Unban.php b/src/ReactPHPVK/Actions/Sections/Account/Unban.php index 492b06d..e28a954 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/Unban.php +++ b/src/ReactPHPVK/Actions/Sections/Account/Unban.php @@ -46,7 +46,7 @@ public function setOwnerId(int $value): Unban * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Account/UnregisterDevice.php b/src/ReactPHPVK/Actions/Sections/Account/UnregisterDevice.php index 3c8a019..b181523 100644 --- a/src/ReactPHPVK/Actions/Sections/Account/UnregisterDevice.php +++ b/src/ReactPHPVK/Actions/Sections/Account/UnregisterDevice.php @@ -59,7 +59,7 @@ public function setSandbox(bool $value): UnregisterDevice * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads.php b/src/ReactPHPVK/Actions/Sections/Ads.php index 438591b..dba377a 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads.php +++ b/src/ReactPHPVK/Actions/Sections/Ads.php @@ -46,44 +46,6 @@ class Ads { private Provider $_provider; - private ?Ads\AddOfficeUsers $addOfficeUsers = null; - private ?Ads\CheckLink $checkLink = null; - private ?Ads\CreateAds $createAds = null; - private ?Ads\CreateCampaigns $createCampaigns = null; - private ?Ads\CreateClients $createClients = null; - private ?Ads\CreateTargetGroup $createTargetGroup = null; - private ?Ads\DeleteAds $deleteAds = null; - private ?Ads\DeleteCampaigns $deleteCampaigns = null; - private ?Ads\DeleteClients $deleteClients = null; - private ?Ads\DeleteTargetGroup $deleteTargetGroup = null; - private ?Ads\GetAccounts $getAccounts = null; - private ?Ads\GetAds $getAds = null; - private ?Ads\GetAdsLayout $getAdsLayout = null; - private ?Ads\GetAdsTargeting $getAdsTargeting = null; - private ?Ads\GetBudget $getBudget = null; - private ?Ads\GetCampaigns $getCampaigns = null; - private ?Ads\GetCategories $getCategories = null; - private ?Ads\GetClients $getClients = null; - private ?Ads\GetDemographics $getDemographics = null; - private ?Ads\GetFloodStats $getFloodStats = null; - private ?Ads\GetLookalikeRequests $getLookalikeRequests = null; - private ?Ads\GetMusicians $getMusicians = null; - private ?Ads\GetOfficeUsers $getOfficeUsers = null; - private ?Ads\GetPostsReach $getPostsReach = null; - private ?Ads\GetRejectionReason $getRejectionReason = null; - private ?Ads\GetStatistics $getStatistics = null; - private ?Ads\GetSuggestions $getSuggestions = null; - private ?Ads\GetTargetGroups $getTargetGroups = null; - private ?Ads\GetTargetingStats $getTargetingStats = null; - private ?Ads\GetUploadURL $getUploadURL = null; - private ?Ads\GetVideoUploadURL $getVideoUploadURL = null; - private ?Ads\ImportTargetContacts $importTargetContacts = null; - private ?Ads\RemoveOfficeUsers $removeOfficeUsers = null; - private ?Ads\UpdateAds $updateAds = null; - private ?Ads\UpdateCampaigns $updateCampaigns = null; - private ?Ads\UpdateClients $updateClients = null; - private ?Ads\UpdateTargetGroup $updateTargetGroup = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -94,10 +56,7 @@ public function __construct(Provider $provider) */ public function addOfficeUsers(): AddOfficeUsers { - if (!$this->addOfficeUsers) { - $this->addOfficeUsers = new AddOfficeUsers($this->_provider); - } - return $this->addOfficeUsers; + return new AddOfficeUsers($this->_provider); } /** @@ -105,10 +64,7 @@ public function addOfficeUsers(): AddOfficeUsers */ public function checkLink(): CheckLink { - if (!$this->checkLink) { - $this->checkLink = new CheckLink($this->_provider); - } - return $this->checkLink; + return new CheckLink($this->_provider); } /** @@ -116,10 +72,7 @@ public function checkLink(): CheckLink */ public function createAds(): CreateAds { - if (!$this->createAds) { - $this->createAds = new CreateAds($this->_provider); - } - return $this->createAds; + return new CreateAds($this->_provider); } /** @@ -127,10 +80,7 @@ public function createAds(): CreateAds */ public function createCampaigns(): CreateCampaigns { - if (!$this->createCampaigns) { - $this->createCampaigns = new CreateCampaigns($this->_provider); - } - return $this->createCampaigns; + return new CreateCampaigns($this->_provider); } /** @@ -138,10 +88,7 @@ public function createCampaigns(): CreateCampaigns */ public function createClients(): CreateClients { - if (!$this->createClients) { - $this->createClients = new CreateClients($this->_provider); - } - return $this->createClients; + return new CreateClients($this->_provider); } /** @@ -149,10 +96,7 @@ public function createClients(): CreateClients */ public function createTargetGroup(): CreateTargetGroup { - if (!$this->createTargetGroup) { - $this->createTargetGroup = new CreateTargetGroup($this->_provider); - } - return $this->createTargetGroup; + return new CreateTargetGroup($this->_provider); } /** @@ -160,10 +104,7 @@ public function createTargetGroup(): CreateTargetGroup */ public function deleteAds(): DeleteAds { - if (!$this->deleteAds) { - $this->deleteAds = new DeleteAds($this->_provider); - } - return $this->deleteAds; + return new DeleteAds($this->_provider); } /** @@ -171,10 +112,7 @@ public function deleteAds(): DeleteAds */ public function deleteCampaigns(): DeleteCampaigns { - if (!$this->deleteCampaigns) { - $this->deleteCampaigns = new DeleteCampaigns($this->_provider); - } - return $this->deleteCampaigns; + return new DeleteCampaigns($this->_provider); } /** @@ -182,10 +120,7 @@ public function deleteCampaigns(): DeleteCampaigns */ public function deleteClients(): DeleteClients { - if (!$this->deleteClients) { - $this->deleteClients = new DeleteClients($this->_provider); - } - return $this->deleteClients; + return new DeleteClients($this->_provider); } /** @@ -193,10 +128,7 @@ public function deleteClients(): DeleteClients */ public function deleteTargetGroup(): DeleteTargetGroup { - if (!$this->deleteTargetGroup) { - $this->deleteTargetGroup = new DeleteTargetGroup($this->_provider); - } - return $this->deleteTargetGroup; + return new DeleteTargetGroup($this->_provider); } /** @@ -204,10 +136,7 @@ public function deleteTargetGroup(): DeleteTargetGroup */ public function getAccounts(): GetAccounts { - if (!$this->getAccounts) { - $this->getAccounts = new GetAccounts($this->_provider); - } - return $this->getAccounts; + return new GetAccounts($this->_provider); } /** @@ -215,10 +144,7 @@ public function getAccounts(): GetAccounts */ public function getAds(): GetAds { - if (!$this->getAds) { - $this->getAds = new GetAds($this->_provider); - } - return $this->getAds; + return new GetAds($this->_provider); } /** @@ -226,10 +152,7 @@ public function getAds(): GetAds */ public function getAdsLayout(): GetAdsLayout { - if (!$this->getAdsLayout) { - $this->getAdsLayout = new GetAdsLayout($this->_provider); - } - return $this->getAdsLayout; + return new GetAdsLayout($this->_provider); } /** @@ -237,10 +160,7 @@ public function getAdsLayout(): GetAdsLayout */ public function getAdsTargeting(): GetAdsTargeting { - if (!$this->getAdsTargeting) { - $this->getAdsTargeting = new GetAdsTargeting($this->_provider); - } - return $this->getAdsTargeting; + return new GetAdsTargeting($this->_provider); } /** @@ -248,10 +168,7 @@ public function getAdsTargeting(): GetAdsTargeting */ public function getBudget(): GetBudget { - if (!$this->getBudget) { - $this->getBudget = new GetBudget($this->_provider); - } - return $this->getBudget; + return new GetBudget($this->_provider); } /** @@ -259,10 +176,7 @@ public function getBudget(): GetBudget */ public function getCampaigns(): GetCampaigns { - if (!$this->getCampaigns) { - $this->getCampaigns = new GetCampaigns($this->_provider); - } - return $this->getCampaigns; + return new GetCampaigns($this->_provider); } /** @@ -270,10 +184,7 @@ public function getCampaigns(): GetCampaigns */ public function getCategories(): GetCategories { - if (!$this->getCategories) { - $this->getCategories = new GetCategories($this->_provider); - } - return $this->getCategories; + return new GetCategories($this->_provider); } /** @@ -281,10 +192,7 @@ public function getCategories(): GetCategories */ public function getClients(): GetClients { - if (!$this->getClients) { - $this->getClients = new GetClients($this->_provider); - } - return $this->getClients; + return new GetClients($this->_provider); } /** @@ -292,10 +200,7 @@ public function getClients(): GetClients */ public function getDemographics(): GetDemographics { - if (!$this->getDemographics) { - $this->getDemographics = new GetDemographics($this->_provider); - } - return $this->getDemographics; + return new GetDemographics($this->_provider); } /** @@ -303,10 +208,7 @@ public function getDemographics(): GetDemographics */ public function getFloodStats(): GetFloodStats { - if (!$this->getFloodStats) { - $this->getFloodStats = new GetFloodStats($this->_provider); - } - return $this->getFloodStats; + return new GetFloodStats($this->_provider); } /** @@ -314,10 +216,7 @@ public function getFloodStats(): GetFloodStats */ public function getLookalikeRequests(): GetLookalikeRequests { - if (!$this->getLookalikeRequests) { - $this->getLookalikeRequests = new GetLookalikeRequests($this->_provider); - } - return $this->getLookalikeRequests; + return new GetLookalikeRequests($this->_provider); } /** @@ -325,10 +224,7 @@ public function getLookalikeRequests(): GetLookalikeRequests */ public function getMusicians(): GetMusicians { - if (!$this->getMusicians) { - $this->getMusicians = new GetMusicians($this->_provider); - } - return $this->getMusicians; + return new GetMusicians($this->_provider); } /** @@ -336,10 +232,7 @@ public function getMusicians(): GetMusicians */ public function getOfficeUsers(): GetOfficeUsers { - if (!$this->getOfficeUsers) { - $this->getOfficeUsers = new GetOfficeUsers($this->_provider); - } - return $this->getOfficeUsers; + return new GetOfficeUsers($this->_provider); } /** @@ -347,10 +240,7 @@ public function getOfficeUsers(): GetOfficeUsers */ public function getPostsReach(): GetPostsReach { - if (!$this->getPostsReach) { - $this->getPostsReach = new GetPostsReach($this->_provider); - } - return $this->getPostsReach; + return new GetPostsReach($this->_provider); } /** @@ -358,10 +248,7 @@ public function getPostsReach(): GetPostsReach */ public function getRejectionReason(): GetRejectionReason { - if (!$this->getRejectionReason) { - $this->getRejectionReason = new GetRejectionReason($this->_provider); - } - return $this->getRejectionReason; + return new GetRejectionReason($this->_provider); } /** @@ -369,10 +256,7 @@ public function getRejectionReason(): GetRejectionReason */ public function getStatistics(): GetStatistics { - if (!$this->getStatistics) { - $this->getStatistics = new GetStatistics($this->_provider); - } - return $this->getStatistics; + return new GetStatistics($this->_provider); } /** @@ -380,10 +264,7 @@ public function getStatistics(): GetStatistics */ public function getSuggestions(): GetSuggestions { - if (!$this->getSuggestions) { - $this->getSuggestions = new GetSuggestions($this->_provider); - } - return $this->getSuggestions; + return new GetSuggestions($this->_provider); } /** @@ -391,10 +272,7 @@ public function getSuggestions(): GetSuggestions */ public function getTargetGroups(): GetTargetGroups { - if (!$this->getTargetGroups) { - $this->getTargetGroups = new GetTargetGroups($this->_provider); - } - return $this->getTargetGroups; + return new GetTargetGroups($this->_provider); } /** @@ -402,10 +280,7 @@ public function getTargetGroups(): GetTargetGroups */ public function getTargetingStats(): GetTargetingStats { - if (!$this->getTargetingStats) { - $this->getTargetingStats = new GetTargetingStats($this->_provider); - } - return $this->getTargetingStats; + return new GetTargetingStats($this->_provider); } /** @@ -413,10 +288,7 @@ public function getTargetingStats(): GetTargetingStats */ public function getUploadURL(): GetUploadURL { - if (!$this->getUploadURL) { - $this->getUploadURL = new GetUploadURL($this->_provider); - } - return $this->getUploadURL; + return new GetUploadURL($this->_provider); } /** @@ -424,10 +296,7 @@ public function getUploadURL(): GetUploadURL */ public function getVideoUploadURL(): GetVideoUploadURL { - if (!$this->getVideoUploadURL) { - $this->getVideoUploadURL = new GetVideoUploadURL($this->_provider); - } - return $this->getVideoUploadURL; + return new GetVideoUploadURL($this->_provider); } /** @@ -435,10 +304,7 @@ public function getVideoUploadURL(): GetVideoUploadURL */ public function importTargetContacts(): ImportTargetContacts { - if (!$this->importTargetContacts) { - $this->importTargetContacts = new ImportTargetContacts($this->_provider); - } - return $this->importTargetContacts; + return new ImportTargetContacts($this->_provider); } /** @@ -446,10 +312,7 @@ public function importTargetContacts(): ImportTargetContacts */ public function removeOfficeUsers(): RemoveOfficeUsers { - if (!$this->removeOfficeUsers) { - $this->removeOfficeUsers = new RemoveOfficeUsers($this->_provider); - } - return $this->removeOfficeUsers; + return new RemoveOfficeUsers($this->_provider); } /** @@ -457,10 +320,7 @@ public function removeOfficeUsers(): RemoveOfficeUsers */ public function updateAds(): UpdateAds { - if (!$this->updateAds) { - $this->updateAds = new UpdateAds($this->_provider); - } - return $this->updateAds; + return new UpdateAds($this->_provider); } /** @@ -468,10 +328,7 @@ public function updateAds(): UpdateAds */ public function updateCampaigns(): UpdateCampaigns { - if (!$this->updateCampaigns) { - $this->updateCampaigns = new UpdateCampaigns($this->_provider); - } - return $this->updateCampaigns; + return new UpdateCampaigns($this->_provider); } /** @@ -479,10 +336,7 @@ public function updateCampaigns(): UpdateCampaigns */ public function updateClients(): UpdateClients { - if (!$this->updateClients) { - $this->updateClients = new UpdateClients($this->_provider); - } - return $this->updateClients; + return new UpdateClients($this->_provider); } /** @@ -490,10 +344,7 @@ public function updateClients(): UpdateClients */ public function updateTargetGroup(): UpdateTargetGroup { - if (!$this->updateTargetGroup) { - $this->updateTargetGroup = new UpdateTargetGroup($this->_provider); - } - return $this->updateTargetGroup; + return new UpdateTargetGroup($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Ads/AddOfficeUsers.php b/src/ReactPHPVK/Actions/Sections/Ads/AddOfficeUsers.php index f48a7cc..4c0ca95 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/AddOfficeUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/AddOfficeUsers.php @@ -61,7 +61,7 @@ public function setData(string $value): AddOfficeUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/CheckLink.php b/src/ReactPHPVK/Actions/Sections/Ads/CheckLink.php index e3ba31d..ebc80b9 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/CheckLink.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/CheckLink.php @@ -87,7 +87,7 @@ public function setCampaignId(int $value): CheckLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/CreateAds.php b/src/ReactPHPVK/Actions/Sections/Ads/CreateAds.php index 70bad9d..ecb4b4f 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/CreateAds.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/CreateAds.php @@ -61,7 +61,7 @@ public function setData(string $value): CreateAds * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/CreateCampaigns.php b/src/ReactPHPVK/Actions/Sections/Ads/CreateCampaigns.php index 68d1328..633faf1 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/CreateCampaigns.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/CreateCampaigns.php @@ -61,7 +61,7 @@ public function setData(string $value): CreateCampaigns * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/CreateClients.php b/src/ReactPHPVK/Actions/Sections/Ads/CreateClients.php index 652b20a..783864d 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/CreateClients.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/CreateClients.php @@ -61,7 +61,7 @@ public function setData(string $value): CreateClients * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/CreateTargetGroup.php b/src/ReactPHPVK/Actions/Sections/Ads/CreateTargetGroup.php index c8e0daa..3adeddf 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/CreateTargetGroup.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/CreateTargetGroup.php @@ -109,7 +109,7 @@ public function setTargetPixelRules(string $value): CreateTargetGroup * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/DeleteAds.php b/src/ReactPHPVK/Actions/Sections/Ads/DeleteAds.php index 4024c39..a30a4ed 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/DeleteAds.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/DeleteAds.php @@ -61,7 +61,7 @@ public function setIds(string $value): DeleteAds * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/DeleteCampaigns.php b/src/ReactPHPVK/Actions/Sections/Ads/DeleteCampaigns.php index a042cd0..e3239ad 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/DeleteCampaigns.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/DeleteCampaigns.php @@ -61,7 +61,7 @@ public function setIds(string $value): DeleteCampaigns * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/DeleteClients.php b/src/ReactPHPVK/Actions/Sections/Ads/DeleteClients.php index 552d282..e7bec08 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/DeleteClients.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/DeleteClients.php @@ -61,7 +61,7 @@ public function setIds(string $value): DeleteClients * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/DeleteTargetGroup.php b/src/ReactPHPVK/Actions/Sections/Ads/DeleteTargetGroup.php index d4ba65b..a3e5e3b 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/DeleteTargetGroup.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/DeleteTargetGroup.php @@ -74,7 +74,7 @@ public function setTargetGroupId(int $value): DeleteTargetGroup * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetAccounts.php b/src/ReactPHPVK/Actions/Sections/Ads/GetAccounts.php index 3a8b623..830c583 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetAccounts.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetAccounts.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetAccounts * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetAds.php b/src/ReactPHPVK/Actions/Sections/Ads/GetAds.php index a5bd83a..02eff89 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetAds.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetAds.php @@ -139,7 +139,7 @@ public function setOffset(int $value): GetAds * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetAdsLayout.php b/src/ReactPHPVK/Actions/Sections/Ads/GetAdsLayout.php index 5309e28..3a255d6 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetAdsLayout.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetAdsLayout.php @@ -126,7 +126,7 @@ public function setOffset(int $value): GetAdsLayout * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetAdsTargeting.php b/src/ReactPHPVK/Actions/Sections/Ads/GetAdsTargeting.php index 774d9cd..839f244 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetAdsTargeting.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetAdsTargeting.php @@ -126,7 +126,7 @@ public function setOffset(int $value): GetAdsTargeting * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetBudget.php b/src/ReactPHPVK/Actions/Sections/Ads/GetBudget.php index 82c8b35..5345e85 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetBudget.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetBudget.php @@ -48,7 +48,7 @@ public function setAccountId(int $value): GetBudget * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetCampaigns.php b/src/ReactPHPVK/Actions/Sections/Ads/GetCampaigns.php index 2bc9515..d54858a 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetCampaigns.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetCampaigns.php @@ -98,7 +98,7 @@ public function setFields(array $value): GetCampaigns * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetCategories.php b/src/ReactPHPVK/Actions/Sections/Ads/GetCategories.php index 13daca6..4335bbb 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetCategories.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetCategories.php @@ -48,7 +48,7 @@ public function setLang(string $value): GetCategories * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetClients.php b/src/ReactPHPVK/Actions/Sections/Ads/GetClients.php index cacd7a3..2d16760 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetClients.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetClients.php @@ -48,7 +48,7 @@ public function setAccountId(int $value): GetClients * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetDemographics.php b/src/ReactPHPVK/Actions/Sections/Ads/GetDemographics.php index 9b2774f..0792cf6 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetDemographics.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetDemographics.php @@ -113,7 +113,7 @@ public function setDateTo(string $value): GetDemographics * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetFloodStats.php b/src/ReactPHPVK/Actions/Sections/Ads/GetFloodStats.php index 933a224..b9fc663 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetFloodStats.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetFloodStats.php @@ -48,7 +48,7 @@ public function setAccountId(int $value): GetFloodStats * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetLookalikeRequests.php b/src/ReactPHPVK/Actions/Sections/Ads/GetLookalikeRequests.php index c57133a..a5e5a0d 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetLookalikeRequests.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetLookalikeRequests.php @@ -101,7 +101,7 @@ public function setSortBy(string $value): GetLookalikeRequests * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetMusicians.php b/src/ReactPHPVK/Actions/Sections/Ads/GetMusicians.php index 42511be..de652e3 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetMusicians.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetMusicians.php @@ -46,7 +46,7 @@ public function setArtistName(string $value): GetMusicians * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetOfficeUsers.php b/src/ReactPHPVK/Actions/Sections/Ads/GetOfficeUsers.php index 68fdee2..f3205a7 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetOfficeUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetOfficeUsers.php @@ -48,7 +48,7 @@ public function setAccountId(int $value): GetOfficeUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetPostsReach.php b/src/ReactPHPVK/Actions/Sections/Ads/GetPostsReach.php index c9cb6f3..39afa07 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetPostsReach.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetPostsReach.php @@ -74,7 +74,7 @@ public function setIds(string $value): GetPostsReach * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetRejectionReason.php b/src/ReactPHPVK/Actions/Sections/Ads/GetRejectionReason.php index 5d6eabb..5dff665 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetRejectionReason.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetRejectionReason.php @@ -61,7 +61,7 @@ public function setAdId(int $value): GetRejectionReason * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetStatistics.php b/src/ReactPHPVK/Actions/Sections/Ads/GetStatistics.php index c3bb878..e580e2e 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetStatistics.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetStatistics.php @@ -126,7 +126,7 @@ public function setStatsFields(array $value): GetStatistics * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetSuggestions.php b/src/ReactPHPVK/Actions/Sections/Ads/GetSuggestions.php index 10a655d..784aaf0 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetSuggestions.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetSuggestions.php @@ -113,7 +113,7 @@ public function setLang(string $value): GetSuggestions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetTargetGroups.php b/src/ReactPHPVK/Actions/Sections/Ads/GetTargetGroups.php index 0157874..28089bc 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetTargetGroups.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetTargetGroups.php @@ -74,7 +74,7 @@ public function setExtended(bool $value): GetTargetGroups * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetTargetingStats.php b/src/ReactPHPVK/Actions/Sections/Ads/GetTargetingStats.php index 31e08fe..9584c14 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetTargetingStats.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetTargetingStats.php @@ -172,7 +172,7 @@ public function setNeedPrecise(bool $value): GetTargetingStats * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetUploadURL.php b/src/ReactPHPVK/Actions/Sections/Ads/GetUploadURL.php index 21a61b4..ba667c6 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetUploadURL.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetUploadURL.php @@ -59,7 +59,7 @@ public function setIcon(int $value): GetUploadURL * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/GetVideoUploadURL.php b/src/ReactPHPVK/Actions/Sections/Ads/GetVideoUploadURL.php index 5ce83b9..0dae449 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/GetVideoUploadURL.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/GetVideoUploadURL.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetVideoUploadURL * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/ImportTargetContacts.php b/src/ReactPHPVK/Actions/Sections/Ads/ImportTargetContacts.php index 401b0ac..530e016 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/ImportTargetContacts.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/ImportTargetContacts.php @@ -87,7 +87,7 @@ public function setContacts(string $value): ImportTargetContacts * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/RemoveOfficeUsers.php b/src/ReactPHPVK/Actions/Sections/Ads/RemoveOfficeUsers.php index d821958..50ac5a5 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/RemoveOfficeUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/RemoveOfficeUsers.php @@ -61,7 +61,7 @@ public function setIds(string $value): RemoveOfficeUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/UpdateAds.php b/src/ReactPHPVK/Actions/Sections/Ads/UpdateAds.php index 5e6f804..89b2d55 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/UpdateAds.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/UpdateAds.php @@ -61,7 +61,7 @@ public function setData(string $value): UpdateAds * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/UpdateCampaigns.php b/src/ReactPHPVK/Actions/Sections/Ads/UpdateCampaigns.php index 148bcc4..25bcdc0 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/UpdateCampaigns.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/UpdateCampaigns.php @@ -61,7 +61,7 @@ public function setData(string $value): UpdateCampaigns * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/UpdateClients.php b/src/ReactPHPVK/Actions/Sections/Ads/UpdateClients.php index 260efbd..292243b 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/UpdateClients.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/UpdateClients.php @@ -61,7 +61,7 @@ public function setData(string $value): UpdateClients * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Ads/UpdateTargetGroup.php b/src/ReactPHPVK/Actions/Sections/Ads/UpdateTargetGroup.php index 3ee8d8e..49e154c 100644 --- a/src/ReactPHPVK/Actions/Sections/Ads/UpdateTargetGroup.php +++ b/src/ReactPHPVK/Actions/Sections/Ads/UpdateTargetGroup.php @@ -135,7 +135,7 @@ public function setTargetPixelRules(string $value): UpdateTargetGroup * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/AppWidgets.php b/src/ReactPHPVK/Actions/Sections/AppWidgets.php index a3cd08c..b2dff02 100644 --- a/src/ReactPHPVK/Actions/Sections/AppWidgets.php +++ b/src/ReactPHPVK/Actions/Sections/AppWidgets.php @@ -10,8 +10,6 @@ class AppWidgets { private Provider $_provider; - private ?AppWidgets\Update $update = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -22,10 +20,7 @@ public function __construct(Provider $provider) */ public function update(): Update { - if (!$this->update) { - $this->update = new Update($this->_provider); - } - return $this->update; + return new Update($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/AppWidgets/Update.php b/src/ReactPHPVK/Actions/Sections/AppWidgets/Update.php index 29b8e0b..9e977c0 100644 --- a/src/ReactPHPVK/Actions/Sections/AppWidgets/Update.php +++ b/src/ReactPHPVK/Actions/Sections/AppWidgets/Update.php @@ -57,7 +57,7 @@ public function setType(string $value): Update * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps.php b/src/ReactPHPVK/Actions/Sections/Apps.php index b4eab9b..8ed32d9 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps.php +++ b/src/ReactPHPVK/Actions/Sections/Apps.php @@ -19,17 +19,6 @@ class Apps { private Provider $_provider; - private ?Apps\DeleteAppRequests $deleteAppRequests = null; - private ?Apps\Get $get = null; - private ?Apps\GetCatalog $getCatalog = null; - private ?Apps\GetFriendsList $getFriendsList = null; - private ?Apps\GetLeaderboard $getLeaderboard = null; - private ?Apps\GetScopes $getScopes = null; - private ?Apps\GetScore $getScore = null; - private ?Apps\PromoHasActiveGift $promoHasActiveGift = null; - private ?Apps\PromoUseGift $promoUseGift = null; - private ?Apps\SendRequest $sendRequest = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -40,10 +29,7 @@ public function __construct(Provider $provider) */ public function deleteAppRequests(): DeleteAppRequests { - if (!$this->deleteAppRequests) { - $this->deleteAppRequests = new DeleteAppRequests($this->_provider); - } - return $this->deleteAppRequests; + return new DeleteAppRequests($this->_provider); } /** @@ -51,10 +37,7 @@ public function deleteAppRequests(): DeleteAppRequests */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -62,10 +45,7 @@ public function get(): Get */ public function getCatalog(): GetCatalog { - if (!$this->getCatalog) { - $this->getCatalog = new GetCatalog($this->_provider); - } - return $this->getCatalog; + return new GetCatalog($this->_provider); } /** @@ -73,10 +53,7 @@ public function getCatalog(): GetCatalog */ public function getFriendsList(): GetFriendsList { - if (!$this->getFriendsList) { - $this->getFriendsList = new GetFriendsList($this->_provider); - } - return $this->getFriendsList; + return new GetFriendsList($this->_provider); } /** @@ -84,10 +61,7 @@ public function getFriendsList(): GetFriendsList */ public function getLeaderboard(): GetLeaderboard { - if (!$this->getLeaderboard) { - $this->getLeaderboard = new GetLeaderboard($this->_provider); - } - return $this->getLeaderboard; + return new GetLeaderboard($this->_provider); } /** @@ -95,10 +69,7 @@ public function getLeaderboard(): GetLeaderboard */ public function getScopes(): GetScopes { - if (!$this->getScopes) { - $this->getScopes = new GetScopes($this->_provider); - } - return $this->getScopes; + return new GetScopes($this->_provider); } /** @@ -106,10 +77,7 @@ public function getScopes(): GetScopes */ public function getScore(): GetScore { - if (!$this->getScore) { - $this->getScore = new GetScore($this->_provider); - } - return $this->getScore; + return new GetScore($this->_provider); } /** @@ -117,10 +85,7 @@ public function getScore(): GetScore */ public function promoHasActiveGift(): PromoHasActiveGift { - if (!$this->promoHasActiveGift) { - $this->promoHasActiveGift = new PromoHasActiveGift($this->_provider); - } - return $this->promoHasActiveGift; + return new PromoHasActiveGift($this->_provider); } /** @@ -128,10 +93,7 @@ public function promoHasActiveGift(): PromoHasActiveGift */ public function promoUseGift(): PromoUseGift { - if (!$this->promoUseGift) { - $this->promoUseGift = new PromoUseGift($this->_provider); - } - return $this->promoUseGift; + return new PromoUseGift($this->_provider); } /** @@ -139,10 +101,7 @@ public function promoUseGift(): PromoUseGift */ public function sendRequest(): SendRequest { - if (!$this->sendRequest) { - $this->sendRequest = new SendRequest($this->_provider); - } - return $this->sendRequest; + return new SendRequest($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Apps/DeleteAppRequests.php b/src/ReactPHPVK/Actions/Sections/Apps/DeleteAppRequests.php index d3a1e8b..be1f474 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/DeleteAppRequests.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/DeleteAppRequests.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): DeleteAppRequests * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/Get.php b/src/ReactPHPVK/Actions/Sections/Apps/Get.php index 7a8d838..37dd857 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/Get.php @@ -122,7 +122,7 @@ public function setNameCase(string $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/GetCatalog.php b/src/ReactPHPVK/Actions/Sections/Apps/GetCatalog.php index b51cf26..fa55a87 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/GetCatalog.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/GetCatalog.php @@ -168,7 +168,7 @@ public function setFilter(string $value): GetCatalog * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/GetFriendsList.php b/src/ReactPHPVK/Actions/Sections/Apps/GetFriendsList.php index dbca73c..04b793b 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/GetFriendsList.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/GetFriendsList.php @@ -96,7 +96,7 @@ public function setFields(array $value): GetFriendsList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/GetLeaderboard.php b/src/ReactPHPVK/Actions/Sections/Apps/GetLeaderboard.php index 770ddfc..65a40d6 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/GetLeaderboard.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/GetLeaderboard.php @@ -74,7 +74,7 @@ public function setExtended(bool $value): GetLeaderboard * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/GetScopes.php b/src/ReactPHPVK/Actions/Sections/Apps/GetScopes.php index c91d46c..1d6b321 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/GetScopes.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/GetScopes.php @@ -46,7 +46,7 @@ public function setType(string $value): GetScopes * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/GetScore.php b/src/ReactPHPVK/Actions/Sections/Apps/GetScore.php index 438e4dc..37defcd 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/GetScore.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/GetScore.php @@ -46,7 +46,7 @@ public function setUserId(int $value): GetScore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/PromoHasActiveGift.php b/src/ReactPHPVK/Actions/Sections/Apps/PromoHasActiveGift.php index 43a935a..7453a97 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/PromoHasActiveGift.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/PromoHasActiveGift.php @@ -59,7 +59,7 @@ public function setUserId(int $value): PromoHasActiveGift * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/PromoUseGift.php b/src/ReactPHPVK/Actions/Sections/Apps/PromoUseGift.php index 1fcccd8..178fab8 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/PromoUseGift.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/PromoUseGift.php @@ -59,7 +59,7 @@ public function setUserId(int $value): PromoUseGift * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Apps/SendRequest.php b/src/ReactPHPVK/Actions/Sections/Apps/SendRequest.php index a11ad80..e7ecb54 100644 --- a/src/ReactPHPVK/Actions/Sections/Apps/SendRequest.php +++ b/src/ReactPHPVK/Actions/Sections/Apps/SendRequest.php @@ -109,7 +109,7 @@ public function setSeparate(bool $value): SendRequest * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Auth.php b/src/ReactPHPVK/Actions/Sections/Auth.php index 80437c5..8885be2 100644 --- a/src/ReactPHPVK/Actions/Sections/Auth.php +++ b/src/ReactPHPVK/Actions/Sections/Auth.php @@ -11,9 +11,6 @@ class Auth { private Provider $_provider; - private ?Auth\CheckPhone $checkPhone = null; - private ?Auth\Restore $restore = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -24,10 +21,7 @@ public function __construct(Provider $provider) */ public function checkPhone(): CheckPhone { - if (!$this->checkPhone) { - $this->checkPhone = new CheckPhone($this->_provider); - } - return $this->checkPhone; + return new CheckPhone($this->_provider); } /** @@ -35,10 +29,7 @@ public function checkPhone(): CheckPhone */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Auth/CheckPhone.php b/src/ReactPHPVK/Actions/Sections/Auth/CheckPhone.php index 8c60327..45fe257 100644 --- a/src/ReactPHPVK/Actions/Sections/Auth/CheckPhone.php +++ b/src/ReactPHPVK/Actions/Sections/Auth/CheckPhone.php @@ -83,7 +83,7 @@ public function setAuthByPhone(bool $value): CheckPhone * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Auth/Restore.php b/src/ReactPHPVK/Actions/Sections/Auth/Restore.php index 8e441c8..90d5460 100644 --- a/src/ReactPHPVK/Actions/Sections/Auth/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Auth/Restore.php @@ -61,7 +61,7 @@ public function setLastName(string $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board.php b/src/ReactPHPVK/Actions/Sections/Board.php index c3eb742..d199102 100644 --- a/src/ReactPHPVK/Actions/Sections/Board.php +++ b/src/ReactPHPVK/Actions/Sections/Board.php @@ -22,20 +22,6 @@ class Board { private Provider $_provider; - private ?Board\AddTopic $addTopic = null; - private ?Board\CloseTopic $closeTopic = null; - private ?Board\CreateComment $createComment = null; - private ?Board\DeleteComment $deleteComment = null; - private ?Board\DeleteTopic $deleteTopic = null; - private ?Board\EditComment $editComment = null; - private ?Board\EditTopic $editTopic = null; - private ?Board\FixTopic $fixTopic = null; - private ?Board\GetComments $getComments = null; - private ?Board\GetTopics $getTopics = null; - private ?Board\OpenTopic $openTopic = null; - private ?Board\RestoreComment $restoreComment = null; - private ?Board\UnfixTopic $unfixTopic = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -46,10 +32,7 @@ public function __construct(Provider $provider) */ public function addTopic(): AddTopic { - if (!$this->addTopic) { - $this->addTopic = new AddTopic($this->_provider); - } - return $this->addTopic; + return new AddTopic($this->_provider); } /** @@ -57,10 +40,7 @@ public function addTopic(): AddTopic */ public function closeTopic(): CloseTopic { - if (!$this->closeTopic) { - $this->closeTopic = new CloseTopic($this->_provider); - } - return $this->closeTopic; + return new CloseTopic($this->_provider); } /** @@ -68,10 +48,7 @@ public function closeTopic(): CloseTopic */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -79,10 +56,7 @@ public function createComment(): CreateComment */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -90,10 +64,7 @@ public function deleteComment(): DeleteComment */ public function deleteTopic(): DeleteTopic { - if (!$this->deleteTopic) { - $this->deleteTopic = new DeleteTopic($this->_provider); - } - return $this->deleteTopic; + return new DeleteTopic($this->_provider); } /** @@ -101,10 +72,7 @@ public function deleteTopic(): DeleteTopic */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -112,10 +80,7 @@ public function editComment(): EditComment */ public function editTopic(): EditTopic { - if (!$this->editTopic) { - $this->editTopic = new EditTopic($this->_provider); - } - return $this->editTopic; + return new EditTopic($this->_provider); } /** @@ -123,10 +88,7 @@ public function editTopic(): EditTopic */ public function fixTopic(): FixTopic { - if (!$this->fixTopic) { - $this->fixTopic = new FixTopic($this->_provider); - } - return $this->fixTopic; + return new FixTopic($this->_provider); } /** @@ -134,10 +96,7 @@ public function fixTopic(): FixTopic */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -145,10 +104,7 @@ public function getComments(): GetComments */ public function getTopics(): GetTopics { - if (!$this->getTopics) { - $this->getTopics = new GetTopics($this->_provider); - } - return $this->getTopics; + return new GetTopics($this->_provider); } /** @@ -156,10 +112,7 @@ public function getTopics(): GetTopics */ public function openTopic(): OpenTopic { - if (!$this->openTopic) { - $this->openTopic = new OpenTopic($this->_provider); - } - return $this->openTopic; + return new OpenTopic($this->_provider); } /** @@ -167,10 +120,7 @@ public function openTopic(): OpenTopic */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } /** @@ -178,10 +128,7 @@ public function restoreComment(): RestoreComment */ public function unfixTopic(): UnfixTopic { - if (!$this->unfixTopic) { - $this->unfixTopic = new UnfixTopic($this->_provider); - } - return $this->unfixTopic; + return new UnfixTopic($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Board/AddTopic.php b/src/ReactPHPVK/Actions/Sections/Board/AddTopic.php index 6c46e44..8a18830 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/AddTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/AddTopic.php @@ -100,7 +100,7 @@ public function setAttachments(array $value): AddTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/CloseTopic.php b/src/ReactPHPVK/Actions/Sections/Board/CloseTopic.php index d79d776..d579a5f 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/CloseTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/CloseTopic.php @@ -61,7 +61,7 @@ public function setTopicId(int $value): CloseTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Board/CreateComment.php index 6ce23ef..cc27fcd 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Board/CreateComment.php @@ -126,7 +126,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Board/DeleteComment.php index 0825abe..c24dd91 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Board/DeleteComment.php @@ -74,7 +74,7 @@ public function setCommentId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/DeleteTopic.php b/src/ReactPHPVK/Actions/Sections/Board/DeleteTopic.php index 14fd957..36710f1 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/DeleteTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/DeleteTopic.php @@ -61,7 +61,7 @@ public function setTopicId(int $value): DeleteTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/EditComment.php b/src/ReactPHPVK/Actions/Sections/Board/EditComment.php index 474dbbb..02744ca 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Board/EditComment.php @@ -100,7 +100,7 @@ public function setAttachments(array $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/EditTopic.php b/src/ReactPHPVK/Actions/Sections/Board/EditTopic.php index 77da059..6ed30aa 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/EditTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/EditTopic.php @@ -74,7 +74,7 @@ public function setTitle(string $value): EditTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/FixTopic.php b/src/ReactPHPVK/Actions/Sections/Board/FixTopic.php index d159c0b..e3ae101 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/FixTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/FixTopic.php @@ -61,7 +61,7 @@ public function setTopicId(int $value): FixTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/GetComments.php b/src/ReactPHPVK/Actions/Sections/Board/GetComments.php index 6471a66..92b801d 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Board/GetComments.php @@ -137,7 +137,7 @@ public function setSort(string $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/GetTopics.php b/src/ReactPHPVK/Actions/Sections/Board/GetTopics.php index ddb8189..e82f066 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/GetTopics.php +++ b/src/ReactPHPVK/Actions/Sections/Board/GetTopics.php @@ -139,7 +139,7 @@ public function setPreviewLength(int $value): GetTopics * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/OpenTopic.php b/src/ReactPHPVK/Actions/Sections/Board/OpenTopic.php index 8aba856..8490cc4 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/OpenTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/OpenTopic.php @@ -61,7 +61,7 @@ public function setTopicId(int $value): OpenTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Board/RestoreComment.php index c578419..c53855d 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Board/RestoreComment.php @@ -74,7 +74,7 @@ public function setCommentId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Board/UnfixTopic.php b/src/ReactPHPVK/Actions/Sections/Board/UnfixTopic.php index bce91f1..951c4cd 100644 --- a/src/ReactPHPVK/Actions/Sections/Board/UnfixTopic.php +++ b/src/ReactPHPVK/Actions/Sections/Board/UnfixTopic.php @@ -61,7 +61,7 @@ public function setTopicId(int $value): UnfixTopic * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database.php b/src/ReactPHPVK/Actions/Sections/Database.php index 075f8ab..90ceb82 100644 --- a/src/ReactPHPVK/Actions/Sections/Database.php +++ b/src/ReactPHPVK/Actions/Sections/Database.php @@ -21,19 +21,6 @@ class Database { private Provider $_provider; - private ?Database\GetChairs $getChairs = null; - private ?Database\GetCities $getCities = null; - private ?Database\GetCitiesById $getCitiesById = null; - private ?Database\GetCountries $getCountries = null; - private ?Database\GetCountriesById $getCountriesById = null; - private ?Database\GetFaculties $getFaculties = null; - private ?Database\GetMetroStations $getMetroStations = null; - private ?Database\GetMetroStationsById $getMetroStationsById = null; - private ?Database\GetRegions $getRegions = null; - private ?Database\GetSchoolClasses $getSchoolClasses = null; - private ?Database\GetSchools $getSchools = null; - private ?Database\GetUniversities $getUniversities = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -44,10 +31,7 @@ public function __construct(Provider $provider) */ public function getChairs(): GetChairs { - if (!$this->getChairs) { - $this->getChairs = new GetChairs($this->_provider); - } - return $this->getChairs; + return new GetChairs($this->_provider); } /** @@ -55,10 +39,7 @@ public function getChairs(): GetChairs */ public function getCities(): GetCities { - if (!$this->getCities) { - $this->getCities = new GetCities($this->_provider); - } - return $this->getCities; + return new GetCities($this->_provider); } /** @@ -66,10 +47,7 @@ public function getCities(): GetCities */ public function getCitiesById(): GetCitiesById { - if (!$this->getCitiesById) { - $this->getCitiesById = new GetCitiesById($this->_provider); - } - return $this->getCitiesById; + return new GetCitiesById($this->_provider); } /** @@ -77,10 +55,7 @@ public function getCitiesById(): GetCitiesById */ public function getCountries(): GetCountries { - if (!$this->getCountries) { - $this->getCountries = new GetCountries($this->_provider); - } - return $this->getCountries; + return new GetCountries($this->_provider); } /** @@ -88,10 +63,7 @@ public function getCountries(): GetCountries */ public function getCountriesById(): GetCountriesById { - if (!$this->getCountriesById) { - $this->getCountriesById = new GetCountriesById($this->_provider); - } - return $this->getCountriesById; + return new GetCountriesById($this->_provider); } /** @@ -99,10 +71,7 @@ public function getCountriesById(): GetCountriesById */ public function getFaculties(): GetFaculties { - if (!$this->getFaculties) { - $this->getFaculties = new GetFaculties($this->_provider); - } - return $this->getFaculties; + return new GetFaculties($this->_provider); } /** @@ -110,10 +79,7 @@ public function getFaculties(): GetFaculties */ public function getMetroStations(): GetMetroStations { - if (!$this->getMetroStations) { - $this->getMetroStations = new GetMetroStations($this->_provider); - } - return $this->getMetroStations; + return new GetMetroStations($this->_provider); } /** @@ -121,10 +87,7 @@ public function getMetroStations(): GetMetroStations */ public function getMetroStationsById(): GetMetroStationsById { - if (!$this->getMetroStationsById) { - $this->getMetroStationsById = new GetMetroStationsById($this->_provider); - } - return $this->getMetroStationsById; + return new GetMetroStationsById($this->_provider); } /** @@ -132,10 +95,7 @@ public function getMetroStationsById(): GetMetroStationsById */ public function getRegions(): GetRegions { - if (!$this->getRegions) { - $this->getRegions = new GetRegions($this->_provider); - } - return $this->getRegions; + return new GetRegions($this->_provider); } /** @@ -143,10 +103,7 @@ public function getRegions(): GetRegions */ public function getSchoolClasses(): GetSchoolClasses { - if (!$this->getSchoolClasses) { - $this->getSchoolClasses = new GetSchoolClasses($this->_provider); - } - return $this->getSchoolClasses; + return new GetSchoolClasses($this->_provider); } /** @@ -154,10 +111,7 @@ public function getSchoolClasses(): GetSchoolClasses */ public function getSchools(): GetSchools { - if (!$this->getSchools) { - $this->getSchools = new GetSchools($this->_provider); - } - return $this->getSchools; + return new GetSchools($this->_provider); } /** @@ -165,10 +119,7 @@ public function getSchools(): GetSchools */ public function getUniversities(): GetUniversities { - if (!$this->getUniversities) { - $this->getUniversities = new GetUniversities($this->_provider); - } - return $this->getUniversities; + return new GetUniversities($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetChairs.php b/src/ReactPHPVK/Actions/Sections/Database/GetChairs.php index 21d1573..264d847 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetChairs.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetChairs.php @@ -74,7 +74,7 @@ public function setCount(int $value): GetChairs * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetCities.php b/src/ReactPHPVK/Actions/Sections/Database/GetCities.php index 7745563..8532eba 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetCities.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetCities.php @@ -113,7 +113,7 @@ public function setCount(int $value): GetCities * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetCitiesById.php b/src/ReactPHPVK/Actions/Sections/Database/GetCitiesById.php index 0edb39c..e9ca23f 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetCitiesById.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetCitiesById.php @@ -48,7 +48,7 @@ public function setCityIds(array $value): GetCitiesById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetCountries.php b/src/ReactPHPVK/Actions/Sections/Database/GetCountries.php index 3899a6d..f9c1e63 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetCountries.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetCountries.php @@ -87,7 +87,7 @@ public function setCount(int $value): GetCountries * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetCountriesById.php b/src/ReactPHPVK/Actions/Sections/Database/GetCountriesById.php index 9068765..e502484 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetCountriesById.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetCountriesById.php @@ -48,7 +48,7 @@ public function setCountryIds(array $value): GetCountriesById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetFaculties.php b/src/ReactPHPVK/Actions/Sections/Database/GetFaculties.php index c0dd82a..f257960 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetFaculties.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetFaculties.php @@ -74,7 +74,7 @@ public function setCount(int $value): GetFaculties * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetMetroStations.php b/src/ReactPHPVK/Actions/Sections/Database/GetMetroStations.php index a2cdbfd..c5a16a1 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetMetroStations.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetMetroStations.php @@ -79,7 +79,7 @@ public function setExtended(bool $value): GetMetroStations * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetMetroStationsById.php b/src/ReactPHPVK/Actions/Sections/Database/GetMetroStationsById.php index 8597a2d..f447aa2 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetMetroStationsById.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetMetroStationsById.php @@ -46,7 +46,7 @@ public function setStationIds(array $value): GetMetroStationsById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetRegions.php b/src/ReactPHPVK/Actions/Sections/Database/GetRegions.php index a7fb0d9..b9d9b00 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetRegions.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetRegions.php @@ -87,7 +87,7 @@ public function setCount(int $value): GetRegions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetSchoolClasses.php b/src/ReactPHPVK/Actions/Sections/Database/GetSchoolClasses.php index 7757f02..e6502c3 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetSchoolClasses.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetSchoolClasses.php @@ -48,7 +48,7 @@ public function setCountryId(int $value): GetSchoolClasses * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetSchools.php b/src/ReactPHPVK/Actions/Sections/Database/GetSchools.php index b959d0e..cd6e07b 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetSchools.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetSchools.php @@ -87,7 +87,7 @@ public function setCount(int $value): GetSchools * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Database/GetUniversities.php b/src/ReactPHPVK/Actions/Sections/Database/GetUniversities.php index eab53b9..e787a0a 100644 --- a/src/ReactPHPVK/Actions/Sections/Database/GetUniversities.php +++ b/src/ReactPHPVK/Actions/Sections/Database/GetUniversities.php @@ -100,7 +100,7 @@ public function setCount(int $value): GetUniversities * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs.php b/src/ReactPHPVK/Actions/Sections/Docs.php index dd1c42c..cb2ef73 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs.php +++ b/src/ReactPHPVK/Actions/Sections/Docs.php @@ -20,18 +20,6 @@ class Docs { private Provider $_provider; - private ?Docs\Add $add = null; - private ?Docs\Delete $delete = null; - private ?Docs\Edit $edit = null; - private ?Docs\Get $get = null; - private ?Docs\GetById $getById = null; - private ?Docs\GetMessagesUploadServer $getMessagesUploadServer = null; - private ?Docs\GetTypes $getTypes = null; - private ?Docs\GetUploadServer $getUploadServer = null; - private ?Docs\GetWallUploadServer $getWallUploadServer = null; - private ?Docs\Save $save = null; - private ?Docs\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -42,10 +30,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -53,10 +38,7 @@ public function add(): Add */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -64,10 +46,7 @@ public function delete(): Delete */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -75,10 +54,7 @@ public function edit(): Edit */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -86,10 +62,7 @@ public function get(): Get */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -97,10 +70,7 @@ public function getById(): GetById */ public function getMessagesUploadServer(): GetMessagesUploadServer { - if (!$this->getMessagesUploadServer) { - $this->getMessagesUploadServer = new GetMessagesUploadServer($this->_provider); - } - return $this->getMessagesUploadServer; + return new GetMessagesUploadServer($this->_provider); } /** @@ -108,10 +78,7 @@ public function getMessagesUploadServer(): GetMessagesUploadServer */ public function getTypes(): GetTypes { - if (!$this->getTypes) { - $this->getTypes = new GetTypes($this->_provider); - } - return $this->getTypes; + return new GetTypes($this->_provider); } /** @@ -119,10 +86,7 @@ public function getTypes(): GetTypes */ public function getUploadServer(): GetUploadServer { - if (!$this->getUploadServer) { - $this->getUploadServer = new GetUploadServer($this->_provider); - } - return $this->getUploadServer; + return new GetUploadServer($this->_provider); } /** @@ -130,10 +94,7 @@ public function getUploadServer(): GetUploadServer */ public function getWallUploadServer(): GetWallUploadServer { - if (!$this->getWallUploadServer) { - $this->getWallUploadServer = new GetWallUploadServer($this->_provider); - } - return $this->getWallUploadServer; + return new GetWallUploadServer($this->_provider); } /** @@ -141,10 +102,7 @@ public function getWallUploadServer(): GetWallUploadServer */ public function save(): Save { - if (!$this->save) { - $this->save = new Save($this->_provider); - } - return $this->save; + return new Save($this->_provider); } /** @@ -152,10 +110,7 @@ public function save(): Save */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Add.php b/src/ReactPHPVK/Actions/Sections/Docs/Add.php index de00ada..ec99fd6 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Add.php @@ -74,7 +74,7 @@ public function setAccessKey(string $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Delete.php b/src/ReactPHPVK/Actions/Sections/Docs/Delete.php index 274b5e1..b71828d 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Delete.php @@ -61,7 +61,7 @@ public function setDocId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Edit.php b/src/ReactPHPVK/Actions/Sections/Docs/Edit.php index b0da6a5..b193cbe 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Edit.php @@ -87,7 +87,7 @@ public function setTags(array $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Get.php b/src/ReactPHPVK/Actions/Sections/Docs/Get.php index 357d7da..e395ae9 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Get.php @@ -96,7 +96,7 @@ public function setReturnTags(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/GetById.php b/src/ReactPHPVK/Actions/Sections/Docs/GetById.php index 100b5ac..15b06d1 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/GetById.php @@ -59,7 +59,7 @@ public function setReturnTags(bool $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/GetMessagesUploadServer.php b/src/ReactPHPVK/Actions/Sections/Docs/GetMessagesUploadServer.php index eb996a5..6720933 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/GetMessagesUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/GetMessagesUploadServer.php @@ -61,7 +61,7 @@ public function setPeerId(int $value): GetMessagesUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/GetTypes.php b/src/ReactPHPVK/Actions/Sections/Docs/GetTypes.php index 0170372..39b5528 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/GetTypes.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/GetTypes.php @@ -48,7 +48,7 @@ public function setOwnerId(int $value): GetTypes * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/GetUploadServer.php b/src/ReactPHPVK/Actions/Sections/Docs/GetUploadServer.php index 690ad3e..60abe61 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/GetUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/GetUploadServer.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/GetWallUploadServer.php b/src/ReactPHPVK/Actions/Sections/Docs/GetWallUploadServer.php index 1e40970..d47eb4f 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/GetWallUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/GetWallUploadServer.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetWallUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Save.php b/src/ReactPHPVK/Actions/Sections/Docs/Save.php index b62b771..c78a2d0 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Save.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Save.php @@ -85,7 +85,7 @@ public function setReturnTags(bool $value): Save * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Docs/Search.php b/src/ReactPHPVK/Actions/Sections/Docs/Search.php index b6fad22..3a0ef0c 100644 --- a/src/ReactPHPVK/Actions/Sections/Docs/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Docs/Search.php @@ -96,7 +96,7 @@ public function setReturnTags(bool $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/DownloadedGames.php b/src/ReactPHPVK/Actions/Sections/DownloadedGames.php index 9172f4f..09fc303 100644 --- a/src/ReactPHPVK/Actions/Sections/DownloadedGames.php +++ b/src/ReactPHPVK/Actions/Sections/DownloadedGames.php @@ -10,8 +10,6 @@ class DownloadedGames { private Provider $_provider; - private ?DownloadedGames\GetPaidStatus $getPaidStatus = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -22,10 +20,7 @@ public function __construct(Provider $provider) */ public function getPaidStatus(): GetPaidStatus { - if (!$this->getPaidStatus) { - $this->getPaidStatus = new GetPaidStatus($this->_provider); - } - return $this->getPaidStatus; + return new GetPaidStatus($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/DownloadedGames/GetPaidStatus.php b/src/ReactPHPVK/Actions/Sections/DownloadedGames/GetPaidStatus.php index b2f171c..c4ab823 100644 --- a/src/ReactPHPVK/Actions/Sections/DownloadedGames/GetPaidStatus.php +++ b/src/ReactPHPVK/Actions/Sections/DownloadedGames/GetPaidStatus.php @@ -46,7 +46,7 @@ public function setUserId(int $value): GetPaidStatus * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave.php b/src/ReactPHPVK/Actions/Sections/Fave.php index fb3bc51..817e525 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave.php +++ b/src/ReactPHPVK/Actions/Sections/Fave.php @@ -31,29 +31,6 @@ class Fave { private Provider $_provider; - private ?Fave\AddArticle $addArticle = null; - private ?Fave\AddLink $addLink = null; - private ?Fave\AddPage $addPage = null; - private ?Fave\AddPost $addPost = null; - private ?Fave\AddProduct $addProduct = null; - private ?Fave\AddTag $addTag = null; - private ?Fave\AddVideo $addVideo = null; - private ?Fave\EditTag $editTag = null; - private ?Fave\Get $get = null; - private ?Fave\GetPages $getPages = null; - private ?Fave\GetTags $getTags = null; - private ?Fave\MarkSeen $markSeen = null; - private ?Fave\RemoveArticle $removeArticle = null; - private ?Fave\RemoveLink $removeLink = null; - private ?Fave\RemovePage $removePage = null; - private ?Fave\RemovePost $removePost = null; - private ?Fave\RemoveProduct $removeProduct = null; - private ?Fave\RemoveTag $removeTag = null; - private ?Fave\ReorderTags $reorderTags = null; - private ?Fave\SetPageTags $setPageTags = null; - private ?Fave\SetTags $setTags = null; - private ?Fave\TrackPageInteraction $trackPageInteraction = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -64,10 +41,7 @@ public function __construct(Provider $provider) */ public function addArticle(): AddArticle { - if (!$this->addArticle) { - $this->addArticle = new AddArticle($this->_provider); - } - return $this->addArticle; + return new AddArticle($this->_provider); } /** @@ -75,10 +49,7 @@ public function addArticle(): AddArticle */ public function addLink(): AddLink { - if (!$this->addLink) { - $this->addLink = new AddLink($this->_provider); - } - return $this->addLink; + return new AddLink($this->_provider); } /** @@ -86,10 +57,7 @@ public function addLink(): AddLink */ public function addPage(): AddPage { - if (!$this->addPage) { - $this->addPage = new AddPage($this->_provider); - } - return $this->addPage; + return new AddPage($this->_provider); } /** @@ -97,10 +65,7 @@ public function addPage(): AddPage */ public function addPost(): AddPost { - if (!$this->addPost) { - $this->addPost = new AddPost($this->_provider); - } - return $this->addPost; + return new AddPost($this->_provider); } /** @@ -108,10 +73,7 @@ public function addPost(): AddPost */ public function addProduct(): AddProduct { - if (!$this->addProduct) { - $this->addProduct = new AddProduct($this->_provider); - } - return $this->addProduct; + return new AddProduct($this->_provider); } /** @@ -119,10 +81,7 @@ public function addProduct(): AddProduct */ public function addTag(): AddTag { - if (!$this->addTag) { - $this->addTag = new AddTag($this->_provider); - } - return $this->addTag; + return new AddTag($this->_provider); } /** @@ -130,10 +89,7 @@ public function addTag(): AddTag */ public function addVideo(): AddVideo { - if (!$this->addVideo) { - $this->addVideo = new AddVideo($this->_provider); - } - return $this->addVideo; + return new AddVideo($this->_provider); } /** @@ -141,10 +97,7 @@ public function addVideo(): AddVideo */ public function editTag(): EditTag { - if (!$this->editTag) { - $this->editTag = new EditTag($this->_provider); - } - return $this->editTag; + return new EditTag($this->_provider); } /** @@ -152,10 +105,7 @@ public function editTag(): EditTag */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -163,10 +113,7 @@ public function get(): Get */ public function getPages(): GetPages { - if (!$this->getPages) { - $this->getPages = new GetPages($this->_provider); - } - return $this->getPages; + return new GetPages($this->_provider); } /** @@ -174,10 +121,7 @@ public function getPages(): GetPages */ public function getTags(): GetTags { - if (!$this->getTags) { - $this->getTags = new GetTags($this->_provider); - } - return $this->getTags; + return new GetTags($this->_provider); } /** @@ -185,10 +129,7 @@ public function getTags(): GetTags */ public function markSeen(): MarkSeen { - if (!$this->markSeen) { - $this->markSeen = new MarkSeen($this->_provider); - } - return $this->markSeen; + return new MarkSeen($this->_provider); } /** @@ -196,10 +137,7 @@ public function markSeen(): MarkSeen */ public function removeArticle(): RemoveArticle { - if (!$this->removeArticle) { - $this->removeArticle = new RemoveArticle($this->_provider); - } - return $this->removeArticle; + return new RemoveArticle($this->_provider); } /** @@ -207,10 +145,7 @@ public function removeArticle(): RemoveArticle */ public function removeLink(): RemoveLink { - if (!$this->removeLink) { - $this->removeLink = new RemoveLink($this->_provider); - } - return $this->removeLink; + return new RemoveLink($this->_provider); } /** @@ -218,10 +153,7 @@ public function removeLink(): RemoveLink */ public function removePage(): RemovePage { - if (!$this->removePage) { - $this->removePage = new RemovePage($this->_provider); - } - return $this->removePage; + return new RemovePage($this->_provider); } /** @@ -229,10 +161,7 @@ public function removePage(): RemovePage */ public function removePost(): RemovePost { - if (!$this->removePost) { - $this->removePost = new RemovePost($this->_provider); - } - return $this->removePost; + return new RemovePost($this->_provider); } /** @@ -240,10 +169,7 @@ public function removePost(): RemovePost */ public function removeProduct(): RemoveProduct { - if (!$this->removeProduct) { - $this->removeProduct = new RemoveProduct($this->_provider); - } - return $this->removeProduct; + return new RemoveProduct($this->_provider); } /** @@ -251,10 +177,7 @@ public function removeProduct(): RemoveProduct */ public function removeTag(): RemoveTag { - if (!$this->removeTag) { - $this->removeTag = new RemoveTag($this->_provider); - } - return $this->removeTag; + return new RemoveTag($this->_provider); } /** @@ -262,10 +185,7 @@ public function removeTag(): RemoveTag */ public function reorderTags(): ReorderTags { - if (!$this->reorderTags) { - $this->reorderTags = new ReorderTags($this->_provider); - } - return $this->reorderTags; + return new ReorderTags($this->_provider); } /** @@ -273,10 +193,7 @@ public function reorderTags(): ReorderTags */ public function setPageTags(): SetPageTags { - if (!$this->setPageTags) { - $this->setPageTags = new SetPageTags($this->_provider); - } - return $this->setPageTags; + return new SetPageTags($this->_provider); } /** @@ -284,10 +201,7 @@ public function setPageTags(): SetPageTags */ public function setTags(): SetTags { - if (!$this->setTags) { - $this->setTags = new SetTags($this->_provider); - } - return $this->setTags; + return new SetTags($this->_provider); } /** @@ -295,10 +209,7 @@ public function setTags(): SetTags */ public function trackPageInteraction(): TrackPageInteraction { - if (!$this->trackPageInteraction) { - $this->trackPageInteraction = new TrackPageInteraction($this->_provider); - } - return $this->trackPageInteraction; + return new TrackPageInteraction($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddArticle.php b/src/ReactPHPVK/Actions/Sections/Fave/AddArticle.php index 0843457..bd46c85 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddArticle.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddArticle.php @@ -46,7 +46,7 @@ public function setUrl(string $value): AddArticle * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddLink.php b/src/ReactPHPVK/Actions/Sections/Fave/AddLink.php index 9979b5d..ff1d1b6 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddLink.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddLink.php @@ -48,7 +48,7 @@ public function setLink(string $value): AddLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddPage.php b/src/ReactPHPVK/Actions/Sections/Fave/AddPage.php index d21e4b5..706761b 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddPage.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddPage.php @@ -57,7 +57,7 @@ public function setGroupId(int $value): AddPage * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddPost.php b/src/ReactPHPVK/Actions/Sections/Fave/AddPost.php index 87f81ab..616a66c 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddPost.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddPost.php @@ -68,7 +68,7 @@ public function setAccessKey(string $value): AddPost * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddProduct.php b/src/ReactPHPVK/Actions/Sections/Fave/AddProduct.php index 6298e4c..f8bc596 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddProduct.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddProduct.php @@ -68,7 +68,7 @@ public function setAccessKey(string $value): AddProduct * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddTag.php b/src/ReactPHPVK/Actions/Sections/Fave/AddTag.php index fbd1701..9edf91e 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddTag.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddTag.php @@ -57,7 +57,7 @@ public function setPosition(string $value): AddTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/AddVideo.php b/src/ReactPHPVK/Actions/Sections/Fave/AddVideo.php index c281a04..da49ff2 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/AddVideo.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/AddVideo.php @@ -68,7 +68,7 @@ public function setAccessKey(string $value): AddVideo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/EditTag.php b/src/ReactPHPVK/Actions/Sections/Fave/EditTag.php index 0b2fe55..7e243d2 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/EditTag.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/EditTag.php @@ -57,7 +57,7 @@ public function setName(string $value): EditTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/Get.php b/src/ReactPHPVK/Actions/Sections/Fave/Get.php index 3b99821..7c38fa1 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/Get.php @@ -120,7 +120,7 @@ public function setIsFromSnackbar(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/GetPages.php b/src/ReactPHPVK/Actions/Sections/Fave/GetPages.php index b1d3797..0cd659a 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/GetPages.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/GetPages.php @@ -90,7 +90,7 @@ public function setTagId(int $value): GetPages * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/GetTags.php b/src/ReactPHPVK/Actions/Sections/Fave/GetTags.php index de70ad9..6b7505b 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/GetTags.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/GetTags.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/MarkSeen.php b/src/ReactPHPVK/Actions/Sections/Fave/MarkSeen.php index 37461df..fdcb8d7 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/MarkSeen.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/MarkSeen.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): MarkSeen * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemoveArticle.php b/src/ReactPHPVK/Actions/Sections/Fave/RemoveArticle.php index 5a40763..58059b7 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemoveArticle.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemoveArticle.php @@ -57,7 +57,7 @@ public function setArticleId(int $value): RemoveArticle * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemoveLink.php b/src/ReactPHPVK/Actions/Sections/Fave/RemoveLink.php index 9ce7747..0e66aef 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemoveLink.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemoveLink.php @@ -61,7 +61,7 @@ public function setLink(string $value): RemoveLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemovePage.php b/src/ReactPHPVK/Actions/Sections/Fave/RemovePage.php index f973ab4..eb0a6fe 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemovePage.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemovePage.php @@ -57,7 +57,7 @@ public function setGroupId(int $value): RemovePage * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemovePost.php b/src/ReactPHPVK/Actions/Sections/Fave/RemovePost.php index 28f5c33..0fc69a8 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemovePost.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemovePost.php @@ -57,7 +57,7 @@ public function setId(int $value): RemovePost * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemoveProduct.php b/src/ReactPHPVK/Actions/Sections/Fave/RemoveProduct.php index bf886e8..f931350 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemoveProduct.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemoveProduct.php @@ -57,7 +57,7 @@ public function setId(int $value): RemoveProduct * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/RemoveTag.php b/src/ReactPHPVK/Actions/Sections/Fave/RemoveTag.php index e3555bf..ba71bc6 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/RemoveTag.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/RemoveTag.php @@ -46,7 +46,7 @@ public function setId(int $value): RemoveTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/ReorderTags.php b/src/ReactPHPVK/Actions/Sections/Fave/ReorderTags.php index 7a394de..f05a852 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/ReorderTags.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/ReorderTags.php @@ -46,7 +46,7 @@ public function setIds(array $value): ReorderTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/SetPageTags.php b/src/ReactPHPVK/Actions/Sections/Fave/SetPageTags.php index 9d161e7..be1d290 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/SetPageTags.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/SetPageTags.php @@ -68,7 +68,7 @@ public function setTagIds(array $value): SetPageTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/SetTags.php b/src/ReactPHPVK/Actions/Sections/Fave/SetTags.php index 56019e1..89a7bff 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/SetTags.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/SetTags.php @@ -101,7 +101,7 @@ public function setLinkUrl(string $value): SetTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Fave/TrackPageInteraction.php b/src/ReactPHPVK/Actions/Sections/Fave/TrackPageInteraction.php index b2fc141..9f36209 100644 --- a/src/ReactPHPVK/Actions/Sections/Fave/TrackPageInteraction.php +++ b/src/ReactPHPVK/Actions/Sections/Fave/TrackPageInteraction.php @@ -57,7 +57,7 @@ public function setGroupId(int $value): TrackPageInteraction * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends.php b/src/ReactPHPVK/Actions/Sections/Friends.php index 9f7bd9d..2baee4f 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends.php +++ b/src/ReactPHPVK/Actions/Sections/Friends.php @@ -27,25 +27,6 @@ class Friends { private Provider $_provider; - private ?Friends\Add $add = null; - private ?Friends\AddList $addList = null; - private ?Friends\AreFriends $areFriends = null; - private ?Friends\Delete $delete = null; - private ?Friends\DeleteAllRequests $deleteAllRequests = null; - private ?Friends\DeleteList $deleteList = null; - private ?Friends\Edit $edit = null; - private ?Friends\EditList $editList = null; - private ?Friends\Get $get = null; - private ?Friends\GetAppUsers $getAppUsers = null; - private ?Friends\GetByPhones $getByPhones = null; - private ?Friends\GetLists $getLists = null; - private ?Friends\GetMutual $getMutual = null; - private ?Friends\GetOnline $getOnline = null; - private ?Friends\GetRecent $getRecent = null; - private ?Friends\GetRequests $getRequests = null; - private ?Friends\GetSuggestions $getSuggestions = null; - private ?Friends\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -56,10 +37,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -67,10 +45,7 @@ public function add(): Add */ public function addList(): AddList { - if (!$this->addList) { - $this->addList = new AddList($this->_provider); - } - return $this->addList; + return new AddList($this->_provider); } /** @@ -78,10 +53,7 @@ public function addList(): AddList */ public function areFriends(): AreFriends { - if (!$this->areFriends) { - $this->areFriends = new AreFriends($this->_provider); - } - return $this->areFriends; + return new AreFriends($this->_provider); } /** @@ -89,10 +61,7 @@ public function areFriends(): AreFriends */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -100,10 +69,7 @@ public function delete(): Delete */ public function deleteAllRequests(): DeleteAllRequests { - if (!$this->deleteAllRequests) { - $this->deleteAllRequests = new DeleteAllRequests($this->_provider); - } - return $this->deleteAllRequests; + return new DeleteAllRequests($this->_provider); } /** @@ -111,10 +77,7 @@ public function deleteAllRequests(): DeleteAllRequests */ public function deleteList(): DeleteList { - if (!$this->deleteList) { - $this->deleteList = new DeleteList($this->_provider); - } - return $this->deleteList; + return new DeleteList($this->_provider); } /** @@ -122,10 +85,7 @@ public function deleteList(): DeleteList */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -133,10 +93,7 @@ public function edit(): Edit */ public function editList(): EditList { - if (!$this->editList) { - $this->editList = new EditList($this->_provider); - } - return $this->editList; + return new EditList($this->_provider); } /** @@ -144,10 +101,7 @@ public function editList(): EditList */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -155,10 +109,7 @@ public function get(): Get */ public function getAppUsers(): GetAppUsers { - if (!$this->getAppUsers) { - $this->getAppUsers = new GetAppUsers($this->_provider); - } - return $this->getAppUsers; + return new GetAppUsers($this->_provider); } /** @@ -166,10 +117,7 @@ public function getAppUsers(): GetAppUsers */ public function getByPhones(): GetByPhones { - if (!$this->getByPhones) { - $this->getByPhones = new GetByPhones($this->_provider); - } - return $this->getByPhones; + return new GetByPhones($this->_provider); } /** @@ -177,10 +125,7 @@ public function getByPhones(): GetByPhones */ public function getLists(): GetLists { - if (!$this->getLists) { - $this->getLists = new GetLists($this->_provider); - } - return $this->getLists; + return new GetLists($this->_provider); } /** @@ -188,10 +133,7 @@ public function getLists(): GetLists */ public function getMutual(): GetMutual { - if (!$this->getMutual) { - $this->getMutual = new GetMutual($this->_provider); - } - return $this->getMutual; + return new GetMutual($this->_provider); } /** @@ -199,10 +141,7 @@ public function getMutual(): GetMutual */ public function getOnline(): GetOnline { - if (!$this->getOnline) { - $this->getOnline = new GetOnline($this->_provider); - } - return $this->getOnline; + return new GetOnline($this->_provider); } /** @@ -210,10 +149,7 @@ public function getOnline(): GetOnline */ public function getRecent(): GetRecent { - if (!$this->getRecent) { - $this->getRecent = new GetRecent($this->_provider); - } - return $this->getRecent; + return new GetRecent($this->_provider); } /** @@ -221,10 +157,7 @@ public function getRecent(): GetRecent */ public function getRequests(): GetRequests { - if (!$this->getRequests) { - $this->getRequests = new GetRequests($this->_provider); - } - return $this->getRequests; + return new GetRequests($this->_provider); } /** @@ -232,10 +165,7 @@ public function getRequests(): GetRequests */ public function getSuggestions(): GetSuggestions { - if (!$this->getSuggestions) { - $this->getSuggestions = new GetSuggestions($this->_provider); - } - return $this->getSuggestions; + return new GetSuggestions($this->_provider); } /** @@ -243,10 +173,7 @@ public function getSuggestions(): GetSuggestions */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Friends/Add.php b/src/ReactPHPVK/Actions/Sections/Friends/Add.php index 2fd13e4..5913a09 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/Add.php @@ -74,7 +74,7 @@ public function setFollow(bool $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/AddList.php b/src/ReactPHPVK/Actions/Sections/Friends/AddList.php index 07775f6..0217c71 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/AddList.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/AddList.php @@ -61,7 +61,7 @@ public function setUserIds(array $value): AddList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/AreFriends.php b/src/ReactPHPVK/Actions/Sections/Friends/AreFriends.php index a6a524d..8fb5fa8 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/AreFriends.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/AreFriends.php @@ -74,7 +74,7 @@ public function setExtended(bool $value): AreFriends * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/Delete.php b/src/ReactPHPVK/Actions/Sections/Friends/Delete.php index 0102fa8..5f2f055 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/Delete.php @@ -48,7 +48,7 @@ public function setUserId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/DeleteAllRequests.php b/src/ReactPHPVK/Actions/Sections/Friends/DeleteAllRequests.php index 19730fd..9121645 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/DeleteAllRequests.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/DeleteAllRequests.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): DeleteAllRequests * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/DeleteList.php b/src/ReactPHPVK/Actions/Sections/Friends/DeleteList.php index d7c6c3d..a901a33 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/DeleteList.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/DeleteList.php @@ -48,7 +48,7 @@ public function setListId(int $value): DeleteList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/Edit.php b/src/ReactPHPVK/Actions/Sections/Friends/Edit.php index a7b54db..a0043ac 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/Edit.php @@ -61,7 +61,7 @@ public function setListIds(array $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/EditList.php b/src/ReactPHPVK/Actions/Sections/Friends/EditList.php index 9ddc94d..e2206ef 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/EditList.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/EditList.php @@ -100,7 +100,7 @@ public function setDeleteUserIds(array $value): EditList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/Get.php b/src/ReactPHPVK/Actions/Sections/Friends/Get.php index d0835e8..c092610 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/Get.php @@ -137,7 +137,7 @@ public function setRef(string $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetAppUsers.php b/src/ReactPHPVK/Actions/Sections/Friends/GetAppUsers.php index 2b2e6f2..9a57edd 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetAppUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetAppUsers.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetAppUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetByPhones.php b/src/ReactPHPVK/Actions/Sections/Friends/GetByPhones.php index 9c212b9..dc344e5 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetByPhones.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetByPhones.php @@ -61,7 +61,7 @@ public function setFields(array $value): GetByPhones * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetLists.php b/src/ReactPHPVK/Actions/Sections/Friends/GetLists.php index 0ba1d1d..d135aac 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetLists.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetLists.php @@ -61,7 +61,7 @@ public function setReturnSystem(bool $value): GetLists * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetMutual.php b/src/ReactPHPVK/Actions/Sections/Friends/GetMutual.php index 1b2f939..f39ce42 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetMutual.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetMutual.php @@ -113,7 +113,7 @@ public function setOffset(int $value): GetMutual * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetOnline.php b/src/ReactPHPVK/Actions/Sections/Friends/GetOnline.php index 64082c6..1c1143a 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetOnline.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetOnline.php @@ -113,7 +113,7 @@ public function setOffset(int $value): GetOnline * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetRecent.php b/src/ReactPHPVK/Actions/Sections/Friends/GetRecent.php index 13c917d..57575f0 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetRecent.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetRecent.php @@ -48,7 +48,7 @@ public function setCount(int $value): GetRecent * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetRequests.php b/src/ReactPHPVK/Actions/Sections/Friends/GetRequests.php index 4b93314..14a8cc3 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetRequests.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetRequests.php @@ -159,7 +159,7 @@ public function setFields(array $value): GetRequests * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/GetSuggestions.php b/src/ReactPHPVK/Actions/Sections/Friends/GetSuggestions.php index b7656b7..fec27a7 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/GetSuggestions.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/GetSuggestions.php @@ -100,7 +100,7 @@ public function setNameCase(string $value): GetSuggestions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Friends/Search.php b/src/ReactPHPVK/Actions/Sections/Friends/Search.php index ea803dd..5e43c83 100644 --- a/src/ReactPHPVK/Actions/Sections/Friends/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Friends/Search.php @@ -113,7 +113,7 @@ public function setCount(int $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Gifts.php b/src/ReactPHPVK/Actions/Sections/Gifts.php index fce8f49..159d719 100644 --- a/src/ReactPHPVK/Actions/Sections/Gifts.php +++ b/src/ReactPHPVK/Actions/Sections/Gifts.php @@ -10,8 +10,6 @@ class Gifts { private Provider $_provider; - private ?Gifts\Get $get = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -22,10 +20,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Gifts/Get.php b/src/ReactPHPVK/Actions/Sections/Gifts/Get.php index 01d85ad..a3fb228 100644 --- a/src/ReactPHPVK/Actions/Sections/Gifts/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Gifts/Get.php @@ -74,7 +74,7 @@ public function setOffset(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups.php b/src/ReactPHPVK/Actions/Sections/Groups.php index c2d8766..e99355b 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups.php +++ b/src/ReactPHPVK/Actions/Sections/Groups.php @@ -51,49 +51,6 @@ class Groups { private Provider $_provider; - private ?Groups\AddAddress $addAddress = null; - private ?Groups\AddCallbackServer $addCallbackServer = null; - private ?Groups\AddLink $addLink = null; - private ?Groups\ApproveRequest $approveRequest = null; - private ?Groups\Ban $ban = null; - private ?Groups\Create $create = null; - private ?Groups\DeleteCallbackServer $deleteCallbackServer = null; - private ?Groups\DeleteLink $deleteLink = null; - private ?Groups\DisableOnline $disableOnline = null; - private ?Groups\Edit $edit = null; - private ?Groups\EditAddress $editAddress = null; - private ?Groups\EditCallbackServer $editCallbackServer = null; - private ?Groups\EditLink $editLink = null; - private ?Groups\EditManager $editManager = null; - private ?Groups\EnableOnline $enableOnline = null; - private ?Groups\Get $get = null; - private ?Groups\GetAddresses $getAddresses = null; - private ?Groups\GetBanned $getBanned = null; - private ?Groups\GetById $getById = null; - private ?Groups\GetCallbackConfirmationCode $getCallbackConfirmationCode = null; - private ?Groups\GetCallbackServers $getCallbackServers = null; - private ?Groups\GetCallbackSettings $getCallbackSettings = null; - private ?Groups\GetCatalog $getCatalog = null; - private ?Groups\GetCatalogInfo $getCatalogInfo = null; - private ?Groups\GetInvitedUsers $getInvitedUsers = null; - private ?Groups\GetInvites $getInvites = null; - private ?Groups\GetLongPollServer $getLongPollServer = null; - private ?Groups\GetLongPollSettings $getLongPollSettings = null; - private ?Groups\GetMembers $getMembers = null; - private ?Groups\GetRequests $getRequests = null; - private ?Groups\GetSettings $getSettings = null; - private ?Groups\GetTokenPermissions $getTokenPermissions = null; - private ?Groups\Invite $invite = null; - private ?Groups\IsMember $isMember = null; - private ?Groups\Join $join = null; - private ?Groups\Leave $leave = null; - private ?Groups\RemoveUser $removeUser = null; - private ?Groups\ReorderLink $reorderLink = null; - private ?Groups\Search $search = null; - private ?Groups\SetCallbackSettings $setCallbackSettings = null; - private ?Groups\SetLongPollSettings $setLongPollSettings = null; - private ?Groups\Unban $unban = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -104,10 +61,7 @@ public function __construct(Provider $provider) */ public function addAddress(): AddAddress { - if (!$this->addAddress) { - $this->addAddress = new AddAddress($this->_provider); - } - return $this->addAddress; + return new AddAddress($this->_provider); } /** @@ -115,10 +69,7 @@ public function addAddress(): AddAddress */ public function addCallbackServer(): AddCallbackServer { - if (!$this->addCallbackServer) { - $this->addCallbackServer = new AddCallbackServer($this->_provider); - } - return $this->addCallbackServer; + return new AddCallbackServer($this->_provider); } /** @@ -126,10 +77,7 @@ public function addCallbackServer(): AddCallbackServer */ public function addLink(): AddLink { - if (!$this->addLink) { - $this->addLink = new AddLink($this->_provider); - } - return $this->addLink; + return new AddLink($this->_provider); } /** @@ -137,10 +85,7 @@ public function addLink(): AddLink */ public function approveRequest(): ApproveRequest { - if (!$this->approveRequest) { - $this->approveRequest = new ApproveRequest($this->_provider); - } - return $this->approveRequest; + return new ApproveRequest($this->_provider); } /** @@ -148,10 +93,7 @@ public function approveRequest(): ApproveRequest */ public function ban(): Ban { - if (!$this->ban) { - $this->ban = new Ban($this->_provider); - } - return $this->ban; + return new Ban($this->_provider); } /** @@ -159,10 +101,7 @@ public function ban(): Ban */ public function create(): Create { - if (!$this->create) { - $this->create = new Create($this->_provider); - } - return $this->create; + return new Create($this->_provider); } /** @@ -170,10 +109,7 @@ public function create(): Create */ public function deleteCallbackServer(): DeleteCallbackServer { - if (!$this->deleteCallbackServer) { - $this->deleteCallbackServer = new DeleteCallbackServer($this->_provider); - } - return $this->deleteCallbackServer; + return new DeleteCallbackServer($this->_provider); } /** @@ -181,10 +117,7 @@ public function deleteCallbackServer(): DeleteCallbackServer */ public function deleteLink(): DeleteLink { - if (!$this->deleteLink) { - $this->deleteLink = new DeleteLink($this->_provider); - } - return $this->deleteLink; + return new DeleteLink($this->_provider); } /** @@ -192,10 +125,7 @@ public function deleteLink(): DeleteLink */ public function disableOnline(): DisableOnline { - if (!$this->disableOnline) { - $this->disableOnline = new DisableOnline($this->_provider); - } - return $this->disableOnline; + return new DisableOnline($this->_provider); } /** @@ -203,10 +133,7 @@ public function disableOnline(): DisableOnline */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -214,10 +141,7 @@ public function edit(): Edit */ public function editAddress(): EditAddress { - if (!$this->editAddress) { - $this->editAddress = new EditAddress($this->_provider); - } - return $this->editAddress; + return new EditAddress($this->_provider); } /** @@ -225,10 +149,7 @@ public function editAddress(): EditAddress */ public function editCallbackServer(): EditCallbackServer { - if (!$this->editCallbackServer) { - $this->editCallbackServer = new EditCallbackServer($this->_provider); - } - return $this->editCallbackServer; + return new EditCallbackServer($this->_provider); } /** @@ -236,10 +157,7 @@ public function editCallbackServer(): EditCallbackServer */ public function editLink(): EditLink { - if (!$this->editLink) { - $this->editLink = new EditLink($this->_provider); - } - return $this->editLink; + return new EditLink($this->_provider); } /** @@ -247,10 +165,7 @@ public function editLink(): EditLink */ public function editManager(): EditManager { - if (!$this->editManager) { - $this->editManager = new EditManager($this->_provider); - } - return $this->editManager; + return new EditManager($this->_provider); } /** @@ -258,10 +173,7 @@ public function editManager(): EditManager */ public function enableOnline(): EnableOnline { - if (!$this->enableOnline) { - $this->enableOnline = new EnableOnline($this->_provider); - } - return $this->enableOnline; + return new EnableOnline($this->_provider); } /** @@ -269,10 +181,7 @@ public function enableOnline(): EnableOnline */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -280,10 +189,7 @@ public function get(): Get */ public function getAddresses(): GetAddresses { - if (!$this->getAddresses) { - $this->getAddresses = new GetAddresses($this->_provider); - } - return $this->getAddresses; + return new GetAddresses($this->_provider); } /** @@ -291,10 +197,7 @@ public function getAddresses(): GetAddresses */ public function getBanned(): GetBanned { - if (!$this->getBanned) { - $this->getBanned = new GetBanned($this->_provider); - } - return $this->getBanned; + return new GetBanned($this->_provider); } /** @@ -302,10 +205,7 @@ public function getBanned(): GetBanned */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -313,10 +213,7 @@ public function getById(): GetById */ public function getCallbackConfirmationCode(): GetCallbackConfirmationCode { - if (!$this->getCallbackConfirmationCode) { - $this->getCallbackConfirmationCode = new GetCallbackConfirmationCode($this->_provider); - } - return $this->getCallbackConfirmationCode; + return new GetCallbackConfirmationCode($this->_provider); } /** @@ -324,10 +221,7 @@ public function getCallbackConfirmationCode(): GetCallbackConfirmationCode */ public function getCallbackServers(): GetCallbackServers { - if (!$this->getCallbackServers) { - $this->getCallbackServers = new GetCallbackServers($this->_provider); - } - return $this->getCallbackServers; + return new GetCallbackServers($this->_provider); } /** @@ -335,10 +229,7 @@ public function getCallbackServers(): GetCallbackServers */ public function getCallbackSettings(): GetCallbackSettings { - if (!$this->getCallbackSettings) { - $this->getCallbackSettings = new GetCallbackSettings($this->_provider); - } - return $this->getCallbackSettings; + return new GetCallbackSettings($this->_provider); } /** @@ -346,10 +237,7 @@ public function getCallbackSettings(): GetCallbackSettings */ public function getCatalog(): GetCatalog { - if (!$this->getCatalog) { - $this->getCatalog = new GetCatalog($this->_provider); - } - return $this->getCatalog; + return new GetCatalog($this->_provider); } /** @@ -357,10 +245,7 @@ public function getCatalog(): GetCatalog */ public function getCatalogInfo(): GetCatalogInfo { - if (!$this->getCatalogInfo) { - $this->getCatalogInfo = new GetCatalogInfo($this->_provider); - } - return $this->getCatalogInfo; + return new GetCatalogInfo($this->_provider); } /** @@ -368,10 +253,7 @@ public function getCatalogInfo(): GetCatalogInfo */ public function getInvitedUsers(): GetInvitedUsers { - if (!$this->getInvitedUsers) { - $this->getInvitedUsers = new GetInvitedUsers($this->_provider); - } - return $this->getInvitedUsers; + return new GetInvitedUsers($this->_provider); } /** @@ -379,10 +261,7 @@ public function getInvitedUsers(): GetInvitedUsers */ public function getInvites(): GetInvites { - if (!$this->getInvites) { - $this->getInvites = new GetInvites($this->_provider); - } - return $this->getInvites; + return new GetInvites($this->_provider); } /** @@ -390,10 +269,7 @@ public function getInvites(): GetInvites */ public function getLongPollServer(): GetLongPollServer { - if (!$this->getLongPollServer) { - $this->getLongPollServer = new GetLongPollServer($this->_provider); - } - return $this->getLongPollServer; + return new GetLongPollServer($this->_provider); } /** @@ -401,10 +277,7 @@ public function getLongPollServer(): GetLongPollServer */ public function getLongPollSettings(): GetLongPollSettings { - if (!$this->getLongPollSettings) { - $this->getLongPollSettings = new GetLongPollSettings($this->_provider); - } - return $this->getLongPollSettings; + return new GetLongPollSettings($this->_provider); } /** @@ -412,10 +285,7 @@ public function getLongPollSettings(): GetLongPollSettings */ public function getMembers(): GetMembers { - if (!$this->getMembers) { - $this->getMembers = new GetMembers($this->_provider); - } - return $this->getMembers; + return new GetMembers($this->_provider); } /** @@ -423,10 +293,7 @@ public function getMembers(): GetMembers */ public function getRequests(): GetRequests { - if (!$this->getRequests) { - $this->getRequests = new GetRequests($this->_provider); - } - return $this->getRequests; + return new GetRequests($this->_provider); } /** @@ -434,10 +301,7 @@ public function getRequests(): GetRequests */ public function getSettings(): GetSettings { - if (!$this->getSettings) { - $this->getSettings = new GetSettings($this->_provider); - } - return $this->getSettings; + return new GetSettings($this->_provider); } /** @@ -445,10 +309,7 @@ public function getSettings(): GetSettings */ public function getTokenPermissions(): GetTokenPermissions { - if (!$this->getTokenPermissions) { - $this->getTokenPermissions = new GetTokenPermissions($this->_provider); - } - return $this->getTokenPermissions; + return new GetTokenPermissions($this->_provider); } /** @@ -456,10 +317,7 @@ public function getTokenPermissions(): GetTokenPermissions */ public function invite(): Invite { - if (!$this->invite) { - $this->invite = new Invite($this->_provider); - } - return $this->invite; + return new Invite($this->_provider); } /** @@ -467,10 +325,7 @@ public function invite(): Invite */ public function isMember(): IsMember { - if (!$this->isMember) { - $this->isMember = new IsMember($this->_provider); - } - return $this->isMember; + return new IsMember($this->_provider); } /** @@ -478,10 +333,7 @@ public function isMember(): IsMember */ public function join(): Join { - if (!$this->join) { - $this->join = new Join($this->_provider); - } - return $this->join; + return new Join($this->_provider); } /** @@ -489,10 +341,7 @@ public function join(): Join */ public function leave(): Leave { - if (!$this->leave) { - $this->leave = new Leave($this->_provider); - } - return $this->leave; + return new Leave($this->_provider); } /** @@ -500,10 +349,7 @@ public function leave(): Leave */ public function removeUser(): RemoveUser { - if (!$this->removeUser) { - $this->removeUser = new RemoveUser($this->_provider); - } - return $this->removeUser; + return new RemoveUser($this->_provider); } /** @@ -511,10 +357,7 @@ public function removeUser(): RemoveUser */ public function reorderLink(): ReorderLink { - if (!$this->reorderLink) { - $this->reorderLink = new ReorderLink($this->_provider); - } - return $this->reorderLink; + return new ReorderLink($this->_provider); } /** @@ -522,10 +365,7 @@ public function reorderLink(): ReorderLink */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } /** @@ -533,10 +373,7 @@ public function search(): Search */ public function setCallbackSettings(): SetCallbackSettings { - if (!$this->setCallbackSettings) { - $this->setCallbackSettings = new SetCallbackSettings($this->_provider); - } - return $this->setCallbackSettings; + return new SetCallbackSettings($this->_provider); } /** @@ -544,10 +381,7 @@ public function setCallbackSettings(): SetCallbackSettings */ public function setLongPollSettings(): SetLongPollSettings { - if (!$this->setLongPollSettings) { - $this->setLongPollSettings = new SetLongPollSettings($this->_provider); - } - return $this->setLongPollSettings; + return new SetLongPollSettings($this->_provider); } /** @@ -555,10 +389,7 @@ public function setLongPollSettings(): SetLongPollSettings */ public function unban(): Unban { - if (!$this->unban) { - $this->unban = new Unban($this->_provider); - } - return $this->unban; + return new Unban($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Groups/AddAddress.php b/src/ReactPHPVK/Actions/Sections/Groups/AddAddress.php index a1d0ba0..58c9a15 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/AddAddress.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/AddAddress.php @@ -178,7 +178,7 @@ public function setIsMainAddress(bool $value): AddAddress * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/AddCallbackServer.php b/src/ReactPHPVK/Actions/Sections/Groups/AddCallbackServer.php index b8a65fc..9660e45 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/AddCallbackServer.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/AddCallbackServer.php @@ -79,7 +79,7 @@ public function setSecretKey(string $value): AddCallbackServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/AddLink.php b/src/ReactPHPVK/Actions/Sections/Groups/AddLink.php index 2c67ebc..d92ca50 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/AddLink.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/AddLink.php @@ -74,7 +74,7 @@ public function setText(string $value): AddLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/ApproveRequest.php b/src/ReactPHPVK/Actions/Sections/Groups/ApproveRequest.php index 66dfbbb..3c2c58f 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/ApproveRequest.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/ApproveRequest.php @@ -61,7 +61,7 @@ public function setUserId(int $value): ApproveRequest * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Ban.php b/src/ReactPHPVK/Actions/Sections/Groups/Ban.php index cbc4de9..0b82aae 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Ban.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Ban.php @@ -101,7 +101,7 @@ public function setCommentVisible(bool $value): Ban * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Create.php b/src/ReactPHPVK/Actions/Sections/Groups/Create.php index 4baf0a3..f8d8947 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Create.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Create.php @@ -100,7 +100,7 @@ public function setSubtype(int $value): Create * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/DeleteCallbackServer.php b/src/ReactPHPVK/Actions/Sections/Groups/DeleteCallbackServer.php index 60ef71a..5f03b3e 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/DeleteCallbackServer.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/DeleteCallbackServer.php @@ -57,7 +57,7 @@ public function setServerId(int $value): DeleteCallbackServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/DeleteLink.php b/src/ReactPHPVK/Actions/Sections/Groups/DeleteLink.php index 6c81a3a..9fe4b31 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/DeleteLink.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/DeleteLink.php @@ -61,7 +61,7 @@ public function setLinkId(int $value): DeleteLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/DisableOnline.php b/src/ReactPHPVK/Actions/Sections/Groups/DisableOnline.php index 6642cce..485f6dc 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/DisableOnline.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/DisableOnline.php @@ -46,7 +46,7 @@ public function setGroupId(int $value): DisableOnline * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Edit.php b/src/ReactPHPVK/Actions/Sections/Groups/Edit.php index 0d124f1..459dc06 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Edit.php @@ -612,7 +612,7 @@ public function setCity(int $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/EditAddress.php b/src/ReactPHPVK/Actions/Sections/Groups/EditAddress.php index 3706159..a4d5120 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/EditAddress.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/EditAddress.php @@ -189,7 +189,7 @@ public function setIsMainAddress(bool $value): EditAddress * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/EditCallbackServer.php b/src/ReactPHPVK/Actions/Sections/Groups/EditCallbackServer.php index 23d0429..c363616 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/EditCallbackServer.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/EditCallbackServer.php @@ -90,7 +90,7 @@ public function setSecretKey(string $value): EditCallbackServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/EditLink.php b/src/ReactPHPVK/Actions/Sections/Groups/EditLink.php index 49a6dff..7259e2c 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/EditLink.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/EditLink.php @@ -74,7 +74,7 @@ public function setText(string $value): EditLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/EditManager.php b/src/ReactPHPVK/Actions/Sections/Groups/EditManager.php index 2c824f3..35689b9 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/EditManager.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/EditManager.php @@ -126,7 +126,7 @@ public function setContactEmail(string $value): EditManager * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/EnableOnline.php b/src/ReactPHPVK/Actions/Sections/Groups/EnableOnline.php index b9c0fa3..7397aee 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/EnableOnline.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/EnableOnline.php @@ -46,7 +46,7 @@ public function setGroupId(int $value): EnableOnline * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Get.php b/src/ReactPHPVK/Actions/Sections/Groups/Get.php index 2c7824c..3153950 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Get.php @@ -113,7 +113,7 @@ public function setCount(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetAddresses.php b/src/ReactPHPVK/Actions/Sections/Groups/GetAddresses.php index a74e1a5..273cacc 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetAddresses.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetAddresses.php @@ -124,7 +124,7 @@ public function setFields(array $value): GetAddresses * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetBanned.php b/src/ReactPHPVK/Actions/Sections/Groups/GetBanned.php index ac0610e..c927582 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetBanned.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetBanned.php @@ -96,7 +96,7 @@ public function setOwnerId(int $value): GetBanned * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetById.php b/src/ReactPHPVK/Actions/Sections/Groups/GetById.php index fb13061..c478dd2 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetById.php @@ -74,7 +74,7 @@ public function setFields(array $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackConfirmationCode.php b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackConfirmationCode.php index 930ba50..1b32eb2 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackConfirmationCode.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackConfirmationCode.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetCallbackConfirmationCode * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackServers.php b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackServers.php index 2a39421..f4e991b 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackServers.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackServers.php @@ -57,7 +57,7 @@ public function setServerIds(array $value): GetCallbackServers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackSettings.php b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackSettings.php index 816ac0f..9a26f59 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetCallbackSettings.php @@ -61,7 +61,7 @@ public function setServerId(int $value): GetCallbackSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetCatalog.php b/src/ReactPHPVK/Actions/Sections/Groups/GetCatalog.php index 38d017a..0916416 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetCatalog.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetCatalog.php @@ -61,7 +61,7 @@ public function setSubcategoryId(int $value): GetCatalog * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetCatalogInfo.php b/src/ReactPHPVK/Actions/Sections/Groups/GetCatalogInfo.php index cacda75..2f26954 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetCatalogInfo.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetCatalogInfo.php @@ -61,7 +61,7 @@ public function setSubcategories(bool $value): GetCatalogInfo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetInvitedUsers.php b/src/ReactPHPVK/Actions/Sections/Groups/GetInvitedUsers.php index 4dc0bb6..7652a20 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetInvitedUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetInvitedUsers.php @@ -100,7 +100,7 @@ public function setNameCase(string $value): GetInvitedUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetInvites.php b/src/ReactPHPVK/Actions/Sections/Groups/GetInvites.php index 6b9c873..88bd423 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetInvites.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetInvites.php @@ -74,7 +74,7 @@ public function setExtended(bool $value): GetInvites * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollServer.php b/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollServer.php index 2632330..29bded1 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollServer.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollServer.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetLongPollServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollSettings.php b/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollSettings.php index eb0822b..e0000c2 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetLongPollSettings.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetLongPollSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetMembers.php b/src/ReactPHPVK/Actions/Sections/Groups/GetMembers.php index 26a5ad5..88ac5d0 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetMembers.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetMembers.php @@ -113,7 +113,7 @@ public function setFilter(string $value): GetMembers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetRequests.php b/src/ReactPHPVK/Actions/Sections/Groups/GetRequests.php index a78332c..4441852 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetRequests.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetRequests.php @@ -87,7 +87,7 @@ public function setFields(array $value): GetRequests * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetSettings.php b/src/ReactPHPVK/Actions/Sections/Groups/GetSettings.php index 9e1fedf..ad28eb6 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetSettings.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/GetTokenPermissions.php b/src/ReactPHPVK/Actions/Sections/Groups/GetTokenPermissions.php index 8533799..a7193a3 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/GetTokenPermissions.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/GetTokenPermissions.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetTokenPermissions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Invite.php b/src/ReactPHPVK/Actions/Sections/Groups/Invite.php index 5f8d6e7..7aedc3b 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Invite.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Invite.php @@ -61,7 +61,7 @@ public function setUserId(int $value): Invite * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/IsMember.php b/src/ReactPHPVK/Actions/Sections/Groups/IsMember.php index 7e2017b..701e2dd 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/IsMember.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/IsMember.php @@ -87,7 +87,7 @@ public function setExtended(bool $value): IsMember * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Join.php b/src/ReactPHPVK/Actions/Sections/Groups/Join.php index 980824c..2a050c0 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Join.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Join.php @@ -61,7 +61,7 @@ public function setNotSure(string $value): Join * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Leave.php b/src/ReactPHPVK/Actions/Sections/Groups/Leave.php index 35c91bc..997c1f5 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Leave.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Leave.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): Leave * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/RemoveUser.php b/src/ReactPHPVK/Actions/Sections/Groups/RemoveUser.php index d01719f..e94671c 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/RemoveUser.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/RemoveUser.php @@ -61,7 +61,7 @@ public function setUserId(int $value): RemoveUser * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/ReorderLink.php b/src/ReactPHPVK/Actions/Sections/Groups/ReorderLink.php index 870513f..c02b977 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/ReorderLink.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/ReorderLink.php @@ -74,7 +74,7 @@ public function setAfter(int $value): ReorderLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Search.php b/src/ReactPHPVK/Actions/Sections/Groups/Search.php index c2ad35b..b228c79 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Search.php @@ -152,7 +152,7 @@ public function setCount(int $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/SetCallbackSettings.php b/src/ReactPHPVK/Actions/Sections/Groups/SetCallbackSettings.php index 961cad8..eec3a13 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/SetCallbackSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/SetCallbackSettings.php @@ -615,7 +615,7 @@ public function setMessageEvent(bool $value): SetCallbackSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/SetLongPollSettings.php b/src/ReactPHPVK/Actions/Sections/Groups/SetLongPollSettings.php index 3ad66e7..5e3d0bf 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/SetLongPollSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/SetLongPollSettings.php @@ -604,7 +604,7 @@ public function setMessageEvent(bool $value): SetLongPollSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Groups/Unban.php b/src/ReactPHPVK/Actions/Sections/Groups/Unban.php index 64e1147..ca265e4 100644 --- a/src/ReactPHPVK/Actions/Sections/Groups/Unban.php +++ b/src/ReactPHPVK/Actions/Sections/Groups/Unban.php @@ -57,7 +57,7 @@ public function setOwnerId(int $value): Unban * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads.php b/src/ReactPHPVK/Actions/Sections/Leads.php index 2de4d4d..0240b96 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads.php +++ b/src/ReactPHPVK/Actions/Sections/Leads.php @@ -15,13 +15,6 @@ class Leads { private Provider $_provider; - private ?Leads\CheckUser $checkUser = null; - private ?Leads\Complete $complete = null; - private ?Leads\GetStats $getStats = null; - private ?Leads\GetUsers $getUsers = null; - private ?Leads\MetricHit $metricHit = null; - private ?Leads\Start $start = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -32,10 +25,7 @@ public function __construct(Provider $provider) */ public function checkUser(): CheckUser { - if (!$this->checkUser) { - $this->checkUser = new CheckUser($this->_provider); - } - return $this->checkUser; + return new CheckUser($this->_provider); } /** @@ -43,10 +33,7 @@ public function checkUser(): CheckUser */ public function complete(): Complete { - if (!$this->complete) { - $this->complete = new Complete($this->_provider); - } - return $this->complete; + return new Complete($this->_provider); } /** @@ -54,10 +41,7 @@ public function complete(): Complete */ public function getStats(): GetStats { - if (!$this->getStats) { - $this->getStats = new GetStats($this->_provider); - } - return $this->getStats; + return new GetStats($this->_provider); } /** @@ -65,10 +49,7 @@ public function getStats(): GetStats */ public function getUsers(): GetUsers { - if (!$this->getUsers) { - $this->getUsers = new GetUsers($this->_provider); - } - return $this->getUsers; + return new GetUsers($this->_provider); } /** @@ -76,10 +57,7 @@ public function getUsers(): GetUsers */ public function metricHit(): MetricHit { - if (!$this->metricHit) { - $this->metricHit = new MetricHit($this->_provider); - } - return $this->metricHit; + return new MetricHit($this->_provider); } /** @@ -87,10 +65,7 @@ public function metricHit(): MetricHit */ public function start(): Start { - if (!$this->start) { - $this->start = new Start($this->_provider); - } - return $this->start; + return new Start($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Leads/CheckUser.php b/src/ReactPHPVK/Actions/Sections/Leads/CheckUser.php index 7b718ec..6be62ff 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/CheckUser.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/CheckUser.php @@ -109,7 +109,7 @@ public function setCountry(string $value): CheckUser * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads/Complete.php b/src/ReactPHPVK/Actions/Sections/Leads/Complete.php index 611d6c5..92985c5 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/Complete.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/Complete.php @@ -74,7 +74,7 @@ public function setComment(string $value): Complete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads/GetStats.php b/src/ReactPHPVK/Actions/Sections/Leads/GetStats.php index 61fcc79..1e10d1b 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/GetStats.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/GetStats.php @@ -87,7 +87,7 @@ public function setDateEnd(string $value): GetStats * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads/GetUsers.php b/src/ReactPHPVK/Actions/Sections/Leads/GetUsers.php index a17c390..e6dc800 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/GetUsers.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/GetUsers.php @@ -113,7 +113,7 @@ public function setReverse(bool $value): GetUsers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads/MetricHit.php b/src/ReactPHPVK/Actions/Sections/Leads/MetricHit.php index 6292299..e301353 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/MetricHit.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/MetricHit.php @@ -48,7 +48,7 @@ public function setData(string $value): MetricHit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Leads/Start.php b/src/ReactPHPVK/Actions/Sections/Leads/Start.php index ace8cb4..19d7fd3 100644 --- a/src/ReactPHPVK/Actions/Sections/Leads/Start.php +++ b/src/ReactPHPVK/Actions/Sections/Leads/Start.php @@ -105,7 +105,7 @@ public function setForce(bool $value): Start * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Likes.php b/src/ReactPHPVK/Actions/Sections/Likes.php index 9f223d2..2a6b7cf 100644 --- a/src/ReactPHPVK/Actions/Sections/Likes.php +++ b/src/ReactPHPVK/Actions/Sections/Likes.php @@ -13,11 +13,6 @@ class Likes { private Provider $_provider; - private ?Likes\Add $add = null; - private ?Likes\Delete $delete = null; - private ?Likes\GetList $getList = null; - private ?Likes\IsLiked $isLiked = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -28,10 +23,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -39,10 +31,7 @@ public function add(): Add */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -50,10 +39,7 @@ public function delete(): Delete */ public function getList(): GetList { - if (!$this->getList) { - $this->getList = new GetList($this->_provider); - } - return $this->getList; + return new GetList($this->_provider); } /** @@ -61,10 +47,7 @@ public function getList(): GetList */ public function isLiked(): IsLiked { - if (!$this->isLiked) { - $this->isLiked = new IsLiked($this->_provider); - } - return $this->isLiked; + return new IsLiked($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Likes/Add.php b/src/ReactPHPVK/Actions/Sections/Likes/Add.php index 54619e1..0b2ac43 100644 --- a/src/ReactPHPVK/Actions/Sections/Likes/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Likes/Add.php @@ -87,7 +87,7 @@ public function setAccessKey(string $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Likes/Delete.php b/src/ReactPHPVK/Actions/Sections/Likes/Delete.php index c8d304e..64942cf 100644 --- a/src/ReactPHPVK/Actions/Sections/Likes/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Likes/Delete.php @@ -87,7 +87,7 @@ public function setAccessKey(string $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Likes/GetList.php b/src/ReactPHPVK/Actions/Sections/Likes/GetList.php index bd2e222..c4998dd 100644 --- a/src/ReactPHPVK/Actions/Sections/Likes/GetList.php +++ b/src/ReactPHPVK/Actions/Sections/Likes/GetList.php @@ -163,7 +163,7 @@ public function setSkipOwn(bool $value): GetList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Likes/IsLiked.php b/src/ReactPHPVK/Actions/Sections/Likes/IsLiked.php index 1fd1329..b5ec73b 100644 --- a/src/ReactPHPVK/Actions/Sections/Likes/IsLiked.php +++ b/src/ReactPHPVK/Actions/Sections/Likes/IsLiked.php @@ -87,7 +87,7 @@ public function setItemId(int $value): IsLiked * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market.php b/src/ReactPHPVK/Actions/Sections/Market.php index 656c1a3..bab9baf 100644 --- a/src/ReactPHPVK/Actions/Sections/Market.php +++ b/src/ReactPHPVK/Actions/Sections/Market.php @@ -33,31 +33,6 @@ class Market { private Provider $_provider; - private ?Market\Add $add = null; - private ?Market\AddAlbum $addAlbum = null; - private ?Market\AddToAlbum $addToAlbum = null; - private ?Market\CreateComment $createComment = null; - private ?Market\Delete $delete = null; - private ?Market\DeleteAlbum $deleteAlbum = null; - private ?Market\DeleteComment $deleteComment = null; - private ?Market\Edit $edit = null; - private ?Market\EditAlbum $editAlbum = null; - private ?Market\EditComment $editComment = null; - private ?Market\Get $get = null; - private ?Market\GetAlbumById $getAlbumById = null; - private ?Market\GetAlbums $getAlbums = null; - private ?Market\GetById $getById = null; - private ?Market\GetCategories $getCategories = null; - private ?Market\GetComments $getComments = null; - private ?Market\RemoveFromAlbum $removeFromAlbum = null; - private ?Market\ReorderAlbums $reorderAlbums = null; - private ?Market\ReorderItems $reorderItems = null; - private ?Market\Report $report = null; - private ?Market\ReportComment $reportComment = null; - private ?Market\Restore $restore = null; - private ?Market\RestoreComment $restoreComment = null; - private ?Market\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -68,10 +43,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -79,10 +51,7 @@ public function add(): Add */ public function addAlbum(): AddAlbum { - if (!$this->addAlbum) { - $this->addAlbum = new AddAlbum($this->_provider); - } - return $this->addAlbum; + return new AddAlbum($this->_provider); } /** @@ -90,10 +59,7 @@ public function addAlbum(): AddAlbum */ public function addToAlbum(): AddToAlbum { - if (!$this->addToAlbum) { - $this->addToAlbum = new AddToAlbum($this->_provider); - } - return $this->addToAlbum; + return new AddToAlbum($this->_provider); } /** @@ -101,10 +67,7 @@ public function addToAlbum(): AddToAlbum */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -112,10 +75,7 @@ public function createComment(): CreateComment */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -123,10 +83,7 @@ public function delete(): Delete */ public function deleteAlbum(): DeleteAlbum { - if (!$this->deleteAlbum) { - $this->deleteAlbum = new DeleteAlbum($this->_provider); - } - return $this->deleteAlbum; + return new DeleteAlbum($this->_provider); } /** @@ -134,10 +91,7 @@ public function deleteAlbum(): DeleteAlbum */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -145,10 +99,7 @@ public function deleteComment(): DeleteComment */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -156,10 +107,7 @@ public function edit(): Edit */ public function editAlbum(): EditAlbum { - if (!$this->editAlbum) { - $this->editAlbum = new EditAlbum($this->_provider); - } - return $this->editAlbum; + return new EditAlbum($this->_provider); } /** @@ -167,10 +115,7 @@ public function editAlbum(): EditAlbum */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -178,10 +123,7 @@ public function editComment(): EditComment */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -189,10 +131,7 @@ public function get(): Get */ public function getAlbumById(): GetAlbumById { - if (!$this->getAlbumById) { - $this->getAlbumById = new GetAlbumById($this->_provider); - } - return $this->getAlbumById; + return new GetAlbumById($this->_provider); } /** @@ -200,10 +139,7 @@ public function getAlbumById(): GetAlbumById */ public function getAlbums(): GetAlbums { - if (!$this->getAlbums) { - $this->getAlbums = new GetAlbums($this->_provider); - } - return $this->getAlbums; + return new GetAlbums($this->_provider); } /** @@ -211,10 +147,7 @@ public function getAlbums(): GetAlbums */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -222,10 +155,7 @@ public function getById(): GetById */ public function getCategories(): GetCategories { - if (!$this->getCategories) { - $this->getCategories = new GetCategories($this->_provider); - } - return $this->getCategories; + return new GetCategories($this->_provider); } /** @@ -233,10 +163,7 @@ public function getCategories(): GetCategories */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -244,10 +171,7 @@ public function getComments(): GetComments */ public function removeFromAlbum(): RemoveFromAlbum { - if (!$this->removeFromAlbum) { - $this->removeFromAlbum = new RemoveFromAlbum($this->_provider); - } - return $this->removeFromAlbum; + return new RemoveFromAlbum($this->_provider); } /** @@ -255,10 +179,7 @@ public function removeFromAlbum(): RemoveFromAlbum */ public function reorderAlbums(): ReorderAlbums { - if (!$this->reorderAlbums) { - $this->reorderAlbums = new ReorderAlbums($this->_provider); - } - return $this->reorderAlbums; + return new ReorderAlbums($this->_provider); } /** @@ -266,10 +187,7 @@ public function reorderAlbums(): ReorderAlbums */ public function reorderItems(): ReorderItems { - if (!$this->reorderItems) { - $this->reorderItems = new ReorderItems($this->_provider); - } - return $this->reorderItems; + return new ReorderItems($this->_provider); } /** @@ -277,10 +195,7 @@ public function reorderItems(): ReorderItems */ public function report(): Report { - if (!$this->report) { - $this->report = new Report($this->_provider); - } - return $this->report; + return new Report($this->_provider); } /** @@ -288,10 +203,7 @@ public function report(): Report */ public function reportComment(): ReportComment { - if (!$this->reportComment) { - $this->reportComment = new ReportComment($this->_provider); - } - return $this->reportComment; + return new ReportComment($this->_provider); } /** @@ -299,10 +211,7 @@ public function reportComment(): ReportComment */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } /** @@ -310,10 +219,7 @@ public function restore(): Restore */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } /** @@ -321,10 +227,7 @@ public function restoreComment(): RestoreComment */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Market/Add.php b/src/ReactPHPVK/Actions/Sections/Market/Add.php index 03a8d2c..ff73f51 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Add.php @@ -207,7 +207,7 @@ public function setWeight(int $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/AddAlbum.php b/src/ReactPHPVK/Actions/Sections/Market/AddAlbum.php index 7fafa37..105a337 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/AddAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Market/AddAlbum.php @@ -87,7 +87,7 @@ public function setMainAlbum(bool $value): AddAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/AddToAlbum.php b/src/ReactPHPVK/Actions/Sections/Market/AddToAlbum.php index fb5fd07..ba72248 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/AddToAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Market/AddToAlbum.php @@ -74,7 +74,7 @@ public function setAlbumIds(array $value): AddToAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Market/CreateComment.php index 6f16028..f7118f3 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Market/CreateComment.php @@ -139,7 +139,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Delete.php b/src/ReactPHPVK/Actions/Sections/Market/Delete.php index 4b61eb9..d692555 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Delete.php @@ -61,7 +61,7 @@ public function setItemId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/DeleteAlbum.php b/src/ReactPHPVK/Actions/Sections/Market/DeleteAlbum.php index 24c2634..d05d2d2 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/DeleteAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Market/DeleteAlbum.php @@ -61,7 +61,7 @@ public function setAlbumId(int $value): DeleteAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Market/DeleteComment.php index 1fa037e..1912878 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Market/DeleteComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Edit.php b/src/ReactPHPVK/Actions/Sections/Market/Edit.php index 7258c34..488a619 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Edit.php @@ -165,7 +165,7 @@ public function setUrl(string $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/EditAlbum.php b/src/ReactPHPVK/Actions/Sections/Market/EditAlbum.php index ac041a6..b4c39e2 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/EditAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Market/EditAlbum.php @@ -100,7 +100,7 @@ public function setMainAlbum(bool $value): EditAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/EditComment.php b/src/ReactPHPVK/Actions/Sections/Market/EditComment.php index b3253fa..6b91f53 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Market/EditComment.php @@ -87,7 +87,7 @@ public function setAttachments(array $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Get.php b/src/ReactPHPVK/Actions/Sections/Market/Get.php index 907f0a8..9e21f71 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Get.php @@ -98,7 +98,7 @@ public function setExtended(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/GetAlbumById.php b/src/ReactPHPVK/Actions/Sections/Market/GetAlbumById.php index 1af2b84..4571392 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/GetAlbumById.php +++ b/src/ReactPHPVK/Actions/Sections/Market/GetAlbumById.php @@ -61,7 +61,7 @@ public function setAlbumIds(array $value): GetAlbumById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/GetAlbums.php b/src/ReactPHPVK/Actions/Sections/Market/GetAlbums.php index 4202a67..3f0325e 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/GetAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Market/GetAlbums.php @@ -74,7 +74,7 @@ public function setCount(int $value): GetAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/GetById.php b/src/ReactPHPVK/Actions/Sections/Market/GetById.php index 5106f0e..ed035b4 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Market/GetById.php @@ -61,7 +61,7 @@ public function setExtended(bool $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/GetCategories.php b/src/ReactPHPVK/Actions/Sections/Market/GetCategories.php index 016de13..dc65bf0 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/GetCategories.php +++ b/src/ReactPHPVK/Actions/Sections/Market/GetCategories.php @@ -61,7 +61,7 @@ public function setOffset(int $value): GetCategories * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/GetComments.php b/src/ReactPHPVK/Actions/Sections/Market/GetComments.php index 3531b80..fc1f3ff 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Market/GetComments.php @@ -150,7 +150,7 @@ public function setFields(array $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/RemoveFromAlbum.php b/src/ReactPHPVK/Actions/Sections/Market/RemoveFromAlbum.php index 7834310..dbc23f7 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/RemoveFromAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Market/RemoveFromAlbum.php @@ -74,7 +74,7 @@ public function setAlbumIds(array $value): RemoveFromAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/ReorderAlbums.php b/src/ReactPHPVK/Actions/Sections/Market/ReorderAlbums.php index 29ddc1b..989b0ab 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/ReorderAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Market/ReorderAlbums.php @@ -87,7 +87,7 @@ public function setAfter(int $value): ReorderAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/ReorderItems.php b/src/ReactPHPVK/Actions/Sections/Market/ReorderItems.php index 5eb46c7..5dd7471 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/ReorderItems.php +++ b/src/ReactPHPVK/Actions/Sections/Market/ReorderItems.php @@ -100,7 +100,7 @@ public function setAfter(int $value): ReorderItems * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Report.php b/src/ReactPHPVK/Actions/Sections/Market/Report.php index 6c31aa5..e01926b 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Report.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Report.php @@ -74,7 +74,7 @@ public function setReason(int $value): Report * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/ReportComment.php b/src/ReactPHPVK/Actions/Sections/Market/ReportComment.php index caee1cb..57a3df9 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/ReportComment.php +++ b/src/ReactPHPVK/Actions/Sections/Market/ReportComment.php @@ -74,7 +74,7 @@ public function setReason(int $value): ReportComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Restore.php b/src/ReactPHPVK/Actions/Sections/Market/Restore.php index e1d1c22..0ed4928 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Restore.php @@ -61,7 +61,7 @@ public function setItemId(int $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Market/RestoreComment.php index 6c973db..fd0e939 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Market/RestoreComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Market/Search.php b/src/ReactPHPVK/Actions/Sections/Market/Search.php index 3b94faa..f9b7f5e 100644 --- a/src/ReactPHPVK/Actions/Sections/Market/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Market/Search.php @@ -172,7 +172,7 @@ public function setStatus(int $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages.php b/src/ReactPHPVK/Actions/Sections/Messages.php index b82ba41..00bc8e1 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages.php +++ b/src/ReactPHPVK/Actions/Sections/Messages.php @@ -46,44 +46,6 @@ class Messages { private Provider $_provider; - private ?Messages\AddChatUser $addChatUser = null; - private ?Messages\AllowMessagesFromGroup $allowMessagesFromGroup = null; - private ?Messages\CreateChat $createChat = null; - private ?Messages\Delete $delete = null; - private ?Messages\DeleteChatPhoto $deleteChatPhoto = null; - private ?Messages\DeleteConversation $deleteConversation = null; - private ?Messages\DenyMessagesFromGroup $denyMessagesFromGroup = null; - private ?Messages\Edit $edit = null; - private ?Messages\EditChat $editChat = null; - private ?Messages\GetByConversationMessageId $getByConversationMessageId = null; - private ?Messages\GetById $getById = null; - private ?Messages\GetChatPreview $getChatPreview = null; - private ?Messages\GetConversationMembers $getConversationMembers = null; - private ?Messages\GetConversations $getConversations = null; - private ?Messages\GetConversationsById $getConversationsById = null; - private ?Messages\GetHistory $getHistory = null; - private ?Messages\GetHistoryAttachments $getHistoryAttachments = null; - private ?Messages\GetInviteLink $getInviteLink = null; - private ?Messages\GetLastActivity $getLastActivity = null; - private ?Messages\GetLongPollHistory $getLongPollHistory = null; - private ?Messages\GetLongPollServer $getLongPollServer = null; - private ?Messages\IsMessagesFromGroupAllowed $isMessagesFromGroupAllowed = null; - private ?Messages\JoinChatByInviteLink $joinChatByInviteLink = null; - private ?Messages\MarkAsAnsweredConversation $markAsAnsweredConversation = null; - private ?Messages\MarkAsImportant $markAsImportant = null; - private ?Messages\MarkAsImportantConversation $markAsImportantConversation = null; - private ?Messages\MarkAsRead $markAsRead = null; - private ?Messages\Pin $pin = null; - private ?Messages\RemoveChatUser $removeChatUser = null; - private ?Messages\Restore $restore = null; - private ?Messages\Search $search = null; - private ?Messages\SearchConversations $searchConversations = null; - private ?Messages\Send $send = null; - private ?Messages\SendMessageEventAnswer $sendMessageEventAnswer = null; - private ?Messages\SetActivity $setActivity = null; - private ?Messages\SetChatPhoto $setChatPhoto = null; - private ?Messages\Unpin $unpin = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -94,10 +56,7 @@ public function __construct(Provider $provider) */ public function addChatUser(): AddChatUser { - if (!$this->addChatUser) { - $this->addChatUser = new AddChatUser($this->_provider); - } - return $this->addChatUser; + return new AddChatUser($this->_provider); } /** @@ -105,10 +64,7 @@ public function addChatUser(): AddChatUser */ public function allowMessagesFromGroup(): AllowMessagesFromGroup { - if (!$this->allowMessagesFromGroup) { - $this->allowMessagesFromGroup = new AllowMessagesFromGroup($this->_provider); - } - return $this->allowMessagesFromGroup; + return new AllowMessagesFromGroup($this->_provider); } /** @@ -116,10 +72,7 @@ public function allowMessagesFromGroup(): AllowMessagesFromGroup */ public function createChat(): CreateChat { - if (!$this->createChat) { - $this->createChat = new CreateChat($this->_provider); - } - return $this->createChat; + return new CreateChat($this->_provider); } /** @@ -127,10 +80,7 @@ public function createChat(): CreateChat */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -138,10 +88,7 @@ public function delete(): Delete */ public function deleteChatPhoto(): DeleteChatPhoto { - if (!$this->deleteChatPhoto) { - $this->deleteChatPhoto = new DeleteChatPhoto($this->_provider); - } - return $this->deleteChatPhoto; + return new DeleteChatPhoto($this->_provider); } /** @@ -149,10 +96,7 @@ public function deleteChatPhoto(): DeleteChatPhoto */ public function deleteConversation(): DeleteConversation { - if (!$this->deleteConversation) { - $this->deleteConversation = new DeleteConversation($this->_provider); - } - return $this->deleteConversation; + return new DeleteConversation($this->_provider); } /** @@ -160,10 +104,7 @@ public function deleteConversation(): DeleteConversation */ public function denyMessagesFromGroup(): DenyMessagesFromGroup { - if (!$this->denyMessagesFromGroup) { - $this->denyMessagesFromGroup = new DenyMessagesFromGroup($this->_provider); - } - return $this->denyMessagesFromGroup; + return new DenyMessagesFromGroup($this->_provider); } /** @@ -171,10 +112,7 @@ public function denyMessagesFromGroup(): DenyMessagesFromGroup */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -182,10 +120,7 @@ public function edit(): Edit */ public function editChat(): EditChat { - if (!$this->editChat) { - $this->editChat = new EditChat($this->_provider); - } - return $this->editChat; + return new EditChat($this->_provider); } /** @@ -193,10 +128,7 @@ public function editChat(): EditChat */ public function getByConversationMessageId(): GetByConversationMessageId { - if (!$this->getByConversationMessageId) { - $this->getByConversationMessageId = new GetByConversationMessageId($this->_provider); - } - return $this->getByConversationMessageId; + return new GetByConversationMessageId($this->_provider); } /** @@ -204,10 +136,7 @@ public function getByConversationMessageId(): GetByConversationMessageId */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -215,10 +144,7 @@ public function getById(): GetById */ public function getChatPreview(): GetChatPreview { - if (!$this->getChatPreview) { - $this->getChatPreview = new GetChatPreview($this->_provider); - } - return $this->getChatPreview; + return new GetChatPreview($this->_provider); } /** @@ -226,10 +152,7 @@ public function getChatPreview(): GetChatPreview */ public function getConversationMembers(): GetConversationMembers { - if (!$this->getConversationMembers) { - $this->getConversationMembers = new GetConversationMembers($this->_provider); - } - return $this->getConversationMembers; + return new GetConversationMembers($this->_provider); } /** @@ -237,10 +160,7 @@ public function getConversationMembers(): GetConversationMembers */ public function getConversations(): GetConversations { - if (!$this->getConversations) { - $this->getConversations = new GetConversations($this->_provider); - } - return $this->getConversations; + return new GetConversations($this->_provider); } /** @@ -248,10 +168,7 @@ public function getConversations(): GetConversations */ public function getConversationsById(): GetConversationsById { - if (!$this->getConversationsById) { - $this->getConversationsById = new GetConversationsById($this->_provider); - } - return $this->getConversationsById; + return new GetConversationsById($this->_provider); } /** @@ -259,10 +176,7 @@ public function getConversationsById(): GetConversationsById */ public function getHistory(): GetHistory { - if (!$this->getHistory) { - $this->getHistory = new GetHistory($this->_provider); - } - return $this->getHistory; + return new GetHistory($this->_provider); } /** @@ -270,10 +184,7 @@ public function getHistory(): GetHistory */ public function getHistoryAttachments(): GetHistoryAttachments { - if (!$this->getHistoryAttachments) { - $this->getHistoryAttachments = new GetHistoryAttachments($this->_provider); - } - return $this->getHistoryAttachments; + return new GetHistoryAttachments($this->_provider); } /** @@ -281,10 +192,7 @@ public function getHistoryAttachments(): GetHistoryAttachments */ public function getInviteLink(): GetInviteLink { - if (!$this->getInviteLink) { - $this->getInviteLink = new GetInviteLink($this->_provider); - } - return $this->getInviteLink; + return new GetInviteLink($this->_provider); } /** @@ -292,10 +200,7 @@ public function getInviteLink(): GetInviteLink */ public function getLastActivity(): GetLastActivity { - if (!$this->getLastActivity) { - $this->getLastActivity = new GetLastActivity($this->_provider); - } - return $this->getLastActivity; + return new GetLastActivity($this->_provider); } /** @@ -303,10 +208,7 @@ public function getLastActivity(): GetLastActivity */ public function getLongPollHistory(): GetLongPollHistory { - if (!$this->getLongPollHistory) { - $this->getLongPollHistory = new GetLongPollHistory($this->_provider); - } - return $this->getLongPollHistory; + return new GetLongPollHistory($this->_provider); } /** @@ -314,10 +216,7 @@ public function getLongPollHistory(): GetLongPollHistory */ public function getLongPollServer(): GetLongPollServer { - if (!$this->getLongPollServer) { - $this->getLongPollServer = new GetLongPollServer($this->_provider); - } - return $this->getLongPollServer; + return new GetLongPollServer($this->_provider); } /** @@ -325,10 +224,7 @@ public function getLongPollServer(): GetLongPollServer */ public function isMessagesFromGroupAllowed(): IsMessagesFromGroupAllowed { - if (!$this->isMessagesFromGroupAllowed) { - $this->isMessagesFromGroupAllowed = new IsMessagesFromGroupAllowed($this->_provider); - } - return $this->isMessagesFromGroupAllowed; + return new IsMessagesFromGroupAllowed($this->_provider); } /** @@ -336,10 +232,7 @@ public function isMessagesFromGroupAllowed(): IsMessagesFromGroupAllowed */ public function joinChatByInviteLink(): JoinChatByInviteLink { - if (!$this->joinChatByInviteLink) { - $this->joinChatByInviteLink = new JoinChatByInviteLink($this->_provider); - } - return $this->joinChatByInviteLink; + return new JoinChatByInviteLink($this->_provider); } /** @@ -347,10 +240,7 @@ public function joinChatByInviteLink(): JoinChatByInviteLink */ public function markAsAnsweredConversation(): MarkAsAnsweredConversation { - if (!$this->markAsAnsweredConversation) { - $this->markAsAnsweredConversation = new MarkAsAnsweredConversation($this->_provider); - } - return $this->markAsAnsweredConversation; + return new MarkAsAnsweredConversation($this->_provider); } /** @@ -358,10 +248,7 @@ public function markAsAnsweredConversation(): MarkAsAnsweredConversation */ public function markAsImportant(): MarkAsImportant { - if (!$this->markAsImportant) { - $this->markAsImportant = new MarkAsImportant($this->_provider); - } - return $this->markAsImportant; + return new MarkAsImportant($this->_provider); } /** @@ -369,10 +256,7 @@ public function markAsImportant(): MarkAsImportant */ public function markAsImportantConversation(): MarkAsImportantConversation { - if (!$this->markAsImportantConversation) { - $this->markAsImportantConversation = new MarkAsImportantConversation($this->_provider); - } - return $this->markAsImportantConversation; + return new MarkAsImportantConversation($this->_provider); } /** @@ -380,10 +264,7 @@ public function markAsImportantConversation(): MarkAsImportantConversation */ public function markAsRead(): MarkAsRead { - if (!$this->markAsRead) { - $this->markAsRead = new MarkAsRead($this->_provider); - } - return $this->markAsRead; + return new MarkAsRead($this->_provider); } /** @@ -391,10 +272,7 @@ public function markAsRead(): MarkAsRead */ public function pin(): Pin { - if (!$this->pin) { - $this->pin = new Pin($this->_provider); - } - return $this->pin; + return new Pin($this->_provider); } /** @@ -402,10 +280,7 @@ public function pin(): Pin */ public function removeChatUser(): RemoveChatUser { - if (!$this->removeChatUser) { - $this->removeChatUser = new RemoveChatUser($this->_provider); - } - return $this->removeChatUser; + return new RemoveChatUser($this->_provider); } /** @@ -413,10 +288,7 @@ public function removeChatUser(): RemoveChatUser */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } /** @@ -424,10 +296,7 @@ public function restore(): Restore */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } /** @@ -435,10 +304,7 @@ public function search(): Search */ public function searchConversations(): SearchConversations { - if (!$this->searchConversations) { - $this->searchConversations = new SearchConversations($this->_provider); - } - return $this->searchConversations; + return new SearchConversations($this->_provider); } /** @@ -446,10 +312,7 @@ public function searchConversations(): SearchConversations */ public function send(): Send { - if (!$this->send) { - $this->send = new Send($this->_provider); - } - return $this->send; + return new Send($this->_provider); } /** @@ -457,10 +320,7 @@ public function send(): Send */ public function sendMessageEventAnswer(): SendMessageEventAnswer { - if (!$this->sendMessageEventAnswer) { - $this->sendMessageEventAnswer = new SendMessageEventAnswer($this->_provider); - } - return $this->sendMessageEventAnswer; + return new SendMessageEventAnswer($this->_provider); } /** @@ -468,10 +328,7 @@ public function sendMessageEventAnswer(): SendMessageEventAnswer */ public function setActivity(): SetActivity { - if (!$this->setActivity) { - $this->setActivity = new SetActivity($this->_provider); - } - return $this->setActivity; + return new SetActivity($this->_provider); } /** @@ -479,10 +336,7 @@ public function setActivity(): SetActivity */ public function setChatPhoto(): SetChatPhoto { - if (!$this->setChatPhoto) { - $this->setChatPhoto = new SetChatPhoto($this->_provider); - } - return $this->setChatPhoto; + return new SetChatPhoto($this->_provider); } /** @@ -490,10 +344,7 @@ public function setChatPhoto(): SetChatPhoto */ public function unpin(): Unpin { - if (!$this->unpin) { - $this->unpin = new Unpin($this->_provider); - } - return $this->unpin; + return new Unpin($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Messages/AddChatUser.php b/src/ReactPHPVK/Actions/Sections/Messages/AddChatUser.php index 159c820..1313768 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/AddChatUser.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/AddChatUser.php @@ -72,7 +72,7 @@ public function setVisibleMessagesCount(int $value): AddChatUser * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/AllowMessagesFromGroup.php b/src/ReactPHPVK/Actions/Sections/Messages/AllowMessagesFromGroup.php index b1fa0b6..9ee7283 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/AllowMessagesFromGroup.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/AllowMessagesFromGroup.php @@ -59,7 +59,7 @@ public function setKey(string $value): AllowMessagesFromGroup * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/CreateChat.php b/src/ReactPHPVK/Actions/Sections/Messages/CreateChat.php index fd952a0..228c433 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/CreateChat.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/CreateChat.php @@ -72,7 +72,7 @@ public function setGroupId(int $value): CreateChat * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Delete.php b/src/ReactPHPVK/Actions/Sections/Messages/Delete.php index a144b11..e934e94 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Delete.php @@ -87,7 +87,7 @@ public function setDeleteForAll(bool $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/DeleteChatPhoto.php b/src/ReactPHPVK/Actions/Sections/Messages/DeleteChatPhoto.php index 4178fab..5481ab4 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/DeleteChatPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/DeleteChatPhoto.php @@ -59,7 +59,7 @@ public function setGroupId(int $value): DeleteChatPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/DeleteConversation.php b/src/ReactPHPVK/Actions/Sections/Messages/DeleteConversation.php index dc98908..916ce94 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/DeleteConversation.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/DeleteConversation.php @@ -74,7 +74,7 @@ public function setGroupId(int $value): DeleteConversation * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/DenyMessagesFromGroup.php b/src/ReactPHPVK/Actions/Sections/Messages/DenyMessagesFromGroup.php index e42f560..f16dcd2 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/DenyMessagesFromGroup.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/DenyMessagesFromGroup.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): DenyMessagesFromGroup * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Edit.php b/src/ReactPHPVK/Actions/Sections/Messages/Edit.php index d568922..ea13c87 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Edit.php @@ -194,7 +194,7 @@ public function setKeyboard(string $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/EditChat.php b/src/ReactPHPVK/Actions/Sections/Messages/EditChat.php index 97520ba..fbd07cd 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/EditChat.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/EditChat.php @@ -61,7 +61,7 @@ public function setTitle(string $value): EditChat * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetByConversationMessageId.php b/src/ReactPHPVK/Actions/Sections/Messages/GetByConversationMessageId.php index 88ee311..2014225 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetByConversationMessageId.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetByConversationMessageId.php @@ -100,7 +100,7 @@ public function setGroupId(int $value): GetByConversationMessageId * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetById.php b/src/ReactPHPVK/Actions/Sections/Messages/GetById.php index d90b0f4..66b9dfa 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetById.php @@ -100,7 +100,7 @@ public function setGroupId(int $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetChatPreview.php b/src/ReactPHPVK/Actions/Sections/Messages/GetChatPreview.php index 5d044c0..d15a311 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetChatPreview.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetChatPreview.php @@ -72,7 +72,7 @@ public function setFields(array $value): GetChatPreview * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetConversationMembers.php b/src/ReactPHPVK/Actions/Sections/Messages/GetConversationMembers.php index 2e104c4..53836cb 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetConversationMembers.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetConversationMembers.php @@ -74,7 +74,7 @@ public function setGroupId(int $value): GetConversationMembers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetConversations.php b/src/ReactPHPVK/Actions/Sections/Messages/GetConversations.php index 8657dc2..d3f4d59 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetConversations.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetConversations.php @@ -126,7 +126,7 @@ public function setGroupId(int $value): GetConversations * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetConversationsById.php b/src/ReactPHPVK/Actions/Sections/Messages/GetConversationsById.php index 257de6a..ed691b3 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetConversationsById.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetConversationsById.php @@ -87,7 +87,7 @@ public function setGroupId(int $value): GetConversationsById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetHistory.php b/src/ReactPHPVK/Actions/Sections/Messages/GetHistory.php index 55a2a00..801714c 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetHistory.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetHistory.php @@ -150,7 +150,7 @@ public function setGroupId(int $value): GetHistory * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetHistoryAttachments.php b/src/ReactPHPVK/Actions/Sections/Messages/GetHistoryAttachments.php index 33547d9..1fc6526 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetHistoryAttachments.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetHistoryAttachments.php @@ -148,7 +148,7 @@ public function setMaxForwardsLevel(int $value): GetHistoryAttachments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetInviteLink.php b/src/ReactPHPVK/Actions/Sections/Messages/GetInviteLink.php index e541e7a..0730e34 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetInviteLink.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetInviteLink.php @@ -74,7 +74,7 @@ public function setGroupId(int $value): GetInviteLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetLastActivity.php b/src/ReactPHPVK/Actions/Sections/Messages/GetLastActivity.php index f16dff1..2fdd7aa 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetLastActivity.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetLastActivity.php @@ -48,7 +48,7 @@ public function setUserId(int $value): GetLastActivity * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollHistory.php b/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollHistory.php index aec32b8..708fa70 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollHistory.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollHistory.php @@ -185,7 +185,7 @@ public function setCredentials(bool $value): GetLongPollHistory * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollServer.php b/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollServer.php index 23ed118..5ce747f 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollServer.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/GetLongPollServer.php @@ -74,7 +74,7 @@ public function setLpVersion(int $value): GetLongPollServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/IsMessagesFromGroupAllowed.php b/src/ReactPHPVK/Actions/Sections/Messages/IsMessagesFromGroupAllowed.php index 03b00de..b0cd01c 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/IsMessagesFromGroupAllowed.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/IsMessagesFromGroupAllowed.php @@ -61,7 +61,7 @@ public function setUserId(int $value): IsMessagesFromGroupAllowed * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/JoinChatByInviteLink.php b/src/ReactPHPVK/Actions/Sections/Messages/JoinChatByInviteLink.php index 0120cdd..cc5b158 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/JoinChatByInviteLink.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/JoinChatByInviteLink.php @@ -48,7 +48,7 @@ public function setLink(string $value): JoinChatByInviteLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsAnsweredConversation.php b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsAnsweredConversation.php index cb08cc8..a2cbf83 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsAnsweredConversation.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsAnsweredConversation.php @@ -74,7 +74,7 @@ public function setGroupId(int $value): MarkAsAnsweredConversation * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportant.php b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportant.php index 68f9844..6b24c5f 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportant.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportant.php @@ -61,7 +61,7 @@ public function setImportant(int $value): MarkAsImportant * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportantConversation.php b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportantConversation.php index 445a181..80ec03d 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportantConversation.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsImportantConversation.php @@ -74,7 +74,7 @@ public function setGroupId(int $value): MarkAsImportantConversation * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsRead.php b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsRead.php index e600553..6b869f3 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/MarkAsRead.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/MarkAsRead.php @@ -98,7 +98,7 @@ public function setMarkConversationAsRead(bool $value): MarkAsRead * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Pin.php b/src/ReactPHPVK/Actions/Sections/Messages/Pin.php index 0a696c1..65795e9 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Pin.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Pin.php @@ -59,7 +59,7 @@ public function setMessageId(int $value): Pin * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/RemoveChatUser.php b/src/ReactPHPVK/Actions/Sections/Messages/RemoveChatUser.php index ca19bea..0e62bd5 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/RemoveChatUser.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/RemoveChatUser.php @@ -72,7 +72,7 @@ public function setMemberId(int $value): RemoveChatUser * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Restore.php b/src/ReactPHPVK/Actions/Sections/Messages/Restore.php index 8c6213a..8917483 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Restore.php @@ -61,7 +61,7 @@ public function setGroupId(int $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Search.php b/src/ReactPHPVK/Actions/Sections/Messages/Search.php index 2a6772e..0a404a3 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Search.php @@ -148,7 +148,7 @@ public function setGroupId(int $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/SearchConversations.php b/src/ReactPHPVK/Actions/Sections/Messages/SearchConversations.php index c326834..e6b782e 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/SearchConversations.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/SearchConversations.php @@ -100,7 +100,7 @@ public function setGroupId(int $value): SearchConversations * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Send.php b/src/ReactPHPVK/Actions/Sections/Messages/Send.php index 92791c7..df0640f 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Send.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Send.php @@ -281,7 +281,7 @@ public function setSubscribeId(int $value): Send * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/SendMessageEventAnswer.php b/src/ReactPHPVK/Actions/Sections/Messages/SendMessageEventAnswer.php index 0ba0594..b7e3cc6 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/SendMessageEventAnswer.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/SendMessageEventAnswer.php @@ -79,7 +79,7 @@ public function setEventData(string $value): SendMessageEventAnswer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/SetActivity.php b/src/ReactPHPVK/Actions/Sections/Messages/SetActivity.php index 9148bb8..4595c50 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/SetActivity.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/SetActivity.php @@ -87,7 +87,7 @@ public function setGroupId(int $value): SetActivity * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/SetChatPhoto.php b/src/ReactPHPVK/Actions/Sections/Messages/SetChatPhoto.php index 38ce3d4..24a189f 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/SetChatPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/SetChatPhoto.php @@ -48,7 +48,7 @@ public function setFile(string $value): SetChatPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Messages/Unpin.php b/src/ReactPHPVK/Actions/Sections/Messages/Unpin.php index 0fcc3c1..19c032c 100644 --- a/src/ReactPHPVK/Actions/Sections/Messages/Unpin.php +++ b/src/ReactPHPVK/Actions/Sections/Messages/Unpin.php @@ -57,7 +57,7 @@ public function setGroupId(int $value): Unpin * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed.php b/src/ReactPHPVK/Actions/Sections/Newsfeed.php index d846969..326a462 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed.php @@ -24,22 +24,6 @@ class Newsfeed { private Provider $_provider; - private ?Newsfeed\AddBan $addBan = null; - private ?Newsfeed\DeleteBan $deleteBan = null; - private ?Newsfeed\DeleteList $deleteList = null; - private ?Newsfeed\Get $get = null; - private ?Newsfeed\GetBanned $getBanned = null; - private ?Newsfeed\GetComments $getComments = null; - private ?Newsfeed\GetLists $getLists = null; - private ?Newsfeed\GetMentions $getMentions = null; - private ?Newsfeed\GetRecommended $getRecommended = null; - private ?Newsfeed\GetSuggestedSources $getSuggestedSources = null; - private ?Newsfeed\IgnoreItem $ignoreItem = null; - private ?Newsfeed\SaveList $saveList = null; - private ?Newsfeed\Search $search = null; - private ?Newsfeed\UnignoreItem $unignoreItem = null; - private ?Newsfeed\Unsubscribe $unsubscribe = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -50,10 +34,7 @@ public function __construct(Provider $provider) */ public function addBan(): AddBan { - if (!$this->addBan) { - $this->addBan = new AddBan($this->_provider); - } - return $this->addBan; + return new AddBan($this->_provider); } /** @@ -61,10 +42,7 @@ public function addBan(): AddBan */ public function deleteBan(): DeleteBan { - if (!$this->deleteBan) { - $this->deleteBan = new DeleteBan($this->_provider); - } - return $this->deleteBan; + return new DeleteBan($this->_provider); } /** @@ -72,10 +50,7 @@ public function deleteBan(): DeleteBan */ public function deleteList(): DeleteList { - if (!$this->deleteList) { - $this->deleteList = new DeleteList($this->_provider); - } - return $this->deleteList; + return new DeleteList($this->_provider); } /** @@ -83,10 +58,7 @@ public function deleteList(): DeleteList */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -94,10 +66,7 @@ public function get(): Get */ public function getBanned(): GetBanned { - if (!$this->getBanned) { - $this->getBanned = new GetBanned($this->_provider); - } - return $this->getBanned; + return new GetBanned($this->_provider); } /** @@ -105,10 +74,7 @@ public function getBanned(): GetBanned */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -116,10 +82,7 @@ public function getComments(): GetComments */ public function getLists(): GetLists { - if (!$this->getLists) { - $this->getLists = new GetLists($this->_provider); - } - return $this->getLists; + return new GetLists($this->_provider); } /** @@ -127,10 +90,7 @@ public function getLists(): GetLists */ public function getMentions(): GetMentions { - if (!$this->getMentions) { - $this->getMentions = new GetMentions($this->_provider); - } - return $this->getMentions; + return new GetMentions($this->_provider); } /** @@ -138,10 +98,7 @@ public function getMentions(): GetMentions */ public function getRecommended(): GetRecommended { - if (!$this->getRecommended) { - $this->getRecommended = new GetRecommended($this->_provider); - } - return $this->getRecommended; + return new GetRecommended($this->_provider); } /** @@ -149,10 +106,7 @@ public function getRecommended(): GetRecommended */ public function getSuggestedSources(): GetSuggestedSources { - if (!$this->getSuggestedSources) { - $this->getSuggestedSources = new GetSuggestedSources($this->_provider); - } - return $this->getSuggestedSources; + return new GetSuggestedSources($this->_provider); } /** @@ -160,10 +114,7 @@ public function getSuggestedSources(): GetSuggestedSources */ public function ignoreItem(): IgnoreItem { - if (!$this->ignoreItem) { - $this->ignoreItem = new IgnoreItem($this->_provider); - } - return $this->ignoreItem; + return new IgnoreItem($this->_provider); } /** @@ -171,10 +122,7 @@ public function ignoreItem(): IgnoreItem */ public function saveList(): SaveList { - if (!$this->saveList) { - $this->saveList = new SaveList($this->_provider); - } - return $this->saveList; + return new SaveList($this->_provider); } /** @@ -182,10 +130,7 @@ public function saveList(): SaveList */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } /** @@ -193,10 +138,7 @@ public function search(): Search */ public function unignoreItem(): UnignoreItem { - if (!$this->unignoreItem) { - $this->unignoreItem = new UnignoreItem($this->_provider); - } - return $this->unignoreItem; + return new UnignoreItem($this->_provider); } /** @@ -204,10 +146,7 @@ public function unignoreItem(): UnignoreItem */ public function unsubscribe(): Unsubscribe { - if (!$this->unsubscribe) { - $this->unsubscribe = new Unsubscribe($this->_provider); - } - return $this->unsubscribe; + return new Unsubscribe($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/AddBan.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/AddBan.php index e32b8c8..9c41f02 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/AddBan.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/AddBan.php @@ -57,7 +57,7 @@ public function setGroupIds(array $value): AddBan * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteBan.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteBan.php index 3ff9a1c..9fedb5f 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteBan.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteBan.php @@ -57,7 +57,7 @@ public function setGroupIds(array $value): DeleteBan * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteList.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteList.php index 71b1819..d37549f 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteList.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/DeleteList.php @@ -46,7 +46,7 @@ public function setListId(int $value): DeleteList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/Get.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/Get.php index 189c11a..de5fe8c 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/Get.php @@ -163,7 +163,7 @@ public function setSection(string $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetBanned.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetBanned.php index 88c6510..04bdadd 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetBanned.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetBanned.php @@ -74,7 +74,7 @@ public function setNameCase(string $value): GetBanned * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetComments.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetComments.php index 89fd96f..806761d 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetComments.php @@ -137,7 +137,7 @@ public function setFields(array $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetLists.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetLists.php index 76ff55c..4f97774 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetLists.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetLists.php @@ -61,7 +61,7 @@ public function setExtended(bool $value): GetLists * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetMentions.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetMentions.php index 3492b6c..5c0690c 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetMentions.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetMentions.php @@ -100,7 +100,7 @@ public function setCount(int $value): GetMentions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetRecommended.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetRecommended.php index f3799c1..5f85f10 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetRecommended.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetRecommended.php @@ -113,7 +113,7 @@ public function setFields(array $value): GetRecommended * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetSuggestedSources.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetSuggestedSources.php index 165fad6..8318d88 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/GetSuggestedSources.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/GetSuggestedSources.php @@ -87,7 +87,7 @@ public function setFields(array $value): GetSuggestedSources * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/IgnoreItem.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/IgnoreItem.php index 5da55db..c7c4e2a 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/IgnoreItem.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/IgnoreItem.php @@ -74,7 +74,7 @@ public function setItemId(int $value): IgnoreItem * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/SaveList.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/SaveList.php index edc988f..56d2dba 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/SaveList.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/SaveList.php @@ -87,7 +87,7 @@ public function setNoReposts(bool $value): SaveList * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/Search.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/Search.php index aa104b7..5d0c699 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/Search.php @@ -150,7 +150,7 @@ public function setFields(array $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/UnignoreItem.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/UnignoreItem.php index 10d16aa..3b6e430 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/UnignoreItem.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/UnignoreItem.php @@ -87,7 +87,7 @@ public function setTrackCode(string $value): UnignoreItem * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Newsfeed/Unsubscribe.php b/src/ReactPHPVK/Actions/Sections/Newsfeed/Unsubscribe.php index 64bbe0f..3184dfb 100644 --- a/src/ReactPHPVK/Actions/Sections/Newsfeed/Unsubscribe.php +++ b/src/ReactPHPVK/Actions/Sections/Newsfeed/Unsubscribe.php @@ -74,7 +74,7 @@ public function setItemId(int $value): Unsubscribe * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes.php b/src/ReactPHPVK/Actions/Sections/Notes.php index 9f6d7f8..9fb4684 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes.php +++ b/src/ReactPHPVK/Actions/Sections/Notes.php @@ -19,17 +19,6 @@ class Notes { private Provider $_provider; - private ?Notes\Add $add = null; - private ?Notes\CreateComment $createComment = null; - private ?Notes\Delete $delete = null; - private ?Notes\DeleteComment $deleteComment = null; - private ?Notes\Edit $edit = null; - private ?Notes\EditComment $editComment = null; - private ?Notes\Get $get = null; - private ?Notes\GetById $getById = null; - private ?Notes\GetComments $getComments = null; - private ?Notes\RestoreComment $restoreComment = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -40,10 +29,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -51,10 +37,7 @@ public function add(): Add */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -62,10 +45,7 @@ public function createComment(): CreateComment */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -73,10 +53,7 @@ public function delete(): Delete */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -84,10 +61,7 @@ public function deleteComment(): DeleteComment */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -95,10 +69,7 @@ public function edit(): Edit */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -106,10 +77,7 @@ public function editComment(): EditComment */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -117,10 +85,7 @@ public function get(): Get */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -128,10 +93,7 @@ public function getById(): GetById */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -139,10 +101,7 @@ public function getComments(): GetComments */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Notes/Add.php b/src/ReactPHPVK/Actions/Sections/Notes/Add.php index 77b181f..dd68aaf 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/Add.php @@ -83,7 +83,7 @@ public function setPrivacyComment(array $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Notes/CreateComment.php index 51f9107..c3179d8 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/CreateComment.php @@ -98,7 +98,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/Delete.php b/src/ReactPHPVK/Actions/Sections/Notes/Delete.php index 2cf7f38..a683f16 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/Delete.php @@ -48,7 +48,7 @@ public function setNoteId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Notes/DeleteComment.php index c0ea465..62cdbe4 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/DeleteComment.php @@ -61,7 +61,7 @@ public function setOwnerId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/Edit.php b/src/ReactPHPVK/Actions/Sections/Notes/Edit.php index e20afc5..bc6187a 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/Edit.php @@ -96,7 +96,7 @@ public function setPrivacyComment(array $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/EditComment.php b/src/ReactPHPVK/Actions/Sections/Notes/EditComment.php index c806ae2..c3e5e7a 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/EditComment.php @@ -74,7 +74,7 @@ public function setMessage(string $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/Get.php b/src/ReactPHPVK/Actions/Sections/Notes/Get.php index a2a6993..a65d5a0 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/Get.php @@ -96,7 +96,7 @@ public function setSort(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/GetById.php b/src/ReactPHPVK/Actions/Sections/Notes/GetById.php index a6a1040..87cdcd8 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/GetById.php @@ -72,7 +72,7 @@ public function setNeedWiki(bool $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/GetComments.php b/src/ReactPHPVK/Actions/Sections/Notes/GetComments.php index 677c7fe..efcffdf 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/GetComments.php @@ -96,7 +96,7 @@ public function setCount(int $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notes/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Notes/RestoreComment.php index f414e75..cd3d74c 100644 --- a/src/ReactPHPVK/Actions/Sections/Notes/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Notes/RestoreComment.php @@ -61,7 +61,7 @@ public function setOwnerId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notifications.php b/src/ReactPHPVK/Actions/Sections/Notifications.php index e5bc77f..24630e4 100644 --- a/src/ReactPHPVK/Actions/Sections/Notifications.php +++ b/src/ReactPHPVK/Actions/Sections/Notifications.php @@ -12,10 +12,6 @@ class Notifications { private Provider $_provider; - private ?Notifications\Get $get = null; - private ?Notifications\MarkAsViewed $markAsViewed = null; - private ?Notifications\SendMessage $sendMessage = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -26,10 +22,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -37,10 +30,7 @@ public function get(): Get */ public function markAsViewed(): MarkAsViewed { - if (!$this->markAsViewed) { - $this->markAsViewed = new MarkAsViewed($this->_provider); - } - return $this->markAsViewed; + return new MarkAsViewed($this->_provider); } /** @@ -48,10 +38,7 @@ public function markAsViewed(): MarkAsViewed */ public function sendMessage(): SendMessage { - if (!$this->sendMessage) { - $this->sendMessage = new SendMessage($this->_provider); - } - return $this->sendMessage; + return new SendMessage($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Notifications/Get.php b/src/ReactPHPVK/Actions/Sections/Notifications/Get.php index 2036a3a..654466b 100644 --- a/src/ReactPHPVK/Actions/Sections/Notifications/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Notifications/Get.php @@ -98,7 +98,7 @@ public function setEndTime(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notifications/MarkAsViewed.php b/src/ReactPHPVK/Actions/Sections/Notifications/MarkAsViewed.php index 7e6c4c3..d85c922 100644 --- a/src/ReactPHPVK/Actions/Sections/Notifications/MarkAsViewed.php +++ b/src/ReactPHPVK/Actions/Sections/Notifications/MarkAsViewed.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): MarkAsViewed * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Notifications/SendMessage.php b/src/ReactPHPVK/Actions/Sections/Notifications/SendMessage.php index f123561..273eeeb 100644 --- a/src/ReactPHPVK/Actions/Sections/Notifications/SendMessage.php +++ b/src/ReactPHPVK/Actions/Sections/Notifications/SendMessage.php @@ -90,7 +90,7 @@ public function setRandomId(int $value): SendMessage * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders.php b/src/ReactPHPVK/Actions/Sections/Orders.php index 211d537..ccdac86 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders.php +++ b/src/ReactPHPVK/Actions/Sections/Orders.php @@ -17,15 +17,6 @@ class Orders { private Provider $_provider; - private ?Orders\CancelSubscription $cancelSubscription = null; - private ?Orders\ChangeState $changeState = null; - private ?Orders\Get $get = null; - private ?Orders\GetAmount $getAmount = null; - private ?Orders\GetById $getById = null; - private ?Orders\GetUserSubscriptionById $getUserSubscriptionById = null; - private ?Orders\GetUserSubscriptions $getUserSubscriptions = null; - private ?Orders\UpdateSubscription $updateSubscription = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -36,10 +27,7 @@ public function __construct(Provider $provider) */ public function cancelSubscription(): CancelSubscription { - if (!$this->cancelSubscription) { - $this->cancelSubscription = new CancelSubscription($this->_provider); - } - return $this->cancelSubscription; + return new CancelSubscription($this->_provider); } /** @@ -47,10 +35,7 @@ public function cancelSubscription(): CancelSubscription */ public function changeState(): ChangeState { - if (!$this->changeState) { - $this->changeState = new ChangeState($this->_provider); - } - return $this->changeState; + return new ChangeState($this->_provider); } /** @@ -58,10 +43,7 @@ public function changeState(): ChangeState */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -69,10 +51,7 @@ public function get(): Get */ public function getAmount(): GetAmount { - if (!$this->getAmount) { - $this->getAmount = new GetAmount($this->_provider); - } - return $this->getAmount; + return new GetAmount($this->_provider); } /** @@ -80,10 +59,7 @@ public function getAmount(): GetAmount */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -91,10 +67,7 @@ public function getById(): GetById */ public function getUserSubscriptionById(): GetUserSubscriptionById { - if (!$this->getUserSubscriptionById) { - $this->getUserSubscriptionById = new GetUserSubscriptionById($this->_provider); - } - return $this->getUserSubscriptionById; + return new GetUserSubscriptionById($this->_provider); } /** @@ -102,10 +75,7 @@ public function getUserSubscriptionById(): GetUserSubscriptionById */ public function getUserSubscriptions(): GetUserSubscriptions { - if (!$this->getUserSubscriptions) { - $this->getUserSubscriptions = new GetUserSubscriptions($this->_provider); - } - return $this->getUserSubscriptions; + return new GetUserSubscriptions($this->_provider); } /** @@ -113,10 +83,7 @@ public function getUserSubscriptions(): GetUserSubscriptions */ public function updateSubscription(): UpdateSubscription { - if (!$this->updateSubscription) { - $this->updateSubscription = new UpdateSubscription($this->_provider); - } - return $this->updateSubscription; + return new UpdateSubscription($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Orders/CancelSubscription.php b/src/ReactPHPVK/Actions/Sections/Orders/CancelSubscription.php index 21588b5..0065d56 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/CancelSubscription.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/CancelSubscription.php @@ -68,7 +68,7 @@ public function setPendingCancel(bool $value): CancelSubscription * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/ChangeState.php b/src/ReactPHPVK/Actions/Sections/Orders/ChangeState.php index fd6e1a2..8e6f000 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/ChangeState.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/ChangeState.php @@ -87,7 +87,7 @@ public function setTestMode(bool $value): ChangeState * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/Get.php b/src/ReactPHPVK/Actions/Sections/Orders/Get.php index d0c33f8..8adcbb2 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/Get.php @@ -72,7 +72,7 @@ public function setTestMode(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/GetAmount.php b/src/ReactPHPVK/Actions/Sections/Orders/GetAmount.php index ab8c711..eb00ecb 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/GetAmount.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/GetAmount.php @@ -57,7 +57,7 @@ public function setVotes(array $value): GetAmount * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/GetById.php b/src/ReactPHPVK/Actions/Sections/Orders/GetById.php index eb36dc4..6789c7e 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/GetById.php @@ -74,7 +74,7 @@ public function setTestMode(bool $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptionById.php b/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptionById.php index c1eeaf7..440ae19 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptionById.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptionById.php @@ -57,7 +57,7 @@ public function setSubscriptionId(int $value): GetUserSubscriptionById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptions.php b/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptions.php index f902d77..72e7fb5 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptions.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/GetUserSubscriptions.php @@ -46,7 +46,7 @@ public function setUserId(int $value): GetUserSubscriptions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Orders/UpdateSubscription.php b/src/ReactPHPVK/Actions/Sections/Orders/UpdateSubscription.php index db54995..cddb5a5 100644 --- a/src/ReactPHPVK/Actions/Sections/Orders/UpdateSubscription.php +++ b/src/ReactPHPVK/Actions/Sections/Orders/UpdateSubscription.php @@ -68,7 +68,7 @@ public function setPrice(int $value): UpdateSubscription * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages.php b/src/ReactPHPVK/Actions/Sections/Pages.php index 8741f67..3dc6a5e 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages.php +++ b/src/ReactPHPVK/Actions/Sections/Pages.php @@ -17,15 +17,6 @@ class Pages { private Provider $_provider; - private ?Pages\ClearCache $clearCache = null; - private ?Pages\Get $get = null; - private ?Pages\GetHistory $getHistory = null; - private ?Pages\GetTitles $getTitles = null; - private ?Pages\GetVersion $getVersion = null; - private ?Pages\ParseWiki $parseWiki = null; - private ?Pages\Save $save = null; - private ?Pages\SaveAccess $saveAccess = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -36,10 +27,7 @@ public function __construct(Provider $provider) */ public function clearCache(): ClearCache { - if (!$this->clearCache) { - $this->clearCache = new ClearCache($this->_provider); - } - return $this->clearCache; + return new ClearCache($this->_provider); } /** @@ -47,10 +35,7 @@ public function clearCache(): ClearCache */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -58,10 +43,7 @@ public function get(): Get */ public function getHistory(): GetHistory { - if (!$this->getHistory) { - $this->getHistory = new GetHistory($this->_provider); - } - return $this->getHistory; + return new GetHistory($this->_provider); } /** @@ -69,10 +51,7 @@ public function getHistory(): GetHistory */ public function getTitles(): GetTitles { - if (!$this->getTitles) { - $this->getTitles = new GetTitles($this->_provider); - } - return $this->getTitles; + return new GetTitles($this->_provider); } /** @@ -80,10 +59,7 @@ public function getTitles(): GetTitles */ public function getVersion(): GetVersion { - if (!$this->getVersion) { - $this->getVersion = new GetVersion($this->_provider); - } - return $this->getVersion; + return new GetVersion($this->_provider); } /** @@ -91,10 +67,7 @@ public function getVersion(): GetVersion */ public function parseWiki(): ParseWiki { - if (!$this->parseWiki) { - $this->parseWiki = new ParseWiki($this->_provider); - } - return $this->parseWiki; + return new ParseWiki($this->_provider); } /** @@ -102,10 +75,7 @@ public function parseWiki(): ParseWiki */ public function save(): Save { - if (!$this->save) { - $this->save = new Save($this->_provider); - } - return $this->save; + return new Save($this->_provider); } /** @@ -113,10 +83,7 @@ public function save(): Save */ public function saveAccess(): SaveAccess { - if (!$this->saveAccess) { - $this->saveAccess = new SaveAccess($this->_provider); - } - return $this->saveAccess; + return new SaveAccess($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Pages/ClearCache.php b/src/ReactPHPVK/Actions/Sections/Pages/ClearCache.php index 91944ef..a1f34aa 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/ClearCache.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/ClearCache.php @@ -48,7 +48,7 @@ public function setUrl(string $value): ClearCache * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/Get.php b/src/ReactPHPVK/Actions/Sections/Pages/Get.php index b13c4e7..2e61057 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/Get.php @@ -124,7 +124,7 @@ public function setNeedHtml(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/GetHistory.php b/src/ReactPHPVK/Actions/Sections/Pages/GetHistory.php index 38fe913..aeb3b35 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/GetHistory.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/GetHistory.php @@ -72,7 +72,7 @@ public function setUserId(int $value): GetHistory * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/GetTitles.php b/src/ReactPHPVK/Actions/Sections/Pages/GetTitles.php index aa10ebe..3799938 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/GetTitles.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/GetTitles.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetTitles * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/GetVersion.php b/src/ReactPHPVK/Actions/Sections/Pages/GetVersion.php index 1e9da5a..74f5365 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/GetVersion.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/GetVersion.php @@ -83,7 +83,7 @@ public function setNeedHtml(bool $value): GetVersion * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/ParseWiki.php b/src/ReactPHPVK/Actions/Sections/Pages/ParseWiki.php index e83f3cb..dd6493c 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/ParseWiki.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/ParseWiki.php @@ -61,7 +61,7 @@ public function setGroupId(int $value): ParseWiki * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/Save.php b/src/ReactPHPVK/Actions/Sections/Pages/Save.php index b034440..63ca440 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/Save.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/Save.php @@ -100,7 +100,7 @@ public function setTitle(string $value): Save * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Pages/SaveAccess.php b/src/ReactPHPVK/Actions/Sections/Pages/SaveAccess.php index bfdf587..a9821d6 100644 --- a/src/ReactPHPVK/Actions/Sections/Pages/SaveAccess.php +++ b/src/ReactPHPVK/Actions/Sections/Pages/SaveAccess.php @@ -98,7 +98,7 @@ public function setEdit(int $value): SaveAccess * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos.php b/src/ReactPHPVK/Actions/Sections/Photos.php index 20bda0d..3e89642 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos.php +++ b/src/ReactPHPVK/Actions/Sections/Photos.php @@ -55,53 +55,6 @@ class Photos { private Provider $_provider; - private ?Photos\ConfirmTag $confirmTag = null; - private ?Photos\Copy $copy = null; - private ?Photos\CreateAlbum $createAlbum = null; - private ?Photos\CreateComment $createComment = null; - private ?Photos\Delete $delete = null; - private ?Photos\DeleteAlbum $deleteAlbum = null; - private ?Photos\DeleteComment $deleteComment = null; - private ?Photos\Edit $edit = null; - private ?Photos\EditAlbum $editAlbum = null; - private ?Photos\EditComment $editComment = null; - private ?Photos\Get $get = null; - private ?Photos\GetAlbums $getAlbums = null; - private ?Photos\GetAlbumsCount $getAlbumsCount = null; - private ?Photos\GetAll $getAll = null; - private ?Photos\GetAllComments $getAllComments = null; - private ?Photos\GetById $getById = null; - private ?Photos\GetChatUploadServer $getChatUploadServer = null; - private ?Photos\GetComments $getComments = null; - private ?Photos\GetMarketAlbumUploadServer $getMarketAlbumUploadServer = null; - private ?Photos\GetMarketUploadServer $getMarketUploadServer = null; - private ?Photos\GetMessagesUploadServer $getMessagesUploadServer = null; - private ?Photos\GetNewTags $getNewTags = null; - private ?Photos\GetOwnerCoverPhotoUploadServer $getOwnerCoverPhotoUploadServer = null; - private ?Photos\GetOwnerPhotoUploadServer $getOwnerPhotoUploadServer = null; - private ?Photos\GetTags $getTags = null; - private ?Photos\GetUploadServer $getUploadServer = null; - private ?Photos\GetUserPhotos $getUserPhotos = null; - private ?Photos\GetWallUploadServer $getWallUploadServer = null; - private ?Photos\MakeCover $makeCover = null; - private ?Photos\Move $move = null; - private ?Photos\PutTag $putTag = null; - private ?Photos\RemoveTag $removeTag = null; - private ?Photos\ReorderAlbums $reorderAlbums = null; - private ?Photos\ReorderPhotos $reorderPhotos = null; - private ?Photos\Report $report = null; - private ?Photos\ReportComment $reportComment = null; - private ?Photos\Restore $restore = null; - private ?Photos\RestoreComment $restoreComment = null; - private ?Photos\Save $save = null; - private ?Photos\SaveMarketAlbumPhoto $saveMarketAlbumPhoto = null; - private ?Photos\SaveMarketPhoto $saveMarketPhoto = null; - private ?Photos\SaveMessagesPhoto $saveMessagesPhoto = null; - private ?Photos\SaveOwnerCoverPhoto $saveOwnerCoverPhoto = null; - private ?Photos\SaveOwnerPhoto $saveOwnerPhoto = null; - private ?Photos\SaveWallPhoto $saveWallPhoto = null; - private ?Photos\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -112,10 +65,7 @@ public function __construct(Provider $provider) */ public function confirmTag(): ConfirmTag { - if (!$this->confirmTag) { - $this->confirmTag = new ConfirmTag($this->_provider); - } - return $this->confirmTag; + return new ConfirmTag($this->_provider); } /** @@ -123,10 +73,7 @@ public function confirmTag(): ConfirmTag */ public function copy(): Copy { - if (!$this->copy) { - $this->copy = new Copy($this->_provider); - } - return $this->copy; + return new Copy($this->_provider); } /** @@ -134,10 +81,7 @@ public function copy(): Copy */ public function createAlbum(): CreateAlbum { - if (!$this->createAlbum) { - $this->createAlbum = new CreateAlbum($this->_provider); - } - return $this->createAlbum; + return new CreateAlbum($this->_provider); } /** @@ -145,10 +89,7 @@ public function createAlbum(): CreateAlbum */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -156,10 +97,7 @@ public function createComment(): CreateComment */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -167,10 +105,7 @@ public function delete(): Delete */ public function deleteAlbum(): DeleteAlbum { - if (!$this->deleteAlbum) { - $this->deleteAlbum = new DeleteAlbum($this->_provider); - } - return $this->deleteAlbum; + return new DeleteAlbum($this->_provider); } /** @@ -178,10 +113,7 @@ public function deleteAlbum(): DeleteAlbum */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -189,10 +121,7 @@ public function deleteComment(): DeleteComment */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -200,10 +129,7 @@ public function edit(): Edit */ public function editAlbum(): EditAlbum { - if (!$this->editAlbum) { - $this->editAlbum = new EditAlbum($this->_provider); - } - return $this->editAlbum; + return new EditAlbum($this->_provider); } /** @@ -211,10 +137,7 @@ public function editAlbum(): EditAlbum */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -222,10 +145,7 @@ public function editComment(): EditComment */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -233,10 +153,7 @@ public function get(): Get */ public function getAlbums(): GetAlbums { - if (!$this->getAlbums) { - $this->getAlbums = new GetAlbums($this->_provider); - } - return $this->getAlbums; + return new GetAlbums($this->_provider); } /** @@ -244,10 +161,7 @@ public function getAlbums(): GetAlbums */ public function getAlbumsCount(): GetAlbumsCount { - if (!$this->getAlbumsCount) { - $this->getAlbumsCount = new GetAlbumsCount($this->_provider); - } - return $this->getAlbumsCount; + return new GetAlbumsCount($this->_provider); } /** @@ -255,10 +169,7 @@ public function getAlbumsCount(): GetAlbumsCount */ public function getAll(): GetAll { - if (!$this->getAll) { - $this->getAll = new GetAll($this->_provider); - } - return $this->getAll; + return new GetAll($this->_provider); } /** @@ -266,10 +177,7 @@ public function getAll(): GetAll */ public function getAllComments(): GetAllComments { - if (!$this->getAllComments) { - $this->getAllComments = new GetAllComments($this->_provider); - } - return $this->getAllComments; + return new GetAllComments($this->_provider); } /** @@ -277,10 +185,7 @@ public function getAllComments(): GetAllComments */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -288,10 +193,7 @@ public function getById(): GetById */ public function getChatUploadServer(): GetChatUploadServer { - if (!$this->getChatUploadServer) { - $this->getChatUploadServer = new GetChatUploadServer($this->_provider); - } - return $this->getChatUploadServer; + return new GetChatUploadServer($this->_provider); } /** @@ -299,10 +201,7 @@ public function getChatUploadServer(): GetChatUploadServer */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -310,10 +209,7 @@ public function getComments(): GetComments */ public function getMarketAlbumUploadServer(): GetMarketAlbumUploadServer { - if (!$this->getMarketAlbumUploadServer) { - $this->getMarketAlbumUploadServer = new GetMarketAlbumUploadServer($this->_provider); - } - return $this->getMarketAlbumUploadServer; + return new GetMarketAlbumUploadServer($this->_provider); } /** @@ -321,10 +217,7 @@ public function getMarketAlbumUploadServer(): GetMarketAlbumUploadServer */ public function getMarketUploadServer(): GetMarketUploadServer { - if (!$this->getMarketUploadServer) { - $this->getMarketUploadServer = new GetMarketUploadServer($this->_provider); - } - return $this->getMarketUploadServer; + return new GetMarketUploadServer($this->_provider); } /** @@ -332,10 +225,7 @@ public function getMarketUploadServer(): GetMarketUploadServer */ public function getMessagesUploadServer(): GetMessagesUploadServer { - if (!$this->getMessagesUploadServer) { - $this->getMessagesUploadServer = new GetMessagesUploadServer($this->_provider); - } - return $this->getMessagesUploadServer; + return new GetMessagesUploadServer($this->_provider); } /** @@ -343,10 +233,7 @@ public function getMessagesUploadServer(): GetMessagesUploadServer */ public function getNewTags(): GetNewTags { - if (!$this->getNewTags) { - $this->getNewTags = new GetNewTags($this->_provider); - } - return $this->getNewTags; + return new GetNewTags($this->_provider); } /** @@ -354,10 +241,7 @@ public function getNewTags(): GetNewTags */ public function getOwnerCoverPhotoUploadServer(): GetOwnerCoverPhotoUploadServer { - if (!$this->getOwnerCoverPhotoUploadServer) { - $this->getOwnerCoverPhotoUploadServer = new GetOwnerCoverPhotoUploadServer($this->_provider); - } - return $this->getOwnerCoverPhotoUploadServer; + return new GetOwnerCoverPhotoUploadServer($this->_provider); } /** @@ -365,10 +249,7 @@ public function getOwnerCoverPhotoUploadServer(): GetOwnerCoverPhotoUploadServer */ public function getOwnerPhotoUploadServer(): GetOwnerPhotoUploadServer { - if (!$this->getOwnerPhotoUploadServer) { - $this->getOwnerPhotoUploadServer = new GetOwnerPhotoUploadServer($this->_provider); - } - return $this->getOwnerPhotoUploadServer; + return new GetOwnerPhotoUploadServer($this->_provider); } /** @@ -376,10 +257,7 @@ public function getOwnerPhotoUploadServer(): GetOwnerPhotoUploadServer */ public function getTags(): GetTags { - if (!$this->getTags) { - $this->getTags = new GetTags($this->_provider); - } - return $this->getTags; + return new GetTags($this->_provider); } /** @@ -387,10 +265,7 @@ public function getTags(): GetTags */ public function getUploadServer(): GetUploadServer { - if (!$this->getUploadServer) { - $this->getUploadServer = new GetUploadServer($this->_provider); - } - return $this->getUploadServer; + return new GetUploadServer($this->_provider); } /** @@ -398,10 +273,7 @@ public function getUploadServer(): GetUploadServer */ public function getUserPhotos(): GetUserPhotos { - if (!$this->getUserPhotos) { - $this->getUserPhotos = new GetUserPhotos($this->_provider); - } - return $this->getUserPhotos; + return new GetUserPhotos($this->_provider); } /** @@ -409,10 +281,7 @@ public function getUserPhotos(): GetUserPhotos */ public function getWallUploadServer(): GetWallUploadServer { - if (!$this->getWallUploadServer) { - $this->getWallUploadServer = new GetWallUploadServer($this->_provider); - } - return $this->getWallUploadServer; + return new GetWallUploadServer($this->_provider); } /** @@ -420,10 +289,7 @@ public function getWallUploadServer(): GetWallUploadServer */ public function makeCover(): MakeCover { - if (!$this->makeCover) { - $this->makeCover = new MakeCover($this->_provider); - } - return $this->makeCover; + return new MakeCover($this->_provider); } /** @@ -431,10 +297,7 @@ public function makeCover(): MakeCover */ public function move(): Move { - if (!$this->move) { - $this->move = new Move($this->_provider); - } - return $this->move; + return new Move($this->_provider); } /** @@ -442,10 +305,7 @@ public function move(): Move */ public function putTag(): PutTag { - if (!$this->putTag) { - $this->putTag = new PutTag($this->_provider); - } - return $this->putTag; + return new PutTag($this->_provider); } /** @@ -453,10 +313,7 @@ public function putTag(): PutTag */ public function removeTag(): RemoveTag { - if (!$this->removeTag) { - $this->removeTag = new RemoveTag($this->_provider); - } - return $this->removeTag; + return new RemoveTag($this->_provider); } /** @@ -464,10 +321,7 @@ public function removeTag(): RemoveTag */ public function reorderAlbums(): ReorderAlbums { - if (!$this->reorderAlbums) { - $this->reorderAlbums = new ReorderAlbums($this->_provider); - } - return $this->reorderAlbums; + return new ReorderAlbums($this->_provider); } /** @@ -475,10 +329,7 @@ public function reorderAlbums(): ReorderAlbums */ public function reorderPhotos(): ReorderPhotos { - if (!$this->reorderPhotos) { - $this->reorderPhotos = new ReorderPhotos($this->_provider); - } - return $this->reorderPhotos; + return new ReorderPhotos($this->_provider); } /** @@ -486,10 +337,7 @@ public function reorderPhotos(): ReorderPhotos */ public function report(): Report { - if (!$this->report) { - $this->report = new Report($this->_provider); - } - return $this->report; + return new Report($this->_provider); } /** @@ -497,10 +345,7 @@ public function report(): Report */ public function reportComment(): ReportComment { - if (!$this->reportComment) { - $this->reportComment = new ReportComment($this->_provider); - } - return $this->reportComment; + return new ReportComment($this->_provider); } /** @@ -508,10 +353,7 @@ public function reportComment(): ReportComment */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } /** @@ -519,10 +361,7 @@ public function restore(): Restore */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } /** @@ -530,10 +369,7 @@ public function restoreComment(): RestoreComment */ public function save(): Save { - if (!$this->save) { - $this->save = new Save($this->_provider); - } - return $this->save; + return new Save($this->_provider); } /** @@ -541,10 +377,7 @@ public function save(): Save */ public function saveMarketAlbumPhoto(): SaveMarketAlbumPhoto { - if (!$this->saveMarketAlbumPhoto) { - $this->saveMarketAlbumPhoto = new SaveMarketAlbumPhoto($this->_provider); - } - return $this->saveMarketAlbumPhoto; + return new SaveMarketAlbumPhoto($this->_provider); } /** @@ -552,10 +385,7 @@ public function saveMarketAlbumPhoto(): SaveMarketAlbumPhoto */ public function saveMarketPhoto(): SaveMarketPhoto { - if (!$this->saveMarketPhoto) { - $this->saveMarketPhoto = new SaveMarketPhoto($this->_provider); - } - return $this->saveMarketPhoto; + return new SaveMarketPhoto($this->_provider); } /** @@ -563,10 +393,7 @@ public function saveMarketPhoto(): SaveMarketPhoto */ public function saveMessagesPhoto(): SaveMessagesPhoto { - if (!$this->saveMessagesPhoto) { - $this->saveMessagesPhoto = new SaveMessagesPhoto($this->_provider); - } - return $this->saveMessagesPhoto; + return new SaveMessagesPhoto($this->_provider); } /** @@ -574,10 +401,7 @@ public function saveMessagesPhoto(): SaveMessagesPhoto */ public function saveOwnerCoverPhoto(): SaveOwnerCoverPhoto { - if (!$this->saveOwnerCoverPhoto) { - $this->saveOwnerCoverPhoto = new SaveOwnerCoverPhoto($this->_provider); - } - return $this->saveOwnerCoverPhoto; + return new SaveOwnerCoverPhoto($this->_provider); } /** @@ -585,10 +409,7 @@ public function saveOwnerCoverPhoto(): SaveOwnerCoverPhoto */ public function saveOwnerPhoto(): SaveOwnerPhoto { - if (!$this->saveOwnerPhoto) { - $this->saveOwnerPhoto = new SaveOwnerPhoto($this->_provider); - } - return $this->saveOwnerPhoto; + return new SaveOwnerPhoto($this->_provider); } /** @@ -596,10 +417,7 @@ public function saveOwnerPhoto(): SaveOwnerPhoto */ public function saveWallPhoto(): SaveWallPhoto { - if (!$this->saveWallPhoto) { - $this->saveWallPhoto = new SaveWallPhoto($this->_provider); - } - return $this->saveWallPhoto; + return new SaveWallPhoto($this->_provider); } /** @@ -607,10 +425,7 @@ public function saveWallPhoto(): SaveWallPhoto */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Photos/ConfirmTag.php b/src/ReactPHPVK/Actions/Sections/Photos/ConfirmTag.php index 3812573..5974bff 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/ConfirmTag.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/ConfirmTag.php @@ -74,7 +74,7 @@ public function setTagId(int $value): ConfirmTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Copy.php b/src/ReactPHPVK/Actions/Sections/Photos/Copy.php index f3274df..29b9d22 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Copy.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Copy.php @@ -74,7 +74,7 @@ public function setAccessKey(string $value): Copy * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/CreateAlbum.php b/src/ReactPHPVK/Actions/Sections/Photos/CreateAlbum.php index e4534f4..45abba4 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/CreateAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/CreateAlbum.php @@ -118,7 +118,7 @@ public function setCommentsDisabled(bool $value): CreateAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Photos/CreateComment.php index 363f252..988be71 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/CreateComment.php @@ -144,7 +144,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Delete.php b/src/ReactPHPVK/Actions/Sections/Photos/Delete.php index 382c2a0..cf1afc0 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Delete.php @@ -61,7 +61,7 @@ public function setPhotoId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/DeleteAlbum.php b/src/ReactPHPVK/Actions/Sections/Photos/DeleteAlbum.php index a9c3b1d..4cf0050 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/DeleteAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/DeleteAlbum.php @@ -61,7 +61,7 @@ public function setGroupId(int $value): DeleteAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Photos/DeleteComment.php index c03192a..cdbee0e 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/DeleteComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Edit.php b/src/ReactPHPVK/Actions/Sections/Photos/Edit.php index f5959d6..6dbacbf 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Edit.php @@ -129,7 +129,7 @@ public function setDeletePlace(bool $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/EditAlbum.php b/src/ReactPHPVK/Actions/Sections/Photos/EditAlbum.php index 8efdc5d..3dfa471 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/EditAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/EditAlbum.php @@ -131,7 +131,7 @@ public function setCommentsDisabled(bool $value): EditAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/EditComment.php b/src/ReactPHPVK/Actions/Sections/Photos/EditComment.php index af35f67..8cb54bf 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/EditComment.php @@ -87,7 +87,7 @@ public function setAttachments(array $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Get.php b/src/ReactPHPVK/Actions/Sections/Photos/Get.php index 3e3684f..714e166 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Get.php @@ -161,7 +161,7 @@ public function setCount(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetAlbums.php b/src/ReactPHPVK/Actions/Sections/Photos/GetAlbums.php index 19534f8..517ea59 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetAlbums.php @@ -126,7 +126,7 @@ public function setPhotoSizes(bool $value): GetAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetAlbumsCount.php b/src/ReactPHPVK/Actions/Sections/Photos/GetAlbumsCount.php index ec282c5..1bb1f9b 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetAlbumsCount.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetAlbumsCount.php @@ -61,7 +61,7 @@ public function setGroupId(int $value): GetAlbumsCount * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetAll.php b/src/ReactPHPVK/Actions/Sections/Photos/GetAll.php index dbb7af2..a05a275 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetAll.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetAll.php @@ -139,7 +139,7 @@ public function setSkipHidden(bool $value): GetAll * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetAllComments.php b/src/ReactPHPVK/Actions/Sections/Photos/GetAllComments.php index b945483..5027d63 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetAllComments.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetAllComments.php @@ -100,7 +100,7 @@ public function setCount(int $value): GetAllComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetById.php b/src/ReactPHPVK/Actions/Sections/Photos/GetById.php index 3c46847..408d8a4 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetById.php @@ -74,7 +74,7 @@ public function setPhotoSizes(bool $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetChatUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetChatUploadServer.php index 6fcecc5..6ea401a 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetChatUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetChatUploadServer.php @@ -83,7 +83,7 @@ public function setCropWidth(int $value): GetChatUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetComments.php b/src/ReactPHPVK/Actions/Sections/Photos/GetComments.php index 5e9f2b2..09e48e6 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetComments.php @@ -157,7 +157,7 @@ public function setFields(array $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetMarketAlbumUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetMarketAlbumUploadServer.php index f52a944..98c2294 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetMarketAlbumUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetMarketAlbumUploadServer.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetMarketAlbumUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetMarketUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetMarketUploadServer.php index 03ea8e2..251f482 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetMarketUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetMarketUploadServer.php @@ -100,7 +100,7 @@ public function setCropWidth(int $value): GetMarketUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetMessagesUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetMessagesUploadServer.php index faad0f6..dd08f63 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetMessagesUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetMessagesUploadServer.php @@ -48,7 +48,7 @@ public function setPeerId(int $value): GetMessagesUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetNewTags.php b/src/ReactPHPVK/Actions/Sections/Photos/GetNewTags.php index 503f4da..0de491b 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetNewTags.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetNewTags.php @@ -61,7 +61,7 @@ public function setCount(int $value): GetNewTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerCoverPhotoUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerCoverPhotoUploadServer.php index 5584c2a..baef249 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerCoverPhotoUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerCoverPhotoUploadServer.php @@ -100,7 +100,7 @@ public function setCropY2(int $value): GetOwnerCoverPhotoUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerPhotoUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerPhotoUploadServer.php index c206587..bcce81f 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerPhotoUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetOwnerPhotoUploadServer.php @@ -48,7 +48,7 @@ public function setOwnerId(int $value): GetOwnerPhotoUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetTags.php b/src/ReactPHPVK/Actions/Sections/Photos/GetTags.php index 7a8121a..eb29708 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetTags.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetTags.php @@ -72,7 +72,7 @@ public function setAccessKey(string $value): GetTags * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetUploadServer.php index 708fd61..a2bf9b0 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetUploadServer.php @@ -59,7 +59,7 @@ public function setAlbumId(int $value): GetUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetUserPhotos.php b/src/ReactPHPVK/Actions/Sections/Photos/GetUserPhotos.php index 6f8beca..000682a 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetUserPhotos.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetUserPhotos.php @@ -100,7 +100,7 @@ public function setSort(string $value): GetUserPhotos * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/GetWallUploadServer.php b/src/ReactPHPVK/Actions/Sections/Photos/GetWallUploadServer.php index 4d5e708..332835f 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/GetWallUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/GetWallUploadServer.php @@ -48,7 +48,7 @@ public function setGroupId(int $value): GetWallUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/MakeCover.php b/src/ReactPHPVK/Actions/Sections/Photos/MakeCover.php index 55bfe35..165fda6 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/MakeCover.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/MakeCover.php @@ -74,7 +74,7 @@ public function setAlbumId(int $value): MakeCover * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Move.php b/src/ReactPHPVK/Actions/Sections/Photos/Move.php index 0a914c1..c34f810 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Move.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Move.php @@ -74,7 +74,7 @@ public function setPhotoId(int $value): Move * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/PutTag.php b/src/ReactPHPVK/Actions/Sections/Photos/PutTag.php index d762673..cccbf35 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/PutTag.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/PutTag.php @@ -126,7 +126,7 @@ public function setY2(float $value): PutTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/RemoveTag.php b/src/ReactPHPVK/Actions/Sections/Photos/RemoveTag.php index d826cbe..5fabdcd 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/RemoveTag.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/RemoveTag.php @@ -74,7 +74,7 @@ public function setTagId(int $value): RemoveTag * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/ReorderAlbums.php b/src/ReactPHPVK/Actions/Sections/Photos/ReorderAlbums.php index 6e1cd40..2beb3d9 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/ReorderAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/ReorderAlbums.php @@ -87,7 +87,7 @@ public function setAfter(int $value): ReorderAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/ReorderPhotos.php b/src/ReactPHPVK/Actions/Sections/Photos/ReorderPhotos.php index a7f650f..123ab62 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/ReorderPhotos.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/ReorderPhotos.php @@ -87,7 +87,7 @@ public function setAfter(int $value): ReorderPhotos * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Report.php b/src/ReactPHPVK/Actions/Sections/Photos/Report.php index ccaa43d..17dc922 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Report.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Report.php @@ -74,7 +74,7 @@ public function setReason(int $value): Report * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/ReportComment.php b/src/ReactPHPVK/Actions/Sections/Photos/ReportComment.php index bfcf9a1..e83ce49 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/ReportComment.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/ReportComment.php @@ -74,7 +74,7 @@ public function setReason(int $value): ReportComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Restore.php b/src/ReactPHPVK/Actions/Sections/Photos/Restore.php index ef9f549..a9d3457 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Restore.php @@ -61,7 +61,7 @@ public function setPhotoId(int $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Photos/RestoreComment.php index fcc11b8..0d1f294 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/RestoreComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Save.php b/src/ReactPHPVK/Actions/Sections/Photos/Save.php index a39d0e4..479df3f 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Save.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Save.php @@ -139,7 +139,7 @@ public function setCaption(string $value): Save * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketAlbumPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketAlbumPhoto.php index 6bb7e8e..79435d0 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketAlbumPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketAlbumPhoto.php @@ -87,7 +87,7 @@ public function setHash(string $value): SaveMarketAlbumPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketPhoto.php index e80bd99..44e3631 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveMarketPhoto.php @@ -113,7 +113,7 @@ public function setCropHash(string $value): SaveMarketPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveMessagesPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveMessagesPhoto.php index 058a434..58fde74 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveMessagesPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveMessagesPhoto.php @@ -70,7 +70,7 @@ public function setHash(string $value): SaveMessagesPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerCoverPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerCoverPhoto.php index 4198f43..ed5c5a0 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerCoverPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerCoverPhoto.php @@ -61,7 +61,7 @@ public function setPhoto(string $value): SaveOwnerCoverPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerPhoto.php index 1f55374..f7c595d 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveOwnerPhoto.php @@ -74,7 +74,7 @@ public function setPhoto(string $value): SaveOwnerPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/SaveWallPhoto.php b/src/ReactPHPVK/Actions/Sections/Photos/SaveWallPhoto.php index 55089db..d87d128 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/SaveWallPhoto.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/SaveWallPhoto.php @@ -135,7 +135,7 @@ public function setCaption(string $value): SaveWallPhoto * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Photos/Search.php b/src/ReactPHPVK/Actions/Sections/Photos/Search.php index 8c57cb4..e98fb82 100644 --- a/src/ReactPHPVK/Actions/Sections/Photos/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Photos/Search.php @@ -148,7 +148,7 @@ public function setRadius(int $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls.php b/src/ReactPHPVK/Actions/Sections/Polls.php index 8bd6a0a..eb1cd07 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls.php +++ b/src/ReactPHPVK/Actions/Sections/Polls.php @@ -15,13 +15,6 @@ class Polls { private Provider $_provider; - private ?Polls\AddVote $addVote = null; - private ?Polls\Create $create = null; - private ?Polls\DeleteVote $deleteVote = null; - private ?Polls\Edit $edit = null; - private ?Polls\GetById $getById = null; - private ?Polls\GetVoters $getVoters = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -32,10 +25,7 @@ public function __construct(Provider $provider) */ public function addVote(): AddVote { - if (!$this->addVote) { - $this->addVote = new AddVote($this->_provider); - } - return $this->addVote; + return new AddVote($this->_provider); } /** @@ -43,10 +33,7 @@ public function addVote(): AddVote */ public function create(): Create { - if (!$this->create) { - $this->create = new Create($this->_provider); - } - return $this->create; + return new Create($this->_provider); } /** @@ -54,10 +41,7 @@ public function create(): Create */ public function deleteVote(): DeleteVote { - if (!$this->deleteVote) { - $this->deleteVote = new DeleteVote($this->_provider); - } - return $this->deleteVote; + return new DeleteVote($this->_provider); } /** @@ -65,10 +49,7 @@ public function deleteVote(): DeleteVote */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -76,10 +57,7 @@ public function edit(): Edit */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -87,10 +65,7 @@ public function getById(): GetById */ public function getVoters(): GetVoters { - if (!$this->getVoters) { - $this->getVoters = new GetVoters($this->_provider); - } - return $this->getVoters; + return new GetVoters($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Polls/AddVote.php b/src/ReactPHPVK/Actions/Sections/Polls/AddVote.php index 8760b70..919ff54 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/AddVote.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/AddVote.php @@ -83,7 +83,7 @@ public function setIsBoard(bool $value): AddVote * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls/Create.php b/src/ReactPHPVK/Actions/Sections/Polls/Create.php index d3c3f82..27520c5 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/Create.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/Create.php @@ -142,7 +142,7 @@ public function setDisableUnvote(bool $value): Create * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls/DeleteVote.php b/src/ReactPHPVK/Actions/Sections/Polls/DeleteVote.php index 55659ae..7c626db 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/DeleteVote.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/DeleteVote.php @@ -85,7 +85,7 @@ public function setIsBoard(bool $value): DeleteVote * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls/Edit.php b/src/ReactPHPVK/Actions/Sections/Polls/Edit.php index 9662a22..383b2cc 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/Edit.php @@ -146,7 +146,7 @@ public function setBackgroundId(string $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls/GetById.php b/src/ReactPHPVK/Actions/Sections/Polls/GetById.php index d27ba74..225515b 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/GetById.php @@ -118,7 +118,7 @@ public function setNameCase(string $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Polls/GetVoters.php b/src/ReactPHPVK/Actions/Sections/Polls/GetVoters.php index 838f8ee..24ae396 100644 --- a/src/ReactPHPVK/Actions/Sections/Polls/GetVoters.php +++ b/src/ReactPHPVK/Actions/Sections/Polls/GetVoters.php @@ -150,7 +150,7 @@ public function setNameCase(string $value): GetVoters * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards.php b/src/ReactPHPVK/Actions/Sections/PrettyCards.php index 4997087..003946c 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards.php @@ -15,13 +15,6 @@ class PrettyCards { private Provider $_provider; - private ?PrettyCards\Create $create = null; - private ?PrettyCards\Delete $delete = null; - private ?PrettyCards\Edit $edit = null; - private ?PrettyCards\Get $get = null; - private ?PrettyCards\GetById $getById = null; - private ?PrettyCards\GetUploadURL $getUploadURL = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -32,10 +25,7 @@ public function __construct(Provider $provider) */ public function create(): Create { - if (!$this->create) { - $this->create = new Create($this->_provider); - } - return $this->create; + return new Create($this->_provider); } /** @@ -43,10 +33,7 @@ public function create(): Create */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -54,10 +41,7 @@ public function delete(): Delete */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -65,10 +49,7 @@ public function edit(): Edit */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -76,10 +57,7 @@ public function get(): Get */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -87,10 +65,7 @@ public function getById(): GetById */ public function getUploadURL(): GetUploadURL { - if (!$this->getUploadURL) { - $this->getUploadURL = new GetUploadURL($this->_provider); - } - return $this->getUploadURL; + return new GetUploadURL($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/Create.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/Create.php index da9ea68..2da0b5a 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/Create.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/Create.php @@ -112,7 +112,7 @@ public function setButton(string $value): Create * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/Delete.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/Delete.php index e835055..202a4b8 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/Delete.php @@ -57,7 +57,7 @@ public function setCardId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/Edit.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/Edit.php index 3cf2198..d128a15 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/Edit.php @@ -123,7 +123,7 @@ public function setButton(string $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/Get.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/Get.php index 347684a..8b8a40c 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/Get.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/Get.php @@ -68,7 +68,7 @@ public function setCount(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/GetById.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/GetById.php index d059035..215b533 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/GetById.php @@ -57,7 +57,7 @@ public function setCardIds(array $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/PrettyCards/GetUploadURL.php b/src/ReactPHPVK/Actions/Sections/PrettyCards/GetUploadURL.php index 1a76d21..4433698 100644 --- a/src/ReactPHPVK/Actions/Sections/PrettyCards/GetUploadURL.php +++ b/src/ReactPHPVK/Actions/Sections/PrettyCards/GetUploadURL.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetUploadURL * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Search.php b/src/ReactPHPVK/Actions/Sections/Search.php index c9eef89..6dbf595 100644 --- a/src/ReactPHPVK/Actions/Sections/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Search.php @@ -10,8 +10,6 @@ class Search { private Provider $_provider; - private ?Search\GetHints $getHints = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -22,10 +20,7 @@ public function __construct(Provider $provider) */ public function getHints(): GetHints { - if (!$this->getHints) { - $this->getHints = new GetHints($this->_provider); - } - return $this->getHints; + return new GetHints($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Search/GetHints.php b/src/ReactPHPVK/Actions/Sections/Search/GetHints.php index ab6b257..ab63828 100644 --- a/src/ReactPHPVK/Actions/Sections/Search/GetHints.php +++ b/src/ReactPHPVK/Actions/Sections/Search/GetHints.php @@ -107,7 +107,7 @@ public function setSearchGlobal(bool $value): GetHints * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure.php b/src/ReactPHPVK/Actions/Sections/Secure.php index 793b631..daa659a 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure.php +++ b/src/ReactPHPVK/Actions/Sections/Secure.php @@ -19,17 +19,6 @@ class Secure { private Provider $_provider; - private ?Secure\AddAppEvent $addAppEvent = null; - private ?Secure\CheckToken $checkToken = null; - private ?Secure\GetAppBalance $getAppBalance = null; - private ?Secure\GetSMSHistory $getSMSHistory = null; - private ?Secure\GetTransactionsHistory $getTransactionsHistory = null; - private ?Secure\GetUserLevel $getUserLevel = null; - private ?Secure\GiveEventSticker $giveEventSticker = null; - private ?Secure\SendNotification $sendNotification = null; - private ?Secure\SendSMSNotification $sendSMSNotification = null; - private ?Secure\SetCounter $setCounter = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -40,10 +29,7 @@ public function __construct(Provider $provider) */ public function addAppEvent(): AddAppEvent { - if (!$this->addAppEvent) { - $this->addAppEvent = new AddAppEvent($this->_provider); - } - return $this->addAppEvent; + return new AddAppEvent($this->_provider); } /** @@ -51,10 +37,7 @@ public function addAppEvent(): AddAppEvent */ public function checkToken(): CheckToken { - if (!$this->checkToken) { - $this->checkToken = new CheckToken($this->_provider); - } - return $this->checkToken; + return new CheckToken($this->_provider); } /** @@ -62,10 +45,7 @@ public function checkToken(): CheckToken */ public function getAppBalance(): GetAppBalance { - if (!$this->getAppBalance) { - $this->getAppBalance = new GetAppBalance($this->_provider); - } - return $this->getAppBalance; + return new GetAppBalance($this->_provider); } /** @@ -73,10 +53,7 @@ public function getAppBalance(): GetAppBalance */ public function getSMSHistory(): GetSMSHistory { - if (!$this->getSMSHistory) { - $this->getSMSHistory = new GetSMSHistory($this->_provider); - } - return $this->getSMSHistory; + return new GetSMSHistory($this->_provider); } /** @@ -84,10 +61,7 @@ public function getSMSHistory(): GetSMSHistory */ public function getTransactionsHistory(): GetTransactionsHistory { - if (!$this->getTransactionsHistory) { - $this->getTransactionsHistory = new GetTransactionsHistory($this->_provider); - } - return $this->getTransactionsHistory; + return new GetTransactionsHistory($this->_provider); } /** @@ -95,10 +69,7 @@ public function getTransactionsHistory(): GetTransactionsHistory */ public function getUserLevel(): GetUserLevel { - if (!$this->getUserLevel) { - $this->getUserLevel = new GetUserLevel($this->_provider); - } - return $this->getUserLevel; + return new GetUserLevel($this->_provider); } /** @@ -106,10 +77,7 @@ public function getUserLevel(): GetUserLevel */ public function giveEventSticker(): GiveEventSticker { - if (!$this->giveEventSticker) { - $this->giveEventSticker = new GiveEventSticker($this->_provider); - } - return $this->giveEventSticker; + return new GiveEventSticker($this->_provider); } /** @@ -117,10 +85,7 @@ public function giveEventSticker(): GiveEventSticker */ public function sendNotification(): SendNotification { - if (!$this->sendNotification) { - $this->sendNotification = new SendNotification($this->_provider); - } - return $this->sendNotification; + return new SendNotification($this->_provider); } /** @@ -128,10 +93,7 @@ public function sendNotification(): SendNotification */ public function sendSMSNotification(): SendSMSNotification { - if (!$this->sendSMSNotification) { - $this->sendSMSNotification = new SendSMSNotification($this->_provider); - } - return $this->sendSMSNotification; + return new SendSMSNotification($this->_provider); } /** @@ -139,10 +101,7 @@ public function sendSMSNotification(): SendSMSNotification */ public function setCounter(): SetCounter { - if (!$this->setCounter) { - $this->setCounter = new SetCounter($this->_provider); - } - return $this->setCounter; + return new SetCounter($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Secure/AddAppEvent.php b/src/ReactPHPVK/Actions/Sections/Secure/AddAppEvent.php index a6fd32a..c35bac4 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/AddAppEvent.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/AddAppEvent.php @@ -74,7 +74,7 @@ public function setValue(int $value): AddAppEvent * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/CheckToken.php b/src/ReactPHPVK/Actions/Sections/Secure/CheckToken.php index 30dea29..93d062a 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/CheckToken.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/CheckToken.php @@ -61,7 +61,7 @@ public function setIp(string $value): CheckToken * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/GetAppBalance.php b/src/ReactPHPVK/Actions/Sections/Secure/GetAppBalance.php index fb28c54..e2cd6e7 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/GetAppBalance.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/GetAppBalance.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetAppBalance * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/GetSMSHistory.php b/src/ReactPHPVK/Actions/Sections/Secure/GetSMSHistory.php index e041b37..46af26f 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/GetSMSHistory.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/GetSMSHistory.php @@ -85,7 +85,7 @@ public function setLimit(int $value): GetSMSHistory * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/GetTransactionsHistory.php b/src/ReactPHPVK/Actions/Sections/Secure/GetTransactionsHistory.php index 22c25a3..4a14a85 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/GetTransactionsHistory.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/GetTransactionsHistory.php @@ -101,7 +101,7 @@ public function setLimit(int $value): GetTransactionsHistory * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/GetUserLevel.php b/src/ReactPHPVK/Actions/Sections/Secure/GetUserLevel.php index edbdd9b..2aed89a 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/GetUserLevel.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/GetUserLevel.php @@ -46,7 +46,7 @@ public function setUserIds(array $value): GetUserLevel * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/GiveEventSticker.php b/src/ReactPHPVK/Actions/Sections/Secure/GiveEventSticker.php index 5ee0065..6bb9c92 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/GiveEventSticker.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/GiveEventSticker.php @@ -57,7 +57,7 @@ public function setAchievementId(int $value): GiveEventSticker * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/SendNotification.php b/src/ReactPHPVK/Actions/Sections/Secure/SendNotification.php index 41b14c1..709393b 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/SendNotification.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/SendNotification.php @@ -70,7 +70,7 @@ public function setMessage(string $value): SendNotification * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/SendSMSNotification.php b/src/ReactPHPVK/Actions/Sections/Secure/SendSMSNotification.php index d12b69f..b50bba3 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/SendSMSNotification.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/SendSMSNotification.php @@ -61,7 +61,7 @@ public function setMessage(string $value): SendSMSNotification * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Secure/SetCounter.php b/src/ReactPHPVK/Actions/Sections/Secure/SetCounter.php index a9ac995..c6857ed 100644 --- a/src/ReactPHPVK/Actions/Sections/Secure/SetCounter.php +++ b/src/ReactPHPVK/Actions/Sections/Secure/SetCounter.php @@ -81,7 +81,7 @@ public function setIncrement(bool $value): SetCounter * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stats.php b/src/ReactPHPVK/Actions/Sections/Stats.php index 90ca233..93ced28 100644 --- a/src/ReactPHPVK/Actions/Sections/Stats.php +++ b/src/ReactPHPVK/Actions/Sections/Stats.php @@ -12,10 +12,6 @@ class Stats { private Provider $_provider; - private ?Stats\Get $get = null; - private ?Stats\GetPostReach $getPostReach = null; - private ?Stats\TrackVisitor $trackVisitor = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -26,10 +22,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -37,10 +30,7 @@ public function get(): Get */ public function getPostReach(): GetPostReach { - if (!$this->getPostReach) { - $this->getPostReach = new GetPostReach($this->_provider); - } - return $this->getPostReach; + return new GetPostReach($this->_provider); } /** @@ -48,10 +38,7 @@ public function getPostReach(): GetPostReach */ public function trackVisitor(): TrackVisitor { - if (!$this->trackVisitor) { - $this->trackVisitor = new TrackVisitor($this->_provider); - } - return $this->trackVisitor; + return new TrackVisitor($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Stats/Get.php b/src/ReactPHPVK/Actions/Sections/Stats/Get.php index 4eb2cc8..cf61fca 100644 --- a/src/ReactPHPVK/Actions/Sections/Stats/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Stats/Get.php @@ -138,7 +138,7 @@ public function setExtended(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stats/GetPostReach.php b/src/ReactPHPVK/Actions/Sections/Stats/GetPostReach.php index e713e47..5b930d4 100644 --- a/src/ReactPHPVK/Actions/Sections/Stats/GetPostReach.php +++ b/src/ReactPHPVK/Actions/Sections/Stats/GetPostReach.php @@ -61,7 +61,7 @@ public function setPostIds(array $value): GetPostReach * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stats/TrackVisitor.php b/src/ReactPHPVK/Actions/Sections/Stats/TrackVisitor.php index 1bd50b6..3db1ddb 100644 --- a/src/ReactPHPVK/Actions/Sections/Stats/TrackVisitor.php +++ b/src/ReactPHPVK/Actions/Sections/Stats/TrackVisitor.php @@ -46,7 +46,7 @@ public function setId(string $value): TrackVisitor * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Status.php b/src/ReactPHPVK/Actions/Sections/Status.php index 401a328..d4ff718 100644 --- a/src/ReactPHPVK/Actions/Sections/Status.php +++ b/src/ReactPHPVK/Actions/Sections/Status.php @@ -11,9 +11,6 @@ class Status { private Provider $_provider; - private ?Status\Get $get = null; - private ?Status\Set $set = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -24,10 +21,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -35,10 +29,7 @@ public function get(): Get */ public function set(): Set { - if (!$this->set) { - $this->set = new Set($this->_provider); - } - return $this->set; + return new Set($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Status/Get.php b/src/ReactPHPVK/Actions/Sections/Status/Get.php index 20b25f8..d582b1d 100644 --- a/src/ReactPHPVK/Actions/Sections/Status/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Status/Get.php @@ -59,7 +59,7 @@ public function setGroupId(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Status/Set.php b/src/ReactPHPVK/Actions/Sections/Status/Set.php index 2dbffca..d73aced 100644 --- a/src/ReactPHPVK/Actions/Sections/Status/Set.php +++ b/src/ReactPHPVK/Actions/Sections/Status/Set.php @@ -61,7 +61,7 @@ public function setGroupId(int $value): Set * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Storage.php b/src/ReactPHPVK/Actions/Sections/Storage.php index 740256c..f7f91e3 100644 --- a/src/ReactPHPVK/Actions/Sections/Storage.php +++ b/src/ReactPHPVK/Actions/Sections/Storage.php @@ -12,10 +12,6 @@ class Storage { private Provider $_provider; - private ?Storage\Get $get = null; - private ?Storage\GetKeys $getKeys = null; - private ?Storage\Set $set = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -26,10 +22,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -37,10 +30,7 @@ public function get(): Get */ public function getKeys(): GetKeys { - if (!$this->getKeys) { - $this->getKeys = new GetKeys($this->_provider); - } - return $this->getKeys; + return new GetKeys($this->_provider); } /** @@ -48,10 +38,7 @@ public function getKeys(): GetKeys */ public function set(): Set { - if (!$this->set) { - $this->set = new Set($this->_provider); - } - return $this->set; + return new Set($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Storage/Get.php b/src/ReactPHPVK/Actions/Sections/Storage/Get.php index 01b40a1..3b8c85a 100644 --- a/src/ReactPHPVK/Actions/Sections/Storage/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Storage/Get.php @@ -68,7 +68,7 @@ public function setUserId(int $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Storage/GetKeys.php b/src/ReactPHPVK/Actions/Sections/Storage/GetKeys.php index ae84341..d14d2a5 100644 --- a/src/ReactPHPVK/Actions/Sections/Storage/GetKeys.php +++ b/src/ReactPHPVK/Actions/Sections/Storage/GetKeys.php @@ -72,7 +72,7 @@ public function setCount(int $value): GetKeys * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Storage/Set.php b/src/ReactPHPVK/Actions/Sections/Storage/Set.php index 238fea0..9ffaac3 100644 --- a/src/ReactPHPVK/Actions/Sections/Storage/Set.php +++ b/src/ReactPHPVK/Actions/Sections/Storage/Set.php @@ -68,7 +68,7 @@ public function setUserId(int $value): Set * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories.php b/src/ReactPHPVK/Actions/Sections/Stories.php index 856f50b..4369dd0 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories.php +++ b/src/ReactPHPVK/Actions/Sections/Stories.php @@ -23,21 +23,6 @@ class Stories { private Provider $_provider; - private ?Stories\BanOwner $banOwner = null; - private ?Stories\Delete $delete = null; - private ?Stories\Get $get = null; - private ?Stories\GetBanned $getBanned = null; - private ?Stories\GetById $getById = null; - private ?Stories\GetPhotoUploadServer $getPhotoUploadServer = null; - private ?Stories\GetReplies $getReplies = null; - private ?Stories\GetStats $getStats = null; - private ?Stories\GetVideoUploadServer $getVideoUploadServer = null; - private ?Stories\GetViewers $getViewers = null; - private ?Stories\HideAllReplies $hideAllReplies = null; - private ?Stories\HideReply $hideReply = null; - private ?Stories\Search $search = null; - private ?Stories\UnbanOwner $unbanOwner = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -48,10 +33,7 @@ public function __construct(Provider $provider) */ public function banOwner(): BanOwner { - if (!$this->banOwner) { - $this->banOwner = new BanOwner($this->_provider); - } - return $this->banOwner; + return new BanOwner($this->_provider); } /** @@ -59,10 +41,7 @@ public function banOwner(): BanOwner */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -70,10 +49,7 @@ public function delete(): Delete */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -81,10 +57,7 @@ public function get(): Get */ public function getBanned(): GetBanned { - if (!$this->getBanned) { - $this->getBanned = new GetBanned($this->_provider); - } - return $this->getBanned; + return new GetBanned($this->_provider); } /** @@ -92,10 +65,7 @@ public function getBanned(): GetBanned */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -103,10 +73,7 @@ public function getById(): GetById */ public function getPhotoUploadServer(): GetPhotoUploadServer { - if (!$this->getPhotoUploadServer) { - $this->getPhotoUploadServer = new GetPhotoUploadServer($this->_provider); - } - return $this->getPhotoUploadServer; + return new GetPhotoUploadServer($this->_provider); } /** @@ -114,10 +81,7 @@ public function getPhotoUploadServer(): GetPhotoUploadServer */ public function getReplies(): GetReplies { - if (!$this->getReplies) { - $this->getReplies = new GetReplies($this->_provider); - } - return $this->getReplies; + return new GetReplies($this->_provider); } /** @@ -125,10 +89,7 @@ public function getReplies(): GetReplies */ public function getStats(): GetStats { - if (!$this->getStats) { - $this->getStats = new GetStats($this->_provider); - } - return $this->getStats; + return new GetStats($this->_provider); } /** @@ -136,10 +97,7 @@ public function getStats(): GetStats */ public function getVideoUploadServer(): GetVideoUploadServer { - if (!$this->getVideoUploadServer) { - $this->getVideoUploadServer = new GetVideoUploadServer($this->_provider); - } - return $this->getVideoUploadServer; + return new GetVideoUploadServer($this->_provider); } /** @@ -147,10 +105,7 @@ public function getVideoUploadServer(): GetVideoUploadServer */ public function getViewers(): GetViewers { - if (!$this->getViewers) { - $this->getViewers = new GetViewers($this->_provider); - } - return $this->getViewers; + return new GetViewers($this->_provider); } /** @@ -158,10 +113,7 @@ public function getViewers(): GetViewers */ public function hideAllReplies(): HideAllReplies { - if (!$this->hideAllReplies) { - $this->hideAllReplies = new HideAllReplies($this->_provider); - } - return $this->hideAllReplies; + return new HideAllReplies($this->_provider); } /** @@ -169,10 +121,7 @@ public function hideAllReplies(): HideAllReplies */ public function hideReply(): HideReply { - if (!$this->hideReply) { - $this->hideReply = new HideReply($this->_provider); - } - return $this->hideReply; + return new HideReply($this->_provider); } /** @@ -180,10 +129,7 @@ public function hideReply(): HideReply */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } /** @@ -191,10 +137,7 @@ public function search(): Search */ public function unbanOwner(): UnbanOwner { - if (!$this->unbanOwner) { - $this->unbanOwner = new UnbanOwner($this->_provider); - } - return $this->unbanOwner; + return new UnbanOwner($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Stories/BanOwner.php b/src/ReactPHPVK/Actions/Sections/Stories/BanOwner.php index 4babbc5..b6019b9 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/BanOwner.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/BanOwner.php @@ -48,7 +48,7 @@ public function setOwnersIds(array $value): BanOwner * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/Delete.php b/src/ReactPHPVK/Actions/Sections/Stories/Delete.php index 47d21f4..ecb0f7c 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/Delete.php @@ -61,7 +61,7 @@ public function setStoryId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/Get.php b/src/ReactPHPVK/Actions/Sections/Stories/Get.php index e61a591..1f95a94 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/Get.php @@ -72,7 +72,7 @@ public function setFields(array $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetBanned.php b/src/ReactPHPVK/Actions/Sections/Stories/GetBanned.php index 7932347..1a64e8b 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetBanned.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetBanned.php @@ -61,7 +61,7 @@ public function setFields(array $value): GetBanned * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetById.php b/src/ReactPHPVK/Actions/Sections/Stories/GetById.php index 98bd670..6cae570 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetById.php @@ -74,7 +74,7 @@ public function setFields(array $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetPhotoUploadServer.php b/src/ReactPHPVK/Actions/Sections/Stories/GetPhotoUploadServer.php index 7450108..ab2c3a7 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetPhotoUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetPhotoUploadServer.php @@ -124,7 +124,7 @@ public function setClickableStickers(string $value): GetPhotoUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetReplies.php b/src/ReactPHPVK/Actions/Sections/Stories/GetReplies.php index f73e6ed..4ace8dc 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetReplies.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetReplies.php @@ -100,7 +100,7 @@ public function setFields(array $value): GetReplies * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetStats.php b/src/ReactPHPVK/Actions/Sections/Stories/GetStats.php index 734cc6e..ac81073 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetStats.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetStats.php @@ -61,7 +61,7 @@ public function setStoryId(int $value): GetStats * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetVideoUploadServer.php b/src/ReactPHPVK/Actions/Sections/Stories/GetVideoUploadServer.php index 253a0e9..ed5fe8c 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetVideoUploadServer.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetVideoUploadServer.php @@ -124,7 +124,7 @@ public function setClickableStickers(string $value): GetVideoUploadServer * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/GetViewers.php b/src/ReactPHPVK/Actions/Sections/Stories/GetViewers.php index de355ca..2191e09 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/GetViewers.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/GetViewers.php @@ -100,7 +100,7 @@ public function setExtended(bool $value): GetViewers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/HideAllReplies.php b/src/ReactPHPVK/Actions/Sections/Stories/HideAllReplies.php index b8c95cb..3a62bd2 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/HideAllReplies.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/HideAllReplies.php @@ -59,7 +59,7 @@ public function setGroupId(int $value): HideAllReplies * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/HideReply.php b/src/ReactPHPVK/Actions/Sections/Stories/HideReply.php index 77cf2c6..499ea2a 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/HideReply.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/HideReply.php @@ -61,7 +61,7 @@ public function setStoryId(int $value): HideReply * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/Search.php b/src/ReactPHPVK/Actions/Sections/Stories/Search.php index bef0033..6e32c8c 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/Search.php @@ -134,7 +134,7 @@ public function setFields(array $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Stories/UnbanOwner.php b/src/ReactPHPVK/Actions/Sections/Stories/UnbanOwner.php index 54886c4..91ce4a2 100644 --- a/src/ReactPHPVK/Actions/Sections/Stories/UnbanOwner.php +++ b/src/ReactPHPVK/Actions/Sections/Stories/UnbanOwner.php @@ -48,7 +48,7 @@ public function setOwnersIds(array $value): UnbanOwner * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Streaming.php b/src/ReactPHPVK/Actions/Sections/Streaming.php index bbb0f50..cb03f59 100644 --- a/src/ReactPHPVK/Actions/Sections/Streaming.php +++ b/src/ReactPHPVK/Actions/Sections/Streaming.php @@ -11,9 +11,6 @@ class Streaming { private Provider $_provider; - private ?Streaming\GetServerUrl $getServerUrl = null; - private ?Streaming\SetSettings $setSettings = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -24,10 +21,7 @@ public function __construct(Provider $provider) */ public function getServerUrl(): GetServerUrl { - if (!$this->getServerUrl) { - $this->getServerUrl = new GetServerUrl($this->_provider); - } - return $this->getServerUrl; + return new GetServerUrl($this->_provider); } /** @@ -35,10 +29,7 @@ public function getServerUrl(): GetServerUrl */ public function setSettings(): SetSettings { - if (!$this->setSettings) { - $this->setSettings = new SetSettings($this->_provider); - } - return $this->setSettings; + return new SetSettings($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Streaming/GetServerUrl.php b/src/ReactPHPVK/Actions/Sections/Streaming/GetServerUrl.php index 6ad924e..bfeadc2 100644 --- a/src/ReactPHPVK/Actions/Sections/Streaming/GetServerUrl.php +++ b/src/ReactPHPVK/Actions/Sections/Streaming/GetServerUrl.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetServerUrl * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Streaming/SetSettings.php b/src/ReactPHPVK/Actions/Sections/Streaming/SetSettings.php index 270f77f..5c1afc4 100644 --- a/src/ReactPHPVK/Actions/Sections/Streaming/SetSettings.php +++ b/src/ReactPHPVK/Actions/Sections/Streaming/SetSettings.php @@ -46,7 +46,7 @@ public function setMonthlyTier(string $value): SetSettings * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Users.php b/src/ReactPHPVK/Actions/Sections/Users.php index aef6ff7..6e1f2f2 100644 --- a/src/ReactPHPVK/Actions/Sections/Users.php +++ b/src/ReactPHPVK/Actions/Sections/Users.php @@ -14,12 +14,6 @@ class Users { private Provider $_provider; - private ?Users\Get $get = null; - private ?Users\GetFollowers $getFollowers = null; - private ?Users\GetSubscriptions $getSubscriptions = null; - private ?Users\Report $report = null; - private ?Users\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -30,10 +24,7 @@ public function __construct(Provider $provider) */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -41,10 +32,7 @@ public function get(): Get */ public function getFollowers(): GetFollowers { - if (!$this->getFollowers) { - $this->getFollowers = new GetFollowers($this->_provider); - } - return $this->getFollowers; + return new GetFollowers($this->_provider); } /** @@ -52,10 +40,7 @@ public function getFollowers(): GetFollowers */ public function getSubscriptions(): GetSubscriptions { - if (!$this->getSubscriptions) { - $this->getSubscriptions = new GetSubscriptions($this->_provider); - } - return $this->getSubscriptions; + return new GetSubscriptions($this->_provider); } /** @@ -63,10 +48,7 @@ public function getSubscriptions(): GetSubscriptions */ public function report(): Report { - if (!$this->report) { - $this->report = new Report($this->_provider); - } - return $this->report; + return new Report($this->_provider); } /** @@ -74,10 +56,7 @@ public function report(): Report */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Users/Get.php b/src/ReactPHPVK/Actions/Sections/Users/Get.php index 03ab421..ac174b8 100644 --- a/src/ReactPHPVK/Actions/Sections/Users/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Users/Get.php @@ -74,7 +74,7 @@ public function setNameCase(string $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Users/GetFollowers.php b/src/ReactPHPVK/Actions/Sections/Users/GetFollowers.php index 6cee18a..c1a8492 100644 --- a/src/ReactPHPVK/Actions/Sections/Users/GetFollowers.php +++ b/src/ReactPHPVK/Actions/Sections/Users/GetFollowers.php @@ -100,7 +100,7 @@ public function setNameCase(string $value): GetFollowers * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Users/GetSubscriptions.php b/src/ReactPHPVK/Actions/Sections/Users/GetSubscriptions.php index 7234896..798793b 100644 --- a/src/ReactPHPVK/Actions/Sections/Users/GetSubscriptions.php +++ b/src/ReactPHPVK/Actions/Sections/Users/GetSubscriptions.php @@ -98,7 +98,7 @@ public function setFields(array $value): GetSubscriptions * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Users/Report.php b/src/ReactPHPVK/Actions/Sections/Users/Report.php index 71e40b0..74e5435 100644 --- a/src/ReactPHPVK/Actions/Sections/Users/Report.php +++ b/src/ReactPHPVK/Actions/Sections/Users/Report.php @@ -74,7 +74,7 @@ public function setComment(string $value): Report * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Users/Search.php b/src/ReactPHPVK/Actions/Sections/Users/Search.php index 4ce9e74..9ee542f 100644 --- a/src/ReactPHPVK/Actions/Sections/Users/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Users/Search.php @@ -447,7 +447,7 @@ public function setFromList(array $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils.php b/src/ReactPHPVK/Actions/Sections/Utils.php index 49f7f38..8ce4bec 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils.php +++ b/src/ReactPHPVK/Actions/Sections/Utils.php @@ -16,14 +16,6 @@ class Utils { private Provider $_provider; - private ?Utils\CheckLink $checkLink = null; - private ?Utils\DeleteFromLastShortened $deleteFromLastShortened = null; - private ?Utils\GetLastShortenedLinks $getLastShortenedLinks = null; - private ?Utils\GetLinkStats $getLinkStats = null; - private ?Utils\GetServerTime $getServerTime = null; - private ?Utils\GetShortLink $getShortLink = null; - private ?Utils\ResolveScreenName $resolveScreenName = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -34,10 +26,7 @@ public function __construct(Provider $provider) */ public function checkLink(): CheckLink { - if (!$this->checkLink) { - $this->checkLink = new CheckLink($this->_provider); - } - return $this->checkLink; + return new CheckLink($this->_provider); } /** @@ -45,10 +34,7 @@ public function checkLink(): CheckLink */ public function deleteFromLastShortened(): DeleteFromLastShortened { - if (!$this->deleteFromLastShortened) { - $this->deleteFromLastShortened = new DeleteFromLastShortened($this->_provider); - } - return $this->deleteFromLastShortened; + return new DeleteFromLastShortened($this->_provider); } /** @@ -56,10 +42,7 @@ public function deleteFromLastShortened(): DeleteFromLastShortened */ public function getLastShortenedLinks(): GetLastShortenedLinks { - if (!$this->getLastShortenedLinks) { - $this->getLastShortenedLinks = new GetLastShortenedLinks($this->_provider); - } - return $this->getLastShortenedLinks; + return new GetLastShortenedLinks($this->_provider); } /** @@ -67,10 +50,7 @@ public function getLastShortenedLinks(): GetLastShortenedLinks */ public function getLinkStats(): GetLinkStats { - if (!$this->getLinkStats) { - $this->getLinkStats = new GetLinkStats($this->_provider); - } - return $this->getLinkStats; + return new GetLinkStats($this->_provider); } /** @@ -78,10 +58,7 @@ public function getLinkStats(): GetLinkStats */ public function getServerTime(): GetServerTime { - if (!$this->getServerTime) { - $this->getServerTime = new GetServerTime($this->_provider); - } - return $this->getServerTime; + return new GetServerTime($this->_provider); } /** @@ -89,10 +66,7 @@ public function getServerTime(): GetServerTime */ public function getShortLink(): GetShortLink { - if (!$this->getShortLink) { - $this->getShortLink = new GetShortLink($this->_provider); - } - return $this->getShortLink; + return new GetShortLink($this->_provider); } /** @@ -100,10 +74,7 @@ public function getShortLink(): GetShortLink */ public function resolveScreenName(): ResolveScreenName { - if (!$this->resolveScreenName) { - $this->resolveScreenName = new ResolveScreenName($this->_provider); - } - return $this->resolveScreenName; + return new ResolveScreenName($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Utils/CheckLink.php b/src/ReactPHPVK/Actions/Sections/Utils/CheckLink.php index e5f43cd..aed7279 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/CheckLink.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/CheckLink.php @@ -48,7 +48,7 @@ public function setUrl(string $value): CheckLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/DeleteFromLastShortened.php b/src/ReactPHPVK/Actions/Sections/Utils/DeleteFromLastShortened.php index 772cd4f..7c17dc8 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/DeleteFromLastShortened.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/DeleteFromLastShortened.php @@ -48,7 +48,7 @@ public function setKey(string $value): DeleteFromLastShortened * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/GetLastShortenedLinks.php b/src/ReactPHPVK/Actions/Sections/Utils/GetLastShortenedLinks.php index a6da548..568beb5 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/GetLastShortenedLinks.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/GetLastShortenedLinks.php @@ -61,7 +61,7 @@ public function setOffset(int $value): GetLastShortenedLinks * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/GetLinkStats.php b/src/ReactPHPVK/Actions/Sections/Utils/GetLinkStats.php index 40a45de..6af83e9 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/GetLinkStats.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/GetLinkStats.php @@ -113,7 +113,7 @@ public function setExtended(bool $value): GetLinkStats * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/GetServerTime.php b/src/ReactPHPVK/Actions/Sections/Utils/GetServerTime.php index f70385a..29e110a 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/GetServerTime.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/GetServerTime.php @@ -35,7 +35,7 @@ public function _setCustom(array $value): GetServerTime * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/GetShortLink.php b/src/ReactPHPVK/Actions/Sections/Utils/GetShortLink.php index 1f434d6..7bfeaa6 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/GetShortLink.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/GetShortLink.php @@ -61,7 +61,7 @@ public function setPrivate(bool $value): GetShortLink * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Utils/ResolveScreenName.php b/src/ReactPHPVK/Actions/Sections/Utils/ResolveScreenName.php index bcddbbd..cb3d972 100644 --- a/src/ReactPHPVK/Actions/Sections/Utils/ResolveScreenName.php +++ b/src/ReactPHPVK/Actions/Sections/Utils/ResolveScreenName.php @@ -48,7 +48,7 @@ public function setScreenName(string $value): ResolveScreenName * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video.php b/src/ReactPHPVK/Actions/Sections/Video.php index a72ee83..f729372 100644 --- a/src/ReactPHPVK/Actions/Sections/Video.php +++ b/src/ReactPHPVK/Actions/Sections/Video.php @@ -33,31 +33,6 @@ class Video { private Provider $_provider; - private ?Video\Add $add = null; - private ?Video\AddAlbum $addAlbum = null; - private ?Video\AddToAlbum $addToAlbum = null; - private ?Video\CreateComment $createComment = null; - private ?Video\Delete $delete = null; - private ?Video\DeleteAlbum $deleteAlbum = null; - private ?Video\DeleteComment $deleteComment = null; - private ?Video\Edit $edit = null; - private ?Video\EditAlbum $editAlbum = null; - private ?Video\EditComment $editComment = null; - private ?Video\Get $get = null; - private ?Video\GetAlbumById $getAlbumById = null; - private ?Video\GetAlbums $getAlbums = null; - private ?Video\GetAlbumsByVideo $getAlbumsByVideo = null; - private ?Video\GetComments $getComments = null; - private ?Video\RemoveFromAlbum $removeFromAlbum = null; - private ?Video\ReorderAlbums $reorderAlbums = null; - private ?Video\ReorderVideos $reorderVideos = null; - private ?Video\Report $report = null; - private ?Video\ReportComment $reportComment = null; - private ?Video\Restore $restore = null; - private ?Video\RestoreComment $restoreComment = null; - private ?Video\Save $save = null; - private ?Video\Search $search = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -68,10 +43,7 @@ public function __construct(Provider $provider) */ public function add(): Add { - if (!$this->add) { - $this->add = new Add($this->_provider); - } - return $this->add; + return new Add($this->_provider); } /** @@ -79,10 +51,7 @@ public function add(): Add */ public function addAlbum(): AddAlbum { - if (!$this->addAlbum) { - $this->addAlbum = new AddAlbum($this->_provider); - } - return $this->addAlbum; + return new AddAlbum($this->_provider); } /** @@ -90,10 +59,7 @@ public function addAlbum(): AddAlbum */ public function addToAlbum(): AddToAlbum { - if (!$this->addToAlbum) { - $this->addToAlbum = new AddToAlbum($this->_provider); - } - return $this->addToAlbum; + return new AddToAlbum($this->_provider); } /** @@ -101,10 +67,7 @@ public function addToAlbum(): AddToAlbum */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -112,10 +75,7 @@ public function createComment(): CreateComment */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -123,10 +83,7 @@ public function delete(): Delete */ public function deleteAlbum(): DeleteAlbum { - if (!$this->deleteAlbum) { - $this->deleteAlbum = new DeleteAlbum($this->_provider); - } - return $this->deleteAlbum; + return new DeleteAlbum($this->_provider); } /** @@ -134,10 +91,7 @@ public function deleteAlbum(): DeleteAlbum */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -145,10 +99,7 @@ public function deleteComment(): DeleteComment */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -156,10 +107,7 @@ public function edit(): Edit */ public function editAlbum(): EditAlbum { - if (!$this->editAlbum) { - $this->editAlbum = new EditAlbum($this->_provider); - } - return $this->editAlbum; + return new EditAlbum($this->_provider); } /** @@ -167,10 +115,7 @@ public function editAlbum(): EditAlbum */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -178,10 +123,7 @@ public function editComment(): EditComment */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -189,10 +131,7 @@ public function get(): Get */ public function getAlbumById(): GetAlbumById { - if (!$this->getAlbumById) { - $this->getAlbumById = new GetAlbumById($this->_provider); - } - return $this->getAlbumById; + return new GetAlbumById($this->_provider); } /** @@ -200,10 +139,7 @@ public function getAlbumById(): GetAlbumById */ public function getAlbums(): GetAlbums { - if (!$this->getAlbums) { - $this->getAlbums = new GetAlbums($this->_provider); - } - return $this->getAlbums; + return new GetAlbums($this->_provider); } /** @@ -211,10 +147,7 @@ public function getAlbums(): GetAlbums */ public function getAlbumsByVideo(): GetAlbumsByVideo { - if (!$this->getAlbumsByVideo) { - $this->getAlbumsByVideo = new GetAlbumsByVideo($this->_provider); - } - return $this->getAlbumsByVideo; + return new GetAlbumsByVideo($this->_provider); } /** @@ -222,10 +155,7 @@ public function getAlbumsByVideo(): GetAlbumsByVideo */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -233,10 +163,7 @@ public function getComments(): GetComments */ public function removeFromAlbum(): RemoveFromAlbum { - if (!$this->removeFromAlbum) { - $this->removeFromAlbum = new RemoveFromAlbum($this->_provider); - } - return $this->removeFromAlbum; + return new RemoveFromAlbum($this->_provider); } /** @@ -244,10 +171,7 @@ public function removeFromAlbum(): RemoveFromAlbum */ public function reorderAlbums(): ReorderAlbums { - if (!$this->reorderAlbums) { - $this->reorderAlbums = new ReorderAlbums($this->_provider); - } - return $this->reorderAlbums; + return new ReorderAlbums($this->_provider); } /** @@ -255,10 +179,7 @@ public function reorderAlbums(): ReorderAlbums */ public function reorderVideos(): ReorderVideos { - if (!$this->reorderVideos) { - $this->reorderVideos = new ReorderVideos($this->_provider); - } - return $this->reorderVideos; + return new ReorderVideos($this->_provider); } /** @@ -266,10 +187,7 @@ public function reorderVideos(): ReorderVideos */ public function report(): Report { - if (!$this->report) { - $this->report = new Report($this->_provider); - } - return $this->report; + return new Report($this->_provider); } /** @@ -277,10 +195,7 @@ public function report(): Report */ public function reportComment(): ReportComment { - if (!$this->reportComment) { - $this->reportComment = new ReportComment($this->_provider); - } - return $this->reportComment; + return new ReportComment($this->_provider); } /** @@ -288,10 +203,7 @@ public function reportComment(): ReportComment */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } /** @@ -299,10 +211,7 @@ public function restore(): Restore */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } /** @@ -310,10 +219,7 @@ public function restoreComment(): RestoreComment */ public function save(): Save { - if (!$this->save) { - $this->save = new Save($this->_provider); - } - return $this->save; + return new Save($this->_provider); } /** @@ -321,10 +227,7 @@ public function save(): Save */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Video/Add.php b/src/ReactPHPVK/Actions/Sections/Video/Add.php index 51f9ad7..672810c 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Add.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Add.php @@ -74,7 +74,7 @@ public function setOwnerId(int $value): Add * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/AddAlbum.php b/src/ReactPHPVK/Actions/Sections/Video/AddAlbum.php index 91baaf6..f637f59 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/AddAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Video/AddAlbum.php @@ -74,7 +74,7 @@ public function setPrivacy(array $value): AddAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/AddToAlbum.php b/src/ReactPHPVK/Actions/Sections/Video/AddToAlbum.php index 592f3d3..ed9d577 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/AddToAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Video/AddToAlbum.php @@ -90,7 +90,7 @@ public function setVideoId(int $value): AddToAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Video/CreateComment.php index 943e303..159d883 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Video/CreateComment.php @@ -133,7 +133,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Delete.php b/src/ReactPHPVK/Actions/Sections/Video/Delete.php index 6b78377..122593b 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Delete.php @@ -72,7 +72,7 @@ public function setTargetId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/DeleteAlbum.php b/src/ReactPHPVK/Actions/Sections/Video/DeleteAlbum.php index fa5a458..85efff1 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/DeleteAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Video/DeleteAlbum.php @@ -61,7 +61,7 @@ public function setAlbumId(int $value): DeleteAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Video/DeleteComment.php index faa0a8f..95420cf 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Video/DeleteComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Edit.php b/src/ReactPHPVK/Actions/Sections/Video/Edit.php index 64baf0d..3a4867e 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Edit.php @@ -139,7 +139,7 @@ public function setRepeat(bool $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/EditAlbum.php b/src/ReactPHPVK/Actions/Sections/Video/EditAlbum.php index cfbe0f3..fc1a3a6 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/EditAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Video/EditAlbum.php @@ -87,7 +87,7 @@ public function setPrivacy(array $value): EditAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/EditComment.php b/src/ReactPHPVK/Actions/Sections/Video/EditComment.php index d9ceaad..f78dc45 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Video/EditComment.php @@ -87,7 +87,7 @@ public function setAttachments(array $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Get.php b/src/ReactPHPVK/Actions/Sections/Video/Get.php index 36e91be..f318cb8 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Get.php @@ -113,7 +113,7 @@ public function setExtended(bool $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/GetAlbumById.php b/src/ReactPHPVK/Actions/Sections/Video/GetAlbumById.php index 86055d2..2b63f3b 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/GetAlbumById.php +++ b/src/ReactPHPVK/Actions/Sections/Video/GetAlbumById.php @@ -61,7 +61,7 @@ public function setAlbumId(int $value): GetAlbumById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/GetAlbums.php b/src/ReactPHPVK/Actions/Sections/Video/GetAlbums.php index 727176c..578d903 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/GetAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Video/GetAlbums.php @@ -98,7 +98,7 @@ public function setNeedSystem(bool $value): GetAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/GetAlbumsByVideo.php b/src/ReactPHPVK/Actions/Sections/Video/GetAlbumsByVideo.php index 59fcdbb..b25d148 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/GetAlbumsByVideo.php +++ b/src/ReactPHPVK/Actions/Sections/Video/GetAlbumsByVideo.php @@ -79,7 +79,7 @@ public function setExtended(bool $value): GetAlbumsByVideo * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/GetComments.php b/src/ReactPHPVK/Actions/Sections/Video/GetComments.php index 2bb4ef7..7adcd52 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Video/GetComments.php @@ -146,7 +146,7 @@ public function setFields(array $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/RemoveFromAlbum.php b/src/ReactPHPVK/Actions/Sections/Video/RemoveFromAlbum.php index 92a51a3..257b1ac 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/RemoveFromAlbum.php +++ b/src/ReactPHPVK/Actions/Sections/Video/RemoveFromAlbum.php @@ -90,7 +90,7 @@ public function setVideoId(int $value): RemoveFromAlbum * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/ReorderAlbums.php b/src/ReactPHPVK/Actions/Sections/Video/ReorderAlbums.php index 241d7ac..debfb89 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/ReorderAlbums.php +++ b/src/ReactPHPVK/Actions/Sections/Video/ReorderAlbums.php @@ -87,7 +87,7 @@ public function setAfter(int $value): ReorderAlbums * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/ReorderVideos.php b/src/ReactPHPVK/Actions/Sections/Video/ReorderVideos.php index 56b0cee..d09ff9d 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/ReorderVideos.php +++ b/src/ReactPHPVK/Actions/Sections/Video/ReorderVideos.php @@ -139,7 +139,7 @@ public function setAfterVideoId(int $value): ReorderVideos * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Report.php b/src/ReactPHPVK/Actions/Sections/Video/Report.php index 2706b56..93c3386 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Report.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Report.php @@ -100,7 +100,7 @@ public function setSearchQuery(string $value): Report * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/ReportComment.php b/src/ReactPHPVK/Actions/Sections/Video/ReportComment.php index 21c9a0d..7762725 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/ReportComment.php +++ b/src/ReactPHPVK/Actions/Sections/Video/ReportComment.php @@ -74,7 +74,7 @@ public function setReason(int $value): ReportComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Restore.php b/src/ReactPHPVK/Actions/Sections/Video/Restore.php index 95c73ad..d68ee20 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Restore.php @@ -61,7 +61,7 @@ public function setOwnerId(int $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Video/RestoreComment.php index 2dbb097..ae87d72 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Video/RestoreComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Save.php b/src/ReactPHPVK/Actions/Sections/Video/Save.php index 47ed314..602848f 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Save.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Save.php @@ -183,7 +183,7 @@ public function setCompression(bool $value): Save * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Video/Search.php b/src/ReactPHPVK/Actions/Sections/Video/Search.php index 985b061..91cbdb8 100644 --- a/src/ReactPHPVK/Actions/Sections/Video/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Video/Search.php @@ -170,7 +170,7 @@ public function setExtended(bool $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall.php b/src/ReactPHPVK/Actions/Sections/Wall.php index b095fba..33f279e 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall.php +++ b/src/ReactPHPVK/Actions/Sections/Wall.php @@ -32,30 +32,6 @@ class Wall { private Provider $_provider; - private ?Wall\CloseComments $closeComments = null; - private ?Wall\CreateComment $createComment = null; - private ?Wall\Delete $delete = null; - private ?Wall\DeleteComment $deleteComment = null; - private ?Wall\Edit $edit = null; - private ?Wall\EditAdsStealth $editAdsStealth = null; - private ?Wall\EditComment $editComment = null; - private ?Wall\Get $get = null; - private ?Wall\GetById $getById = null; - private ?Wall\GetComment $getComment = null; - private ?Wall\GetComments $getComments = null; - private ?Wall\GetReposts $getReposts = null; - private ?Wall\OpenComments $openComments = null; - private ?Wall\Pin $pin = null; - private ?Wall\Post $post = null; - private ?Wall\PostAdsStealth $postAdsStealth = null; - private ?Wall\ReportComment $reportComment = null; - private ?Wall\ReportPost $reportPost = null; - private ?Wall\Repost $repost = null; - private ?Wall\Restore $restore = null; - private ?Wall\RestoreComment $restoreComment = null; - private ?Wall\Search $search = null; - private ?Wall\Unpin $unpin = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -66,10 +42,7 @@ public function __construct(Provider $provider) */ public function closeComments(): CloseComments { - if (!$this->closeComments) { - $this->closeComments = new CloseComments($this->_provider); - } - return $this->closeComments; + return new CloseComments($this->_provider); } /** @@ -77,10 +50,7 @@ public function closeComments(): CloseComments */ public function createComment(): CreateComment { - if (!$this->createComment) { - $this->createComment = new CreateComment($this->_provider); - } - return $this->createComment; + return new CreateComment($this->_provider); } /** @@ -88,10 +58,7 @@ public function createComment(): CreateComment */ public function delete(): Delete { - if (!$this->delete) { - $this->delete = new Delete($this->_provider); - } - return $this->delete; + return new Delete($this->_provider); } /** @@ -99,10 +66,7 @@ public function delete(): Delete */ public function deleteComment(): DeleteComment { - if (!$this->deleteComment) { - $this->deleteComment = new DeleteComment($this->_provider); - } - return $this->deleteComment; + return new DeleteComment($this->_provider); } /** @@ -110,10 +74,7 @@ public function deleteComment(): DeleteComment */ public function edit(): Edit { - if (!$this->edit) { - $this->edit = new Edit($this->_provider); - } - return $this->edit; + return new Edit($this->_provider); } /** @@ -121,10 +82,7 @@ public function edit(): Edit */ public function editAdsStealth(): EditAdsStealth { - if (!$this->editAdsStealth) { - $this->editAdsStealth = new EditAdsStealth($this->_provider); - } - return $this->editAdsStealth; + return new EditAdsStealth($this->_provider); } /** @@ -132,10 +90,7 @@ public function editAdsStealth(): EditAdsStealth */ public function editComment(): EditComment { - if (!$this->editComment) { - $this->editComment = new EditComment($this->_provider); - } - return $this->editComment; + return new EditComment($this->_provider); } /** @@ -143,10 +98,7 @@ public function editComment(): EditComment */ public function get(): Get { - if (!$this->get) { - $this->get = new Get($this->_provider); - } - return $this->get; + return new Get($this->_provider); } /** @@ -154,10 +106,7 @@ public function get(): Get */ public function getById(): GetById { - if (!$this->getById) { - $this->getById = new GetById($this->_provider); - } - return $this->getById; + return new GetById($this->_provider); } /** @@ -165,10 +114,7 @@ public function getById(): GetById */ public function getComment(): GetComment { - if (!$this->getComment) { - $this->getComment = new GetComment($this->_provider); - } - return $this->getComment; + return new GetComment($this->_provider); } /** @@ -176,10 +122,7 @@ public function getComment(): GetComment */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -187,10 +130,7 @@ public function getComments(): GetComments */ public function getReposts(): GetReposts { - if (!$this->getReposts) { - $this->getReposts = new GetReposts($this->_provider); - } - return $this->getReposts; + return new GetReposts($this->_provider); } /** @@ -198,10 +138,7 @@ public function getReposts(): GetReposts */ public function openComments(): OpenComments { - if (!$this->openComments) { - $this->openComments = new OpenComments($this->_provider); - } - return $this->openComments; + return new OpenComments($this->_provider); } /** @@ -209,10 +146,7 @@ public function openComments(): OpenComments */ public function pin(): Pin { - if (!$this->pin) { - $this->pin = new Pin($this->_provider); - } - return $this->pin; + return new Pin($this->_provider); } /** @@ -220,10 +154,7 @@ public function pin(): Pin */ public function post(): Post { - if (!$this->post) { - $this->post = new Post($this->_provider); - } - return $this->post; + return new Post($this->_provider); } /** @@ -231,10 +162,7 @@ public function post(): Post */ public function postAdsStealth(): PostAdsStealth { - if (!$this->postAdsStealth) { - $this->postAdsStealth = new PostAdsStealth($this->_provider); - } - return $this->postAdsStealth; + return new PostAdsStealth($this->_provider); } /** @@ -242,10 +170,7 @@ public function postAdsStealth(): PostAdsStealth */ public function reportComment(): ReportComment { - if (!$this->reportComment) { - $this->reportComment = new ReportComment($this->_provider); - } - return $this->reportComment; + return new ReportComment($this->_provider); } /** @@ -253,10 +178,7 @@ public function reportComment(): ReportComment */ public function reportPost(): ReportPost { - if (!$this->reportPost) { - $this->reportPost = new ReportPost($this->_provider); - } - return $this->reportPost; + return new ReportPost($this->_provider); } /** @@ -264,10 +186,7 @@ public function reportPost(): ReportPost */ public function repost(): Repost { - if (!$this->repost) { - $this->repost = new Repost($this->_provider); - } - return $this->repost; + return new Repost($this->_provider); } /** @@ -275,10 +194,7 @@ public function repost(): Repost */ public function restore(): Restore { - if (!$this->restore) { - $this->restore = new Restore($this->_provider); - } - return $this->restore; + return new Restore($this->_provider); } /** @@ -286,10 +202,7 @@ public function restore(): Restore */ public function restoreComment(): RestoreComment { - if (!$this->restoreComment) { - $this->restoreComment = new RestoreComment($this->_provider); - } - return $this->restoreComment; + return new RestoreComment($this->_provider); } /** @@ -297,10 +210,7 @@ public function restoreComment(): RestoreComment */ public function search(): Search { - if (!$this->search) { - $this->search = new Search($this->_provider); - } - return $this->search; + return new Search($this->_provider); } /** @@ -308,10 +218,7 @@ public function search(): Search */ public function unpin(): Unpin { - if (!$this->unpin) { - $this->unpin = new Unpin($this->_provider); - } - return $this->unpin; + return new Unpin($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Wall/CloseComments.php b/src/ReactPHPVK/Actions/Sections/Wall/CloseComments.php index f609ae0..a7ba933 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/CloseComments.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/CloseComments.php @@ -57,7 +57,7 @@ public function setPostId(int $value): CloseComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/CreateComment.php b/src/ReactPHPVK/Actions/Sections/Wall/CreateComment.php index 60f1ec4..7234997 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/CreateComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/CreateComment.php @@ -139,7 +139,7 @@ public function setGuid(string $value): CreateComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Delete.php b/src/ReactPHPVK/Actions/Sections/Wall/Delete.php index 0144987..8b451b6 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Delete.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Delete.php @@ -61,7 +61,7 @@ public function setPostId(int $value): Delete * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/DeleteComment.php b/src/ReactPHPVK/Actions/Sections/Wall/DeleteComment.php index e47b648..3419b24 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/DeleteComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/DeleteComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): DeleteComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Edit.php b/src/ReactPHPVK/Actions/Sections/Wall/Edit.php index 94ee69e..3da1949 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Edit.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Edit.php @@ -228,7 +228,7 @@ public function setCopyright(string $value): Edit * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/EditAdsStealth.php b/src/ReactPHPVK/Actions/Sections/Wall/EditAdsStealth.php index 070f604..7c0af2a 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/EditAdsStealth.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/EditAdsStealth.php @@ -191,7 +191,7 @@ public function setLinkVideo(string $value): EditAdsStealth * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/EditComment.php b/src/ReactPHPVK/Actions/Sections/Wall/EditComment.php index 0f97d50..92cc1d8 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/EditComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/EditComment.php @@ -87,7 +87,7 @@ public function setAttachments(array $value): EditComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Get.php b/src/ReactPHPVK/Actions/Sections/Wall/Get.php index 1c110ee..ba076a7 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Get.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Get.php @@ -124,7 +124,7 @@ public function setFields(array $value): Get * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/GetById.php b/src/ReactPHPVK/Actions/Sections/Wall/GetById.php index ad17f54..0200a19 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/GetById.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/GetById.php @@ -85,7 +85,7 @@ public function setFields(array $value): GetById * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/GetComment.php b/src/ReactPHPVK/Actions/Sections/Wall/GetComment.php index 2353057..df7ed15 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/GetComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/GetComment.php @@ -83,7 +83,7 @@ public function setFields(array $value): GetComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/GetComments.php b/src/ReactPHPVK/Actions/Sections/Wall/GetComments.php index 3cde559..ba0d7f6 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/GetComments.php @@ -185,7 +185,7 @@ public function setThreadItemsCount(int $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/GetReposts.php b/src/ReactPHPVK/Actions/Sections/Wall/GetReposts.php index 0ccd3f1..9821765 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/GetReposts.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/GetReposts.php @@ -87,7 +87,7 @@ public function setCount(int $value): GetReposts * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/OpenComments.php b/src/ReactPHPVK/Actions/Sections/Wall/OpenComments.php index 1bd2ffb..983743f 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/OpenComments.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/OpenComments.php @@ -57,7 +57,7 @@ public function setPostId(int $value): OpenComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Pin.php b/src/ReactPHPVK/Actions/Sections/Wall/Pin.php index 517cade..4eb08a8 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Pin.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Pin.php @@ -61,7 +61,7 @@ public function setPostId(int $value): Pin * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Post.php b/src/ReactPHPVK/Actions/Sections/Wall/Post.php index 7c1211d..ae795fa 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Post.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Post.php @@ -246,7 +246,7 @@ public function setCopyright(string $value): Post * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/PostAdsStealth.php b/src/ReactPHPVK/Actions/Sections/Wall/PostAdsStealth.php index 9f31233..abe092c 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/PostAdsStealth.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/PostAdsStealth.php @@ -191,7 +191,7 @@ public function setLinkVideo(string $value): PostAdsStealth * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/ReportComment.php b/src/ReactPHPVK/Actions/Sections/Wall/ReportComment.php index 670ca4d..bcba72c 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/ReportComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/ReportComment.php @@ -74,7 +74,7 @@ public function setReason(int $value): ReportComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/ReportPost.php b/src/ReactPHPVK/Actions/Sections/Wall/ReportPost.php index b41af6e..72154ce 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/ReportPost.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/ReportPost.php @@ -74,7 +74,7 @@ public function setReason(int $value): ReportPost * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Repost.php b/src/ReactPHPVK/Actions/Sections/Wall/Repost.php index 4d2d8cb..d81cfcd 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Repost.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Repost.php @@ -96,7 +96,7 @@ public function setMuteNotifications(bool $value): Repost * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Restore.php b/src/ReactPHPVK/Actions/Sections/Wall/Restore.php index a87e988..adc469e 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Restore.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Restore.php @@ -61,7 +61,7 @@ public function setPostId(int $value): Restore * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/RestoreComment.php b/src/ReactPHPVK/Actions/Sections/Wall/RestoreComment.php index 1030b0a..0ebeeb6 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/RestoreComment.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/RestoreComment.php @@ -61,7 +61,7 @@ public function setCommentId(int $value): RestoreComment * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Search.php b/src/ReactPHPVK/Actions/Sections/Wall/Search.php index 79279d2..0df1ee0 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Search.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Search.php @@ -137,7 +137,7 @@ public function setFields(array $value): Search * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Wall/Unpin.php b/src/ReactPHPVK/Actions/Sections/Wall/Unpin.php index ebcd308..cb35c97 100644 --- a/src/ReactPHPVK/Actions/Sections/Wall/Unpin.php +++ b/src/ReactPHPVK/Actions/Sections/Wall/Unpin.php @@ -61,7 +61,7 @@ public function setPostId(int $value): Unpin * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Widgets.php b/src/ReactPHPVK/Actions/Sections/Widgets.php index afba204..830cc65 100644 --- a/src/ReactPHPVK/Actions/Sections/Widgets.php +++ b/src/ReactPHPVK/Actions/Sections/Widgets.php @@ -11,9 +11,6 @@ class Widgets { private Provider $_provider; - private ?Widgets\GetComments $getComments = null; - private ?Widgets\GetPages $getPages = null; - public function __construct(Provider $provider) { $this->_provider = $provider; @@ -24,10 +21,7 @@ public function __construct(Provider $provider) */ public function getComments(): GetComments { - if (!$this->getComments) { - $this->getComments = new GetComments($this->_provider); - } - return $this->getComments; + return new GetComments($this->_provider); } /** @@ -35,10 +29,7 @@ public function getComments(): GetComments */ public function getPages(): GetPages { - if (!$this->getPages) { - $this->getPages = new GetPages($this->_provider); - } - return $this->getPages; + return new GetPages($this->_provider); } } \ No newline at end of file diff --git a/src/ReactPHPVK/Actions/Sections/Widgets/GetComments.php b/src/ReactPHPVK/Actions/Sections/Widgets/GetComments.php index 4610571..dc57b83 100644 --- a/src/ReactPHPVK/Actions/Sections/Widgets/GetComments.php +++ b/src/ReactPHPVK/Actions/Sections/Widgets/GetComments.php @@ -112,7 +112,7 @@ public function setCount(int $value): GetComments * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = []; diff --git a/src/ReactPHPVK/Actions/Sections/Widgets/GetPages.php b/src/ReactPHPVK/Actions/Sections/Widgets/GetPages.php index c04b9f3..c03a9ca 100644 --- a/src/ReactPHPVK/Actions/Sections/Widgets/GetPages.php +++ b/src/ReactPHPVK/Actions/Sections/Widgets/GetPages.php @@ -90,7 +90,7 @@ public function setCount(int $value): GetPages * @param bool $withClear * @return Promise */ - public function execute(bool $withClear = true): Promise + public function execute(bool $withClear = false): Promise { $params = [];