public function createCheck($constraint, $name = null)
    {
        $check = new Check($name, $constraint);
        $this->addCheck($check);

        return $check;
    }
public function createCheck($constraint, $name = null)
    {
        $check = new Check($name, $constraint);
        $this->addCheck($check);

        return $check;
    }
public function createCheck ( $ constraint , $ name = null ) { $ check = new Check ( $ name , $ constraint ) ; $ this -> addCheck ( $ check ) ; return $ check ; }
Creates and adds a new check.

@param string $constraint The check constraint.
@param string $name       The check name.

@return \Fridge\DBAL\Schema\Check The new index.
Creates and adds a new check .