     var statusLocationWhenInUse: PermissionStatus {
         guard CLLocationManager.locationServicesEnabled() else { return .Disabled }
         
-        switch CLLocationManager.authorizationStatus() {
+        let status = CLLocationManager.authorizationStatus()
+        
+        switch status {
         case .AuthorizedWhenInUse, .AuthorizedAlways: return .Authorized
-        case .Restricted, .Denied: return .Denied
-        case .NotDetermined: return .NotDetermined
+        case .Restricted, .Denied:                    return .Denied
+        case .NotDetermined:                          return .NotDetermined
         }
     }
     


private extension Permission {
    var statusMicrophone: PermissionStatus {
        switch AVAudioSession.sharedInstance().recordPermission() {
        case AVAudioSessionRecordPermission.Denied: return .Denied
        case AVAudioSessionRecordPermission.Granted: return .Authorized
        default: return .NotDetermined
        }
    }
    

internal extension Permission {
    private func requestAuthorization() {
        switch type {
        case .Contacts:          requestContacts()
        case .LocationAlways:    requestLocationAlways()
        case .LocationWhenInUse: requestLocationWhenInUse()
        case .Notifications:     requestNotifications()
        case .Microphone:        requestMicrophone()
        case .Camera:            requestCamera()
        case .Photos:            requestPhotos()
        case .Reminders:         requestReminders()
        case .Events:            requestEvents()
        }
    }
    
