public function commit()/*# : bool */
    {
        $ends = [ $this->front, $this->back ];
        $res  = false;

        foreach ($ends as $end) {
            // commit failed, set error
            if (!$end->commit()) {
                $this->setError(
                    $end->getError(),
                    $end->getErrorCode()
                );

            // one commit is ok, then all ok
            } else {
                $res = true;
            }
        }

        return $res;
    }
public function commit()/*# : bool */
    {
        $ends = [ $this->front, $this->back ];
        $res  = false;

        foreach ($ends as $end) {
            // commit failed, set error
            if (!$end->commit()) {
                $this->setError(
                    $end->getError(),
                    $end->getErrorCode()
                );

            // one commit is ok, then all ok
            } else {
                $res = true;
            }
        }

        return $res;
    }
public function commit ( ) /*# : bool */ { $ ends = [ $ this -> front , $ this -> back ] ; $ res = false ; foreach ( $ ends as $ end ) { // commit failed, set error if ( ! $ end -> commit ( ) ) { $ this -> setError ( $ end -> getError ( ) , $ end -> getErrorCode ( ) ) ; // one commit is ok, then all ok } else { $ res = true ; } } return $ res ; }
One end commit ok is ok

{@inheritDoc}
One end commit ok is ok