original_string: public static function checkDependency( $component, $type, $value )
      {
          switch ( $type )
          {
              case self::DEP_PHP_EXTENSION:
                  if ( extension_loaded( $value ) )
                  {
                      return;
                  }
                  else
                  {
                      // Can not be tested as it would abort the PHP script.
                      die( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" );
                  }
                  break;
  
              case self::DEP_PHP_VERSION:
                  $phpVersion = phpversion();
                  if ( version_compare( $phpVersion, $value, '>=' ) )
                  {
                      return;
                  }
                  else
                  {
                      // Can not be tested as it would abort the PHP script.
                      die( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" );
                  }
                  break;
          }
      }
code: public static function checkDependency( $component, $type, $value )
      {
          switch ( $type )
          {
              case self::DEP_PHP_EXTENSION:
                  if ( extension_loaded( $value ) )
                  {
                      return;
                  }
                  else
                  {
                      // Can not be tested as it would abort the PHP script.
                      die( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" );
                  }
                  break;
  
              case self::DEP_PHP_VERSION:
                  $phpVersion = phpversion();
                  if ( version_compare( $phpVersion, $value, '>=' ) )
                  {
                      return;
                  }
                  else
                  {
                      // Can not be tested as it would abort the PHP script.
                      die( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" );
                  }
                  break;
          }
      }
code_tokens: public static function checkDependency ( $ component , $ type , $ value ) { switch ( $ type ) { case self :: DEP_PHP_EXTENSION : if ( extension_loaded ( $ value ) ) { return ; } else { // Can not be tested as it would abort the PHP script. die ( "\nThe {$component} component depends on the default PHP extension '{$value}', which is not loaded.\n" ) ; } break ; case self :: DEP_PHP_VERSION : $ phpVersion = phpversion ( ) ; if ( version_compare ( $ phpVersion , $ value , '>=' ) ) { return ; } else { // Can not be tested as it would abort the PHP script. die ( "\nThe {$component} component depends on the PHP version '{$value}', but the current version is '{$phpVersion}'.\n" ) ; } break ; } }
docstring: Checks for dependencies on PHP versions or extensions
  
  The function as called by the $component component checks for the $type
  dependency. The dependency $type is compared against the $value. The
  function aborts the script if the dependency is not matched.
  
  @param string $component
  @param int $type
  @param mixed $value
docstring_tokens: Checks for dependencies on PHP versions or extensions