src/Sismo/Contrib/CrossFingerNotifier.php
protected function commitNeedNotification(Commit $commit)
    {
        if (!$commit->isSuccessful()) {
            return true;
        }

        //getProject()->getLatestCommit() actually contains the previous build
        $previousCommit = $commit->getProject()->getLatestCommit();

        return !$previousCommit || $previousCommit->getStatusCode() != $commit->getStatusCode();
    }
protected function commitNeedNotification(Commit $commit)
    {
        if (!$commit->isSuccessful()) {
            return true;
        }

        //getProject()->getLatestCommit() actually contains the previous build
        $previousCommit = $commit->getProject()->getLatestCommit();

        return !$previousCommit || $previousCommit->getStatusCode() != $commit->getStatusCode();
    }
protected function commitNeedNotification ( Commit $ commit ) { if ( ! $ commit -> isSuccessful ( ) ) { return true ; } //getProject()->getLatestCommit() actually contains the previous build $ previousCommit = $ commit -> getProject ( ) -> getLatestCommit ( ) ; return ! $ previousCommit || $ previousCommit -> getStatusCode ( ) != $ commit -> getStatusCode ( ) ; }
Determines if a build needs to be notify
based on his status and his predecessor's one

@param Commit $commit The commit to analyse

@return bool whether the commit need notification or not
Determines if a build needs to be notify based on his status and his predecessor s one