dinel / metadiscourse-annotator

0 stars 0 forks source link

[Insight] Object parameters should be type hinted - in src/AppBundle/Utils/SharedFunctions.php, line 276 #67

Closed dinel closed 6 years ago

dinel commented 6 years ago

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

The parameter em, which is an object, should be typehinted.

     * @param int $direction indicates whether it is left context (value 1) or 
     * right context (any other value)
     * @param EntityManager $em the entity manager
     * @return string the context
     */
    private function getContext($str_query, $term_id, $direction, $em) {        
        $query = $em->createQuery($str_query);
        $query->setParameter(1, $term_id);
        $query->setMaxResults(15);

        $str = "";

Posted from SensioLabsInsight