dinel / metadiscourse-annotator

0 stars 0 forks source link

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

Open dinel opened 6 years ago

dinel commented 6 years ago

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

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

     * Returns the tokens from a document as an iterator
     * @param integer $doc_id the ID of the document
     * @param Doctrine $doctrine object which gives access to Doctrine
     * @return an iterator which gives access to the tokens
     */
    public static function getTokensFromDocument($doc_id, $doctrine) {
        $tokens = $doctrine->getRepository('AppBundle:Token')
                           ->createQueryBuilder('t')
                           ->where('t.document = :id')
                           ->setParameter('id', $doc_id)
                           ->getQuery()

Posted from SensioLabsInsight