private function assertValidTransaction(array $transaction)
    {
        if(!isset($transaction['transaction_type'])) {
            throw new InvalidArgumentException("Transaction type is empty");
        }

        $this->assertValidContent($transaction['content']);
        $this->assertValidSender($transaction['from']);
        $this->assertValidRecipient($transaction['to']);
    }
private function assertValidTransaction(array $transaction)
    {
        if(!isset($transaction['transaction_type'])) {
            throw new InvalidArgumentException("Transaction type is empty");
        }

        $this->assertValidContent($transaction['content']);
        $this->assertValidSender($transaction['from']);
        $this->assertValidRecipient($transaction['to']);
    }
private function assertValidTransaction ( array $ transaction ) { if ( ! isset ( $ transaction [ 'transaction_type' ] ) ) { throw new InvalidArgumentException ( "Transaction type is empty" ) ; } $ this -> assertValidContent ( $ transaction [ 'content' ] ) ; $ this -> assertValidSender ( $ transaction [ 'from' ] ) ; $ this -> assertValidRecipient ( $ transaction [ 'to' ] ) ; }
Check if transaction data is valid

@param array $transaction
Check if transaction data is valid