Skip to content

Commit

Permalink
Made recommended PSScriptAnalyzer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bk-cs committed Jan 28, 2021
1 parent 1b846e1 commit 7e4f436
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Data/Endpoints/scripts.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
indicators = @{
description = "Indicators to graph"
type = "array"
in = "query"
in = "query"
required = $true
pattern = "(sha256|md5|domain|ipv4|ipv6):.*"
}
Expand Down
14 changes: 7 additions & 7 deletions Private/Private.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function Get-AuthPair {
Outputs a base64 authorization pair for Format-Header
#>
[CmdletBinding()]
[OutputType()]
[OutputType([string])]
param()
process {
if ($Falcon.ClientId -and $Falcon.ClientSecret) {
Expand Down Expand Up @@ -486,7 +486,7 @@ function Get-DynamicHelp {
Endpoints to exclude from results (for redundancies)
#>
[CmdletBinding()]
[OutputType()]
[OutputType([string])]
param(
[Parameter(Mandatory = $true)]
[string] $Command,
Expand Down Expand Up @@ -641,7 +641,7 @@ function Get-LoopParam {
A runtime parameter dictionary to search for input values
#>
[CmdletBinding()]
[OutputType()]
[OutputType([hashtable])]
param(
[Parameter(Mandatory = $true)]
[System.Collections.ArrayList] $Dynamic
Expand Down Expand Up @@ -821,7 +821,7 @@ function Get-Query {
foreach ($Value in $Item.Value) {
# Output "query" values to an array and encode '+' to ensure filter input integrity
if ($_.Key) {
if (($Endpoint.path -eq '/indicators/queries/iocs/v1') -and (($_.Key -eq 'type') -or
if (($Endpoint.path -eq '/indicators/queries/iocs/v1') -and (($_.Key -eq 'type') -or
($_.Key -eq 'value'))) {
# Change type/value to types/values for /indicators/queries/iocs/v1:get
,"$($_.Key)s=$($Value -replace '\+','%2B')"
Expand Down Expand Up @@ -1045,7 +1045,7 @@ function Invoke-Loop {
[bool] $Detailed
)
begin {
function Set-Paging ($Object, $Param, $Count) {
function Get-Paging ($Object, $Param, $Count) {
# Check 'Meta' object from Format-Result for pagination information
if ($Object.after) {
$Param['After'] = $Object.after
Expand Down Expand Up @@ -1083,7 +1083,7 @@ function Invoke-Loop {
$i += $Loop.Request.count) {
# Repeat requests if additional results are defined in 'meta'
Write-Verbose "[$($MyInvocation.MyCommand.Name)] retrieved $i results"
Set-Paging -Object $Loop.Pagination -Param $Param -Count $i
Get-Paging -Object $Loop.Pagination -Param $Param -Count $i
$Loop = @{
Request = & $Command @Param
Pagination = $Meta.pagination
Expand Down Expand Up @@ -1270,7 +1270,7 @@ function Split-Param {
A manually-defined maximum number of identifiers per request
#>
[CmdletBinding()]
[OutputType()]
[OutputType([hashtable])]
param(
[Parameter(Mandatory = $true)]
[hashtable] $Param,
Expand Down
2 changes: 1 addition & 1 deletion Public/scripts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function Find-Duplicate {
Selection = $PSBoundParameters.Hosts | Select-Object $Criteria
Criteria = 'hostname'
}
$Duplicates = Group-Selection @Param
$Duplicates = Group-Selection @Param
if ($Duplicates) {
$Duplicates
}
Expand Down

0 comments on commit 7e4f436

Please sign in to comment.