for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace KunicMarko\SonataAnnotationBundle\Annotation;
/**
* @Annotation
* @Target("CLASS")
*
* @author Marko Kunic <[email protected]>
*/
class Route
{
private const DEFAULT_OPTION = 'add';
public $name;
public $path;
public $option = self::DEFAULT_OPTION;
public function getArgumentsByOption(): array
if ($this->option === self::DEFAULT_OPTION) {
return [$this->name, $this->path];
}
return [$this->name];