dinel / metadiscourse-annotator

0 stars 0 forks source link

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

Open dinel opened 6 years ago

dinel commented 6 years ago

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

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


            $parent_category_id = 0;
            $sub_category_id = 0;

            $parent_categories = $repository->findBy(array('parent' => NULL));
            $a_parent_cats  = array_map(function($value) {
                return array($value->getId(), $value->getName());
            }, $parent_categories);

            $a_subcats = array();
            if($category && $category->getParent()) {

Posted from SensioLabsInsight