-
Put description on the next line indented.
<?php /** * Resolve a class from the container * * @param string $abstract * Abstract class/interface name. * @return object * Resolved instance. * @throws RuntimeException * If the class cannot be resolved. */
-
Include PHPStan annotations, if possible.
-
Full out dynamic
@method,@property,@property-read,@property-writeannotations for dynamic members.
- ALWAYS create interfaces for abstractions.
- ALWAYS create tests for implementations or concrete classes.
- Only test public methods.
- NEVER test external dependencies.
- Integration tests should include concrete instances of the classes or systems under test and use test doubles for everything else.