public function verify(): bool
    {
        if (!$this->callback) {
            throw new \Exception('Callbacks need to exist to run verify.');
        }

        $pactJson = $this->reify();

        // call the function to actually run the logic
        try {
            \call_user_func($this->callback, $pactJson);

            return $this->writePact();
        } catch (\Exception $e) {
            return false;
        }
    }
public function verify(): bool
    {
        if (!$this->callback) {
            throw new \Exception('Callbacks need to exist to run verify.');
        }

        $pactJson = $this->reify();

        // call the function to actually run the logic
        try {
            \call_user_func($this->callback, $pactJson);

            return $this->writePact();
        } catch (\Exception $e) {
            return false;
        }
    }
public function verify ( ) : bool { if ( ! $ this -> callback ) { throw new \ Exception ( 'Callbacks need to exist to run verify.' ) ; } $ pactJson = $ this -> reify ( ) ; // call the function to actually run the logic try { \ call_user_func ( $ this -> callback , $ pactJson ) ; return $ this -> writePact ( ) ; } catch ( \ Exception $ e ) { return false ; } }
Verify the use of the pact by calling the callback
It also calls finalize to write the pact

@throws \Exception if callback is not set
Verify the use of the pact by calling the callback It also calls finalize to write the pact