Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
55 | 2 | public static function get_transaction_service( $transaction ) { |
|
56 | 2 | if ( \property_exists( $transaction, 'Services' ) ) { |
|
57 | 2 | foreach ( $transaction->Services as $service ) { |
|
58 | 2 | if ( ! \property_exists( $service, 'Name' ) ) { |
|
59 | 2 | continue; |
|
60 | } |
||
61 | |||
62 | 1 | return $service->Name; |
|
63 | } |
||
64 | } |
||
65 | |||
66 | 1 | return null; |
|
67 | } |
||
69 |