These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\TaggingBundle\AdminList; |
||
4 | |||
5 | use Doctrine\ORM\EntityManager; |
||
6 | use Kunstmaan\AdminBundle\Helper\Security\Acl\AclHelper; |
||
7 | use Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractDoctrineORMAdminListConfigurator; |
||
8 | use Kunstmaan\AdminListBundle\AdminList\FilterType\ORM; |
||
9 | use Kunstmaan\TaggingBundle\Form\TagAdminType; |
||
10 | |||
11 | class TagAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator |
||
12 | { |
||
13 | /** |
||
14 | * @param EntityManager $em The entity manager |
||
15 | * @param AclHelper $aclHelper The acl helper |
||
0 ignored issues
–
show
|
|||
16 | */ |
||
17 | public function __construct(EntityManager $em, AclHelper $aclHelper = null) |
||
18 | { |
||
19 | parent::__construct($em, $aclHelper); |
||
20 | $this->setAdminType(TagAdminType::class); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Configure the visible columns |
||
25 | */ |
||
26 | public function buildFields() |
||
27 | { |
||
28 | $this->addField('name', 'kuma_tagging.adminlist.header.name', true); |
||
29 | $this->addField('createdAt', 'kuma_tagging.adminlist.header.created_at', true); |
||
30 | $this->addField('updatedAt', 'kuma_tagging.adminlist.header.updated_at', true); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Build filters for admin list |
||
35 | */ |
||
36 | public function buildFilters() |
||
37 | { |
||
38 | $this->addFilter('name', new ORM\StringFilterType('name'), 'kuma_tagging.adminlist.filter.name'); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Get bundle name |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getBundleName() |
||
47 | { |
||
48 | return 'KunstmaanTaggingBundle'; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get entity name |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getEntityName() |
||
57 | { |
||
58 | return 'Tag'; |
||
59 | } |
||
60 | } |
||
61 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.