| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 6 | public static function getUserAgent() |
|
| 14 | { |
||
| 15 | 6 | static $ua; |
|
| 16 | 6 | if ($ua) { |
|
| 17 | 5 | return $ua; |
|
| 18 | } |
||
| 19 | |||
| 20 | 1 | return $ua = sprintf( |
|
| 21 | 1 | 'Composer/%s (%s; %s; %s)', |
|
| 22 | 1 | Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION, |
|
| 23 | 1 | php_uname('s'), |
|
| 24 | 1 | php_uname('r'), |
|
| 25 | 1 | self::getPHPVersion() |
|
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 40 |