Prechádzať zdrojové kódy

Disable some code smells

Sebastián Katzer 7 rokov pred
rodič
commit
6d1b27f1e9

+ 4 - 0
src/android/LocalNotification.java

@@ -19,6 +19,8 @@
  * limitations under the License.
  */
 
+// codebeat:disable[TOO_MANY_FUNCTIONS]
+
 package de.appplant.cordova.plugin.localnotification;
 
 import android.annotation.SuppressLint;
@@ -634,3 +636,5 @@ public class LocalNotification extends CordovaPlugin {
     }
 
 }
+
+// codebeat:enable[TOO_MANY_FUNCTIONS]

+ 4 - 0
src/android/notification/Manager.java

@@ -19,6 +19,8 @@
  * limitations under the License.
  */
 
+// codebeat:disable[TOO_MANY_FUNCTIONS]
+
 package de.appplant.cordova.plugin.notification;
 
 import android.annotation.SuppressLint;
@@ -415,3 +417,5 @@ public final class Manager {
     }
 
 }
+
+// codebeat:enable[TOO_MANY_FUNCTIONS]

+ 4 - 0
src/android/notification/Options.java

@@ -19,6 +19,8 @@
  * limitations under the License.
  */
 
+// codebeat:disable[TOO_MANY_FUNCTIONS]
+
 package de.appplant.cordova.plugin.notification;
 
 import android.content.Context;
@@ -677,3 +679,5 @@ public final class Options {
     }
 
 }
+
+// codebeat:enable[TOO_MANY_FUNCTIONS]

+ 14 - 10
src/ios/APPLocalNotification.m

@@ -19,6 +19,8 @@
  * limitations under the License.
  */
 
+// codebeat:disable[TOO_MANY_FUNCTIONS]
+
 #import "APPLocalNotification.h"
 #import "APPNotificationContent.h"
 #import "APPNotificationOptions.h"
@@ -268,7 +270,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
     [self.commandDelegate runInBackground:^{
         int code                 = [command.arguments[0] intValue];
         APPNotificationType type = NotifcationTypeUnknown;
-        
+
         switch (code) {
             case 0:
                 type = NotifcationTypeAll;
@@ -280,13 +282,13 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
                 type = NotifcationTypeTriggered;
                 break;
         }
-        
+
         NSArray* ids = [_center getNotificationIdsByType:type];
-        
+
         CDVPluginResult* result;
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
                                     messageAsArray:ids];
-        
+
         [self.commandDelegate sendPluginResult:result
                                     callbackId:command.callbackId];
     }];
@@ -330,7 +332,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
         APPNotificationType type = NotifcationTypeUnknown;
         NSArray* toasts;
         NSArray* ids;
-        
+
         switch (code) {
             case 0:
                 type = NotifcationTypeAll;
@@ -346,15 +348,15 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
                 toasts = [_center getNotificationOptionsById:ids];
                 break;
         }
-        
+
         if (toasts == nil) {
             toasts = [_center getNotificationOptionsByType:type];
         }
-        
+
         CDVPluginResult* result;
         result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
                                     messageAsArray:toasts];
-        
+
         [self.commandDelegate sendPluginResult:result
                                     callbackId:command.callbackId];
     }];
@@ -404,7 +406,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
         NSArray* actions     = [command argumentAtIndex:2];
         UNNotificationCategory* group;
         BOOL found;
-        
+
         switch (code) {
             case 0:
                 group = [APPNotificationCategory parse:actions withId:identifier];
@@ -618,7 +620,7 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
     CDVPluginResult *result = [CDVPluginResult
                                resultWithStatus:CDVCommandStatus_OK
                                messageAsBool:arg];
-    
+
     [self.commandDelegate sendPluginResult:result
                                 callbackId:command.callbackId];
 }
@@ -702,3 +704,5 @@ UNNotificationPresentationOptions const OptionAlert = UNNotificationPresentation
 }
 
 @end
+
+// codebeat:enable[TOO_MANY_FUNCTIONS]