@@ -43,20 +43,20 @@ Directory Structure
4343
4444### Examples
4545
46- - ` examples ` : samples how to use ` DefinitionGeneratorFacade ` and ` TransferGeneratorFacade `
46+ - ` examples ` : samples on how to use ` DefinitionGeneratorFacade ` and ` TransferGeneratorFacade `
4747
4848### Source
4949
5050- ` src ` : code source
5151- ` src/Command ` : Symfony console commands to generate definition and transfer object files
5252- ` src/DefinitionGenerator ` : definition generator module
53- - ` src/Dependency ` : wrapper over 3-part dependencies
53+ - ` src/Dependency ` : wrapper over third-party dependencies
5454- ` src/Generated ` : directory where generated transfer objects are saved
5555 * should not contain any custom-written code
56- * each transfer object generator run will overwrite all the files in the directory
56+ * each transfer object generator run overwrites all the files in the directory
5757 * can be used across modules
58- - ` src/Generated/_tmp ` : temporary directory includes newly generated transfer objects before they are finally moved to the ` src/Generated `
59- * in case of an unexpected error, the directory might not be deleted
58+ - ` src/Generated/_tmp ` : temporary directory including newly generated transfer objects before they are finally moved to the ` src/Generated `
59+ * in case of an unexpected error, the directory might not be deleted.
6060- ` src/Shared ` : contains code shared across modules
6161 * can be used across modules
6262- ` src/Transfer ` : transfer object module
@@ -100,20 +100,20 @@ Code Style
100100
101101### Tests
102102
103- - tests classes should be a ` final `
103+ - test classes should be ` final `
104104- tests should have at least one test group
105105
106106Module Structure
107107----------------
108108
109109#### Facade
110110
111- - each module should have a facade class with an interface
112- - the facade class and interface name should include the module name with ` Facade ` suffix
113- - the facade is used for communication between modules
114- - the facade used factories
115- - the facade should not include any business logic
116- - the facade ` public ` methods should have specification doc-block
111+ - each module should have a facade class with an interface.
112+ - the facade class and interface name should include the module name with ` Facade ` suffix.
113+ - the facade is used for communication between modules.
114+ - the facade uses factories.
115+ - the facade should not include any business logic.
116+ - the facade ` public ` methods should have a specification doc-block.
117117
118118### Factory
119119
@@ -129,34 +129,42 @@ Module Structure
129129Unit and Integration Tests
130130--------------------------
131131
132- - tests should follow a similar structure to the existing ones
133- - separate test implementation by comment sections: "Arrange", "Act", "Assert" (optionally with "Expect")
134- - use ` setUp ` method to initialize the tested object's stubs and mocks
135- - use ` PHPUnit ` attributes
136- - use [ PHP generator] ( https://www.php.net/manual/en/class.generator.php ) for the data providers
132+ - tests should follow a similar structure to the existing ones.
133+ - separate test implementation by comment sections: "Arrange", "Act", "Assert" (optionally with "Expect").
134+ - use ` setUp ` method to initialize the tested object's stubs and mocks.
135+ - use ` PHPUnit ` attributes.
136+ - use [ PHP generator] ( https://www.php.net/manual/en/class.generator.php ) for the data providers.
137+
138+ How To Install Project
139+ ----------------------
140+
141+ The project is installed by running the following command:
142+ ``` console
143+ docker/sdk install
144+ ```
137145
138146How To Build/Start/Stop Docker Environment
139147-------------------------------------------
140148
141- Docker Environment can be built by running the following command:
149+ Docker Environment is built by running the following command:
142150``` console
143151docker/sdk build
144152```
145153
146- Docker Environment can be started by running the following command:
154+ Docker Environment is started by running the following command:
147155``` console
148156docker/sdk start
149157```
150158
151- Docker Environment can be stopped by running the following command:
159+ Docker Environment is stopped by running the following command:
152160``` console
153161docker/sdk stop
154162```
155163
156164How to Run PHP Script
157165---------------------
158166
159- The PHP script can be run by command:
167+ The PHP script runs by command:
160168``` console
161169docker/sdk cli [path-to-script]
162170```
@@ -169,7 +177,7 @@ docker/sdk cli ./examples/try-transfer-generator.php
169177How to Generate Internal Transfer Objects
170178-----------------------------------------
171179
172- The all project transfer objects (generator's, examples, tests) can be generated with the following command:
180+ All project transfer objects (generator's, examples, tests) can be generated with the following command:
173181``` console
174182docker/sdk to-generate-bulk
175183```
@@ -182,29 +190,29 @@ docker/sdk to-generate
182190How to Generate Transfer Objects By Configuration File
183191------------------------------------------------------
184192
185- Transfer Objects can be generated by configuration file path, relative from the project's root, by running the following command:
193+ Transfer objects can be generated by a configuration file path, relative from the project's root, by running the following command:
186194``` console
187195docker/sdk to-generate [path-to-configuration-file]
188196```
189197
190- How To Run PHPUnit Tests
198+ How to Run PHPUnit Tests
191199------------------------
192200
193- ### All Tests
201+ ### How to Run All Tests
194202
195203All tests can be run with the following command:
196204``` console
197205docker/sdk phpunit
198206```
199207
200- ### Specific Group
208+ ### How to Run Test Group
201209
202210A test group can be run with the following command:
203211``` console
204212docker/sdk phpunit-group <group>
205213```
206214
207- ### Specific Test Case
215+ ### How to Run Test Case
208216
209217A test case can be run with the following command:
210218``` console
@@ -217,26 +225,54 @@ can be run with the following command:
217225docker/sdk phpunit 'Picamator\\Tests\\Unit\\TransferObject\\Command\\Helper\\InputNormalizerTest'
218226```
219227
220- How To Run PHPStan
228+ How to Run PHPStan
221229------------------
222230
223- PHPStan can be run with the following command:
231+ For all project's files, PHPStan can be run with the following command:
224232``` console
225233docker/sdk phpstan
226234```
227235
228- How To Run PHP CodeSniffer
236+ For the specific file:
237+ ``` console
238+ docker/sdk phpstan <file-path>
239+ ```
240+
241+ How to Run PHP CodeSniffer
229242--------------------------
230243
231- PHP CodeSniffer can be run with the following command:
244+ For all project's files, PHP CodeSniffer can be run with the following command:
232245``` console
233246docker/sdk phpcs
234247```
235248
236- How To Run Composer
249+ For the specific file:
250+ ``` console
251+ docker/sdk phpcs <file-path>
252+ ```
253+
254+ How to Run PHP Code Beautifier and Fixer
255+ ----------------------------------------
256+
257+ For all project's files, PHP Code Beautifier and Fixer can be run with the following command:
258+ ``` console
259+ docker/sdk phpcbf
260+ ```
261+
262+ For the specific file:
263+ ``` console
264+ docker/sdk phpcbf <file-path>
265+ ```
266+
267+ How to Run Composer
237268-------------------
238269
239- PHPStan can be run with the following command:
270+ Composer can be run with the following command:
240271``` console
241272docker/sdk composer
242273```
274+
275+ The command supports multiple arguments, for example:
276+ ``` console
277+ docker/sdk composer install
278+ ```
0 commit comments