Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 837 Bytes

File metadata and controls

33 lines (25 loc) · 837 Bytes

AGENTS

Writing Documentation

  • 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-write annotations for dynamic members.

SOLID

  • ALWAYS create interfaces for abstractions.

Testing

  • 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.