Is there a way with php-cs-fixer to define an order for Symfony annotations/PHPDoc ?
Here is two examples of a controller method and an entity property :
/**
* @Security()
*
* @ParamConverter()
*
* @Rest\Post()
* @Rest\View()
*
* @param Request $request
* @param xxxInterface $item
*
* @return \FOS\RestBundle\View\View
*/
public function myAction(Request $request, xxxInterface $item)
and
/**
* @var itemInterface
* @ORM\ManyToOne()
* @ORM\JoinColumn()
* @JMS\Groups()
* @JMS\AccessType()
* @MyCustomAssert\Assert1
*/
protected $item;
For methods, I want to set the order to @Security, @ParamConverter, @Rest then PHPDoc and for properties, I always want @MyCustomAssert at the end.
Is this something possible with php-cs-fixer ?