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\ArticleBundle\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\StringFilterType; |
||
9 | |||
10 | /** |
||
11 | * The AdminList configurator for the AbstractArticleAuthor |
||
12 | */ |
||
13 | class AbstractArticleAuthorAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $locale; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $permission; |
||
24 | |||
25 | /** |
||
26 | * @param EntityManager $em The entity manager |
||
27 | * @param AclHelper $aclHelper The ACL helper |
||
28 | * @param string $locale The current locale |
||
29 | */ |
||
30 | public function __construct(EntityManager $em, AclHelper $aclHelper, $locale) |
||
31 | { |
||
32 | parent::__construct($em, $aclHelper); |
||
33 | $this->locale = $locale; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Return current bundle name. |
||
38 | * |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getBundleName() |
||
42 | { |
||
43 | return 'KunstmaanArticleBundle'; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Return current entity name. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getEntityName() |
||
52 | { |
||
53 | return 'AbstractArticleAuthor'; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Configure filters |
||
58 | */ |
||
59 | public function buildFilters() |
||
60 | { |
||
61 | $this->addFilter('name', new StringFilterType('name'), 'article.author.list.filter.name'); |
||
62 | $this->addFilter('link', new StringFilterType('link'), 'article.author.list.filter.link'); |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * Configure the visible columns |
||
67 | */ |
||
68 | public function buildFields() |
||
69 | { |
||
70 | $this->addField('name', 'article.author.list.header.name', true); |
||
0 ignored issues
–
show
|
|||
71 | $this->addField('link', 'article.author.list.header.link', true); |
||
72 | } |
||
73 | } |
||
74 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: