| 1 | <?php | ||
| 22 | class SimpleAction extends AbstractAction | ||
| 23 | { | ||
| 24 | /** | ||
| 25 | * @param ClientInterface $client | ||
| 26 | * @param TargetInterface $target | ||
| 27 | * @param QuantityInterface $quantity | ||
| 28 | * @param DateTime $time | ||
| 29 | * @param TypeInterface $type | ||
| 30 | */ | ||
| 31 | 2 | public function __construct( | |
| 41 | |||
| 42 | 2 | public function getType() | |
| 46 | |||
| 47 | /** | ||
| 48 |      * {@inheritdoc} | ||
| 49 | */ | ||
| 50 | 2 | public function isApplicable(PriceInterface $price) | |
| 55 | } | ||
| 56 | 
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: