original_string: protected function getPackage(PackageEvent $event)
      {
          $operation = $event->getOperation();
          
          if (method_exists($operation, 'getPackage')) {
              return $operation->getPackage();
          }
          
          return $operation->getTargetPackage();
      }
code: protected function getPackage(PackageEvent $event)
      {
          $operation = $event->getOperation();
          
          if (method_exists($operation, 'getPackage')) {
              return $operation->getPackage();
          }
          
          return $operation->getTargetPackage();
      }
code_tokens: protected function getPackage ( PackageEvent $ event ) { $ operation = $ event -> getOperation ( ) ; if ( method_exists ( $ operation , 'getPackage' ) ) { return $ operation -> getPackage ( ) ; } return $ operation -> getTargetPackage ( ) ; }
docstring: Get the PackageInterface from a PackageEvent.
  
  @param  \Composer\Installer\PackageEvent  $event
  @return \Composer\Package\PackageInterface
docstring_tokens: Get the PackageInterface from a PackageEvent .