dinel / metadiscourse-annotator

0 stars 0 forks source link

[Insight] The Doctrine Entity Manager should not be passed as an argument - in src/AppBundle/Utils/SharedFunctions.php, line 152 #71

Closed dinel closed 6 years ago

dinel commented 6 years ago

in src/AppBundle/Utils/SharedFunctions.php, line 152

A Doctrine entity manager has been found as an argument.

     * @param EntityManager $em
     * @param Repository $doctrine
     * 
     * @return nothing Does not return anything
     */
    public static function removeSense(Sense $sense, Markable $mark, EntityManager $em, Registry $doctrine) {
        $annotations = $doctrine->getRepository('AppBundle:Annotation')
                                ->createQueryBuilder('a')
                                ->where('a.sense = :id')
                                ->setParameter('id', $sense->getId())
                                ->getQuery()

Posted from SensioLabsInsight