protected static function getOperationPackage(OperationInterface $operation)
    {
        $data = null;
        if ($operation instanceof UpdateOperation) {
            $data = $operation->getTargetPackage();
        } elseif ($operation instanceof InstallOperation) {
            $data = $operation->getPackage();
        }

        return $data;
    }
protected static function getOperationPackage(OperationInterface $operation)
    {
        $data = null;
        if ($operation instanceof UpdateOperation) {
            $data = $operation->getTargetPackage();
        } elseif ($operation instanceof InstallOperation) {
            $data = $operation->getPackage();
        }

        return $data;
    }
protected static function getOperationPackage ( OperationInterface $ operation ) { $ data = null ; if ( $ operation instanceof UpdateOperation ) { $ data = $ operation -> getTargetPackage ( ) ; } elseif ( $ operation instanceof InstallOperation ) { $ data = $ operation -> getPackage ( ) ; } return $ data ; }
Get the package defined in the composer operation.

@param OperationInterface $operation The operation

@return null|PackageInterface Return NULL if the operation is not INSTALL or UPDATE
Get the package defined in the composer operation .