dinel / metadiscourse-annotator

0 stars 0 forks source link

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

Open dinel opened 6 years ago

dinel commented 6 years ago

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

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


        $corpus = $this->getDoctrine()
                ->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);
                                                                 })));

Posted from SensioLabsInsight