| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 18 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 24 | 	public function test() { | 
            ||
| 25 | $transaction = new Transaction( '123456', 50, 'EUR', '12345678' );  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 26 | |||
| 27 | $transaction->set_brand_id( BrandId::IDEAL );  | 
            ||
| 28 | $transaction->set_purchase_id( 123456 );  | 
            ||
| 29 | $transaction->set_return_url( 'https://example.com/' );  | 
            ||
| 30 | |||
| 31 | $this->assertInstanceOf( Transaction::class, $transaction );  | 
            ||
| 32 | |||
| 33 | $this->assertEquals( BrandId::IDEAL, $transaction->get_brand_id() );  | 
            ||
| 34 | |||
| 35 | // JSON.  | 
            ||
| 36 | $json_file = __DIR__ . '/../json/transaction-request.json';  | 
            ||
| 37 | |||
| 38 | $json_string = \wp_json_encode( $transaction, \JSON_PRETTY_PRINT );  | 
            ||
| 39 | |||
| 40 | $this->assertJsonStringEqualsJsonFile( $json_file, $json_string );  | 
            ||
| 41 | }  | 
            ||
| 42 | }  | 
            ||
| 43 | 
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: