1
0
Fork 0

Changes after excellent feedback from Jordi

pull/822/head
Christian Riesen 2012-06-22 17:16:07 +02:00
parent 432815df67
commit 70e7194b07
1 changed files with 6 additions and 24 deletions

View File

@ -43,20 +43,13 @@ class PlatformRepository extends ArrayRepository
// Extensions scanning
foreach ($loadedExtensions as $name) {
switch ($name) {
// Skipped "extensions"
case 'standard':
case 'Core':
continue;
// All normal cases for standard extensions
default:
$reflExt = new \ReflectionExtension($name);
$prettyVersion = $reflExt->getVersion();
break;
if (in_array($name, array('standard', 'Core'))) {
continue;
}
$reflExt = new \ReflectionExtension($name);
try {
$prettyVersion = $reflExt->getVersion();
$version = $versionParser->normalize($prettyVersion);
} catch (\UnexpectedValueException $e) {
$prettyVersion = '0';
@ -73,11 +66,6 @@ class PlatformRepository extends ArrayRepository
// relying on them.
foreach ($loadedExtensions as $name) {
switch ($name) {
// Skipped "extensions"
case 'standard':
case 'Core':
continue;
case 'curl':
$curlVersion = curl_version();
$prettyVersion = $curlVersion['version'];
@ -96,11 +84,6 @@ class PlatformRepository extends ArrayRepository
$prettyVersion = trim($prettyVersion);
break;
case 'mysqli':
// not so pretty version
$prettyVersion = mysqli_get_client_version();
break;
case 'pcre':
$prettyVersion = PCRE_VERSION;
break;
@ -121,8 +104,7 @@ class PlatformRepository extends ArrayRepository
try {
$version = $versionParser->normalize($prettyVersion);
} catch (\UnexpectedValueException $e) {
$prettyVersion = '0';
$version = $versionParser->normalize($prettyVersion);
continue;
}
$ext = new MemoryPackage('lib-'.$name, $version, $prettyVersion);