You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2025. It is now read-only.
if you want to create application you can use production-ready contracts in namespace
124
+
`Bitrix24\SDK\Application\Contracts`:
125
+
126
+
-`Bitrix24Accounts` — Store auth tokens and
127
+
provides [methods](src/Application/Contracts/Bitrix24Accounts/Docs/Bitrix24Accounts.md) for work with Bitrix24
128
+
account.
129
+
-`ApplicationInstallations` — Store information about [application installation](src/Application/Contracts/ApplicationInstallations/Docs/ApplicationInstallations.md), linked with Bitrix24 Account with auth
130
+
tokens. Optional can store links to:
131
+
- Client contact person: client person who responsible for application usage
132
+
- Bitrix24 Partner contact person: partner contact person who supports client and configure application
133
+
- Bitrix24 Partner: partner who supports client portal
134
+
-`ContactPersons` – Store information [about person](src/Application/Contracts/ContactPersons/Docs/ContactPersons.md) who installed application.
135
+
-`Bitrix24Partners` – Store information about [Bitrix24 Partner](src/Application/Contracts/Bitrix24Partners/Docs/Bitrix24Partners.md) who supports client portal and install or configure application.
136
+
137
+
Steps:
138
+
1. Create own entity of this bounded contexts.
139
+
2. Implement all methods in contract interfaces.
140
+
3. Test own implementation behavior with contract-tests `tests/Unit/Application/Contracts/*` – examples.
141
+
124
142
## Tests
125
143
126
144
Tests locate in folder `tests` and we have two test types.
127
145
In folder tests create file `.env.local` and fill environment variables from `.env`.
128
146
147
+
### PHP Static Analysis Tool – phpstan
148
+
149
+
Call in command line
150
+
151
+
```shell
152
+
make lint-phpstan
153
+
```
154
+
### PHP Static Analysis Tool – rector
155
+
156
+
Call in command line for validate
157
+
158
+
```shell
159
+
make lint-rector
160
+
```
161
+
Call in command line for fix codebase
162
+
163
+
```shell
164
+
make lint-rector-fix
165
+
```
166
+
129
167
### Unit tests
130
168
131
169
**Fast**, in-memory tests without a network I\O For run unit tests you must call in command line
0 commit comments