PDepend\Util\Type::isInternalPackage PHP Method

isInternalPackage() public static method

This method will return true when the given package represents a php extension.
public static isInternalPackage ( string $packageName ) : boolean
$packageName string Name of a package.
return boolean
    public static function isInternalPackage($packageName)
    {
        $packageNames = self::getInternalNamespaces();
        return isset($packageNames[strtolower($packageName)]);
    }

Usage Example

 /**
  * testIsInternalPackageReturnsTrueForPhpStandardLibrary
  *
  * @return void
  */
 public function testIsInternalPackageReturnsTrueForPhpStandardLibrary()
 {
     if (!extension_loaded('spl')) {
         $this->markTestSkipped('SPL extension not loaded.');
     }
     $this->assertTrue(Type::isInternalPackage('+spl'));
 }