1 | <?php |
||
10 | class DynamicRelationSubscriber implements EventSubscriber |
||
11 | { |
||
12 | const MODEL_PROJECT = 'Developtech\AgilityBundle\Entity\Project'; |
||
13 | const MODEL_FEATURE = 'Developtech\AgilityBundle\Entity\Feature'; |
||
14 | const MODEL_FEEDBACK = 'Developtech\AgilityBundle\Entity\Feedback'; |
||
15 | |||
16 | /** @var string **/ |
||
17 | protected $userClass; |
||
18 | |||
19 | /** |
||
20 | * @param string $userClass |
||
21 | */ |
||
22 | 1 | public function __construct($userClass) { |
|
25 | |||
26 | /** |
||
27 | * {@inheritDoc} |
||
28 | */ |
||
29 | 1 | public function getSubscribedEvents() |
|
35 | |||
36 | /** |
||
37 | * @param LoadClassMetadataEventArgs $eventArgs |
||
38 | */ |
||
39 | public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs) |
||
40 | { |
||
41 | // the $metadata is the whole mapping info for this class |
||
42 | $metadata = $eventArgs->getClassMetadata(); |
||
43 | |||
44 | switch($metadata->getName()) { |
||
45 | case self::MODEL_PROJECT: return $this->mapProject($metadata); |
||
46 | case self::MODEL_FEATURE: return $this->mapFeature($metadata); |
||
47 | case self::MODEL_FEEDBACK: return $this->mapFeedback($metadata); |
||
48 | default: return; |
||
49 | } |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param CLassMetadata $metadata |
||
54 | */ |
||
55 | 1 | public function mapProject(ClassMetadata $metadata) { |
|
65 | |||
66 | /** |
||
67 | * @param CLassMetadata $metadata |
||
68 | */ |
||
69 | 1 | public function mapFeature(ClassMetadata $metadata) { |
|
79 | |||
80 | /** |
||
81 | * @param CLassMetadata $metadata |
||
82 | */ |
||
83 | 1 | public function mapFeedback(ClassMetadata $metadata) { |
|
101 | } |
||
102 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.