for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KunicMarko\SonataAnnotationBundle\Annotation;
/**
* @Annotation
* @Target("CLASS")
*
* @author Marko Kunic <[email protected]>
*/
class Access implements AnnotationInterface
{
* @var string
public $role;
* @var array
public $permissions;
public function getRole(): string
if ($this->role) {
return $this->role;
}
throw new \InvalidArgumentException(
sprintf(
'Argument "role" is mandatory in "%s" annotation.',
self::class
)
);