/** * @param Entity $entity * @param string $method * * @return \ReflectionMethod */ protected function getEntityReflectionMethod(Entity $entity, $method) { $entityReflection = new ClassReflectionAnalyser(new \ReflectionClass($entity)); return $entityReflection->setMethodPublic($method); }