public function getFlashes()
    {
        $types = array("error", "success");
        $result = array();
        foreach ($types as $value) {
            $flashesArr = $this->session->getFlash($value);
            if (count($flashesArr)) {
                $result[$value] = $flashesArr;
            }
        }
        return $result;
    }
public function getFlashes()
    {
        $types = array("error", "success");
        $result = array();
        foreach ($types as $value) {
            $flashesArr = $this->session->getFlash($value);
            if (count($flashesArr)) {
                $result[$value] = $flashesArr;
            }
        }
        return $result;
    }
{@inheritdoc}