Showing 349 of 349 total issues
Avoid too many return
statements within this function. Open
return new KinveyError(message, debug);
Avoid too many return
statements within this function. Open
return new ParameterValueOutOfRangeError(message, debug);
Avoid too many return
statements within this function. Open
return new KinveyError();
Avoid too many return
statements within this function. Open
return await this.setAuthorization(KinveyHttpAuth.MFASessionToken);
Function pullById
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async pullById(id: string, options: any = {}) {
const network = new NetworkStore(this.collectionName);
const cache = new DataStoreCache(this.collectionName, this.tag);
// Push sync queue
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loginWithRedirectUri
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export async function loginWithRedirectUri(redirectUri: string, options: MICOptions = {}) {
const activeUser = await getActiveUser();
const { micId, version } = options;
let clientId = getAppKey();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function register
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export async function register(options: PushNotificationOptions = {}): Promise<string> {
const promise = new Promise<string>((resolve, reject): void => {
RNPushNotification.configure({
permissions: options.permissions,
popInitialNotification: options.popInitialNotification,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function byteCount
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function byteCount(str: string): number {
if (str) {
let count = 0;
const stringLength = str.length;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor(config: HttpResponseConfig) {
this.statusCode = config.statusCode;
this.headers = new HttpHeaders(config.headers);
const contentType = this.headers.get('Content-Type') || '';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"