| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 9 | 3 | public static function getUserAgent() |
|
| 10 | { |
||
| 11 | 3 | static $ua; |
|
| 12 | 3 | if ($ua) { |
|
| 13 | 2 | return $ua; |
|
| 14 | } |
||
| 15 | |||
| 16 | 1 | return $ua = sprintf( |
|
| 17 | 'Composer/%s (%s; %s; %s)', |
||
| 18 | Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION, |
||
| 19 | 1 | php_uname('s'), |
|
| 20 | php_uname('r'), |
||
| 21 | self::getPHPVersion() |
||
| 22 | ); |
||
| 23 | 1 | } |
|
| 24 | 1 | ||
| 36 |