Public/Get-TemplateNumber.ps1

<#
.SYNOPSIS
    A funtion that given an integer, outputs said integer.
.DESCRIPTION
    A longer description of the function, its purpose, common use cases, etc.
.PARAMETER Number
    The number parameter accepts any object.
.NOTES
    This is a sample/test function to showcase testing for the PowerShell module templates.
.LINK
    Specify a URI to a help page, this will show when Get-Help -Online is used.
.INPUTS
    Get-TemplateNumber does not accept piped input.
.OUTPUTS
    Int32.
.EXAMPLE
    Test-MyTestFunction -Verbose
    Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines
#>


function Get-TemplateNumber {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        $Number,
        [Parameter()]
        [Switch]$TimesTwo
    )

    begin {}
    
    process {
        if ($Number -isnot [Int]) {
            Write-Error -Exception "Error" -ErrorAction Stop
        }
        if ($TimesTwo) {
            $Number = Get-TemplateNumberTimesTwo -Number $Number   
        } 
        Write-Output $Number
        
    }
    
    end {}
}