public function validate(CommitMessage $msg) : array
    {
        $problems = [];
        foreach ($this->rules as $rule) {
            if (!$rule->pass($msg)) {
                $problems[] = $rule->getHint();
            }
        }
        return $problems;
    }
public function validate(CommitMessage $msg) : array
    {
        $problems = [];
        foreach ($this->rules as $rule) {
            if (!$rule->pass($msg)) {
                $problems[] = $rule->getHint();
            }
        }
        return $problems;
    }
public function validate ( CommitMessage $ msg ) : array { $ problems = [ ] ; foreach ( $ this -> rules as $ rule ) { if ( ! $ rule -> pass ( $ msg ) ) { $ problems [ ] = $ rule -> getHint ( ) ; } } return $ problems ; }
Validates all rules

Returns a list of problems found checking the commit message.
If the list is empty the message is valid.

@param  \SebastianFeldmann\Git\CommitMessage $msg
@return array
Validates all rules