Skip to content

Commit b039a45

Browse files
committed
Refactor findByBitrix24AccountId method to return a single ?ApplicationInstallationInterface instead of an array. Update related tests and CHANGELOG.
Signed-off-by: mesilov <[email protected]>
1 parent bbc318e commit b039a45

File tree

4 files changed

+244
-173
lines changed

4 files changed

+244
-173
lines changed

CHANGELOG.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,18 @@
109109
- added method `isApplicationTokenValid`
110110
- changed method `public function applicationInstalled(?string $applicationToken): void` application token now is nullable
111111
- changed method `public function applicationUninstalled(?string $applicationToken): void` application token now is nullable
112-
- added method `linkContactPerson(Uuid $uuid)`
113-
- added method `linkBitrix24Partner()`
114-
- added method `unlinkBitrix24Partner()`
115-
- added method `unlinkContactPerson()`
116-
- added method `linkBitrix24PartnerContactPerson()`
117-
- added method `unlinkBitrix24PartnerContactPerson()`
118-
- remove method `changeContactPerson(?Uuid $uuid)`
119-
- remove method `changeBitrix24Partner(?Uuid $uuid)`
120-
- remove method `changeBitrix24PartnerContactPerson(?Uuid $uuid)`
112+
- added method `linkContactPerson(Uuid $uuid)`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
113+
- added method `linkBitrix24Partner()`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
114+
- added method `unlinkBitrix24Partner()`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
115+
- added method `unlinkContactPerson()`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
116+
- added method `linkBitrix24PartnerContactPerson()`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
117+
- added method `unlinkBitrix24PartnerContactPerson()`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
118+
- remove method `changeContactPerson(?Uuid $uuid)`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
119+
- remove method `changeBitrix24Partner(?Uuid $uuid)`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
120+
- remove method `changeBitrix24PartnerContactPerson(?Uuid $uuid)`, see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/166).
121+
-**️️BC** Changed contract `Bitrix24\SDK\Application\Contracts\ApplicationInstallations\Repository\ApplicationInstallationRepositoryInterface`,
122+
see [change signatures](https://github.com/bitrix24/b24phpsdk/issues/167):
123+
- change return type `findByBitrix24AccountId` from an array to `?ApplicationInstallationInterface`
121124

122125
### Statistics
123126

src/Application/Contracts/ApplicationInstallations/Repository/ApplicationInstallationRepositoryInterface.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ public function delete(Uuid $uuid): void;
4444

4545
/**
4646
* Find application installation by bitrix24 account id
47-
*
48-
* @return ApplicationInstallationInterface[]
49-
*/
50-
public function findByBitrix24AccountId(Uuid $uuid): array;
47+
**/
48+
public function findByBitrix24AccountId(Uuid $uuid): ?ApplicationInstallationInterface;
5149

5250
/**
5351
* Find application installation by external id

0 commit comments

Comments
 (0)