dinel / metadiscourse-annotator

0 stars 0 forks source link

[Insight] Object parameters should be type hinted - in src/…/Controller/AdminController.php, line 375 #54

Open dinel opened 6 years ago

dinel commented 6 years ago

in src/AppBundle/Controller/AdminController.php, line 375

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

                ->getRepository('AppBundle:Corpus')
                ->find($corpus_id);

        $a_texts = array_map(function($value) {
                                return array($value->getId(), $value->getTitle());
                            }, array_values(array_filter($texts, function($value) use($hint, $corpus) {
                                                                    if($corpus->getTexts()->contains($value)) return FALSE;
                                                                    return strstr($value->getTitle(), $hint);
                                                                 })));

        return new JsonResponse(array('texts' => $a_texts));        

Posted from SensioLabsInsight