src/RecipePlugin.php
protected function getOperationPackage(PackageEvent $event)
    {
        $operation = $event->getOperation();
        if ($operation instanceof UpdateOperation) {
            return $operation->getTargetPackage();
        }
        if ($operation instanceof InstallOperation) {
            return $operation->getPackage();
        }
        return null;
    }
protected function getOperationPackage(PackageEvent $event)
    {
        $operation = $event->getOperation();
        if ($operation instanceof UpdateOperation) {
            return $operation->getTargetPackage();
        }
        if ($operation instanceof InstallOperation) {
            return $operation->getPackage();
        }
        return null;
    }
protected function getOperationPackage ( PackageEvent $ event ) { $ operation = $ event -> getOperation ( ) ; if ( $ operation instanceof UpdateOperation ) { return $ operation -> getTargetPackage ( ) ; } if ( $ operation instanceof InstallOperation ) { return $ operation -> getPackage ( ) ; } return null ; }
Get target package from operation

@param PackageEvent $event
@return PackageInterface
Get target package from operation