@@ -157,7 +157,7 @@ class SJEditorViewController: NSViewController, NSTextViewDelegate {
157
157
158
158
159
159
func notify( completionState: Bool , fileCount: Int ) {
160
- let notification : NSUserNotification = NSUserNotification ( )
160
+ let notification = NSUserNotification ( )
161
161
notification. title = " SwiftyJSONAccelerator "
162
162
if completionState && fileCount > 0 {
163
163
notification. subtitle = " Completed - \( fileCount) Generated. "
@@ -211,15 +211,15 @@ class SJEditorViewController: NSViewController, NSTextViewDelegate {
211
211
*/
212
212
func handleError( _ error: NSError ? ) {
213
213
if let message = error!. userInfo [ " debugDescription " ] as? String {
214
- let numbers : [ String ] = message. components ( separatedBy: CharacterSet . decimalDigits. inverted)
214
+ let numbers = message. components ( separatedBy: CharacterSet . decimalDigits. inverted)
215
215
216
216
var validNumbers : [ Int ] = [ ]
217
217
for number in numbers where ( Int ( number) != nil ) {
218
218
validNumbers. append ( Int ( number) !)
219
219
}
220
220
221
221
if validNumbers. count == 1 {
222
- let index : Int = validNumbers [ 0 ]
222
+ let index = validNumbers [ 0 ]
223
223
let errorPosition : ( character: String , line: Int , column: Int ) = characterRowAndLineAt ( ( textView? . string) !, position: index)
224
224
let customErrorMessage = " Error at line number: \( errorPosition. line) column: \( errorPosition. column) at Character: \( errorPosition. character) . "
225
225
invalidJSONError ( customErrorMessage)
@@ -290,7 +290,7 @@ class SJEditorViewController: NSViewController, NSTextViewDelegate {
290
290
- returns: Return a valid path or nil.
291
291
*/
292
292
func openFile( ) -> String ? {
293
- let fileDialog : NSOpenPanel = NSOpenPanel ( )
293
+ let fileDialog = NSOpenPanel ( )
294
294
fileDialog. canChooseFiles = false
295
295
fileDialog. canChooseDirectories = true
296
296
fileDialog. canCreateDirectories = true
0 commit comments