| name | php-style |
|---|---|
| description | Use when applying PSR-2, running PHPCS, or matching src/tests layout and strict_types in this repo. |
- Fixing or avoiding PHPCS violations
- Adding new classes under
src/or tests undertests/ - Aligning with existing
declare(strict_types=1);usage
- PHPCS ruleset:
phpcs.xml.distextends PSR-2 (<rule ref="PSR2" />). - Check:
composer check-style; fix:composer fix-style(both targetsrcandtestspercomposer.jsonscripts).
- Source:
src/— namespaces mirror directories (e.g.Contentstack\Utils\Model\Option→src/Model/Option.php). - Tests:
tests/— namespaceContentstack\Tests\Utils\percomposer.jsonautoload-dev.
composer.jsonrequiresphp: >=7.2; avoid language features that require newer versions unless the project explicitly raises the minimum.
- New PHP files in
src/should usedeclare(strict_types=1);consistently with existing classes.