Skip to content

Commit 83169a2

Browse files
authored
Merge pull request #89 from Dejulia489/master
Add breaks to Switch Statments
2 parents 4d9f359 + 92cab48 commit 83169a2

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

ServiceNow/Public/New-ServiceNowChangeRequest.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ function New-ServiceNowChangeRequest {
129129
If ($null -ne $PSBoundParameters.$Parameter) {
130130
# Turn the defined parameter name into the ServiceNow attribute name
131131
$KeyToAdd = Switch ($Parameter) {
132-
AssignmentGroup { 'assignment_group' }
133-
Caller { 'caller_id' }
134-
Category { 'category' }
135-
Comment { 'comments' }
136-
ConfigurationItem { 'cmdb_ci' }
137-
Description { 'description' }
138-
ShortDescription { 'short_description' }
139-
Subcategory { 'subcategory' }
132+
AssignmentGroup { 'assignment_group'; break}
133+
Caller { 'caller_id'; break}
134+
Category { 'category'; break}
135+
Comment { 'comments'; break}
136+
ConfigurationItem { 'cmdb_ci'; break}
137+
Description { 'description'; break}
138+
ShortDescription { 'short_description'; break}
139+
Subcategory { 'subcategory'; break}
140140
}
141141
$TableEntryValues.Add($KeyToAdd, $PSBoundParameters.$Parameter)
142142
}

ServiceNow/Public/New-ServiceNowIncident.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ function New-ServiceNowIncident{
119119
If ($null -ne $PSBoundParameters.$Parameter) {
120120
# Turn the defined parameter name into the ServiceNow attribute name
121121
$KeyToAdd = Switch ($Parameter) {
122-
AssignmentGroup {'assignment_group'}
123-
Caller {'caller_id'}
124-
Category {'category'}
125-
Comment {'comments'}
126-
ConfigurationItem {'cmdb_ci'}
127-
Description {'description'}
128-
ShortDescription {'short_description'}
129-
Subcategory {'subcategory'}
122+
AssignmentGroup {'assignment_group'; break}
123+
Caller {'caller_id'; break}
124+
Category {'category'; break}
125+
Comment {'comments'; break}
126+
ConfigurationItem {'cmdb_ci'; break}
127+
Description {'description'; break}
128+
ShortDescription {'short_description'; break}
129+
Subcategory {'subcategory'; break}
130130
}
131131
$TableEntryValues.Add($KeyToAdd,$PSBoundParameters.$Parameter)
132132
}

ServiceNow/Public/New-ServiceNowQuery.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function New-ServiceNowQuery {
4949

5050
# Start the query off with a order direction
5151
$Order = Switch ($OrderDirection) {
52-
'Asc' {'ORDERBY'}
52+
'Asc' {'ORDERBY'; break}
5353
Default {'ORDERBYDESC'}
5454
}
5555
[void]$Query.Append($Order)

0 commit comments

Comments
 (0)