File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,14 @@ public function getContentId($content)
6060 }
6161
6262 try {
63- $ meta = $ this ->getObjectManager ()->getClassMetadata (get_class ($ content ));
63+ $ class = get_class ($ content );
64+ $ meta = $ this ->getObjectManager ()->getClassMetadata ($ class );
6465 $ ids = $ meta ->getIdentifierValues ($ content );
65- if (0 !== count ($ ids )) {
66- throw new \Exception (' Multi identifier values not supported in ' . get_class ( $ content ));
66+ if (1 !== count ($ ids )) {
67+ throw new \Exception (sprintf ( ' Class "%s" must use only one identifier ' , $ class ));
6768 }
6869
69- return implode (': ' , array (
70- get_class ($ content ),
71- reset ($ ids ),
72- ));
70+ return implode (': ' , array ($ class , reset ($ ids )));
7371 } catch (\Exception $ e ) {
7472 return ;
7573 }
You can’t perform that action at this time.
0 commit comments