src/Sismo/Storage/PdoStorage.php
public function updateCommit(Commit $commit)
    {
        $stmt = $this->db->prepare('UPDATE `commit` SET status = :status, output = :output, build_date = :current_date WHERE slug = :slug AND sha = :sha');
        $stmt->bindValue(':slug', $commit->getProject()->getSlug(), \PDO::PARAM_STR);
        $stmt->bindValue(':sha', $commit->getSha(), \PDO::PARAM_STR);
        $stmt->bindValue(':status', $commit->getStatusCode(), \PDO::PARAM_STR);
        $stmt->bindValue(':output', $commit->getOutput(), \PDO::PARAM_STR);
        $stmt->bindValue(':current_date', date('Y-m-d H:i:s'), \PDO::PARAM_STR);

        if (false === $stmt->execute()) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException(sprintf('Unable to save build "%s@%s".', $commit->getProject()->getName(), $commit->getSha()));
            // @codeCoverageIgnoreEnd
        }
    }
public function updateCommit(Commit $commit)
    {
        $stmt = $this->db->prepare('UPDATE `commit` SET status = :status, output = :output, build_date = :current_date WHERE slug = :slug AND sha = :sha');
        $stmt->bindValue(':slug', $commit->getProject()->getSlug(), \PDO::PARAM_STR);
        $stmt->bindValue(':sha', $commit->getSha(), \PDO::PARAM_STR);
        $stmt->bindValue(':status', $commit->getStatusCode(), \PDO::PARAM_STR);
        $stmt->bindValue(':output', $commit->getOutput(), \PDO::PARAM_STR);
        $stmt->bindValue(':current_date', date('Y-m-d H:i:s'), \PDO::PARAM_STR);

        if (false === $stmt->execute()) {
            // @codeCoverageIgnoreStart
            throw new \RuntimeException(sprintf('Unable to save build "%s@%s".', $commit->getProject()->getName(), $commit->getSha()));
            // @codeCoverageIgnoreEnd
        }
    }
public function updateCommit ( Commit $ commit ) { $ stmt = $ this -> db -> prepare ( 'UPDATE `commit` SET status = :status, output = :output, build_date = :current_date WHERE slug = :slug AND sha = :sha' ) ; $ stmt -> bindValue ( ':slug' , $ commit -> getProject ( ) -> getSlug ( ) , \ PDO :: PARAM_STR ) ; $ stmt -> bindValue ( ':sha' , $ commit -> getSha ( ) , \ PDO :: PARAM_STR ) ; $ stmt -> bindValue ( ':status' , $ commit -> getStatusCode ( ) , \ PDO :: PARAM_STR ) ; $ stmt -> bindValue ( ':output' , $ commit -> getOutput ( ) , \ PDO :: PARAM_STR ) ; $ stmt -> bindValue ( ':current_date' , date ( 'Y-m-d H:i:s' ) , \ PDO :: PARAM_STR ) ; if ( false === $ stmt -> execute ( ) ) { // @codeCoverageIgnoreStart throw new \ RuntimeException ( sprintf ( 'Unable to save build "%s@%s".' , $ commit -> getProject ( ) -> getName ( ) , $ commit -> getSha ( ) ) ) ; // @codeCoverageIgnoreEnd } }
Update the commits information.

The commit is identified by its sha hash.

@param Commit $commit

@return StorageInterface $this
Update the commits information .