The parameter doctrine, which is an object, should be typehinted.
* like structure
* @param object $doctrine an instance of Doctrine
* @return array the categories organised in a tree like structure ordered
* alphabetically, both the parents and the leaves
*/
public static function getCategoryTree($doctrine) {
$categories = $doctrine->getRepository("AppBundle:Category")->findBy([], ['name' => 'ASC']);
$cat_tree = array();
foreach($categories as $category) {
if($category->getName() === "No parent category") {
in src/AppBundle/Utils/SharedFunctions.php, line 38
Posted from SensioLabsInsight