Showing 201 of 591 total issues
Function ResourceLayer
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ResourceLayer = (function () {
function ResourceLayer($provide) {
var _this = this;
_classCallCheck(this, _ResourceLayer);
Function ResourceLayer
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ResourceLayer = (function () {
function ResourceLayer($provide) {
var _this = this;
_classCallCheck(this, _ResourceLayer);
Function JsonPropertyDecorator
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var JsonPropertyDecorator = (function (_ResourceDecorator) {
function JsonPropertyDecorator(loadedDataEndpointFactory, embeddedPropertyTransformerFactory, promiseEndpointFactory, name, path, value, options) {
_classCallCheck(this, JsonPropertyDecorator);
_get(Object.getPrototypeOf(JsonPropertyDecorator.prototype), "constructor", this).call(this, name);
- 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 UrlHelper
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
var UrlHelper = (function () {
function UrlHelper(baseUrl) {
_classCallCheck(this, UrlHelper);
if (this.isFullUrl(baseUrl)) {
- 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 trace
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
trace: function trace(expr, val, path) {
function addRet(elems) {
ret = ret.concat(elems);
}
// no expr to follow? return path and value as the result of this trace branch
Function Injector
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Injector = (function () {
function Injector() {
_classCallCheck(this, Injector);
this._instantiations = [];
Function trace
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
trace: function(expr, val, path) {
function addRet(elems) { ret = ret.concat(elems); }
// no expr to follow? return path and value as the result of this trace branch
if (!expr.length){ return [{path: path, value: val}]; }
Function trace
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
trace: function(expr, val, path) {
function addRet(elems) { ret = ret.concat(elems); }
// no expr to follow? return path and value as the result of this trace branch
if (!expr.length){ return [{path: path, value: val}]; }
Function SingleRelationshipDescription
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var SingleRelationshipDescription = (function (_RelationshipDescription) {
function SingleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFactory, name, ResourceClass, initialValues) {
_classCallCheck(this, SingleRelationshipDescription);
_get(Object.getPrototypeOf(SingleRelationshipDescription.prototype), "constructor", this).call(this, relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues);
Function InitializedResourceClasses
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
var InitializedResourceClasses = (function () {
function InitializedResourceClasses(resourceDescriptionFactory) {
_classCallCheck(this, InitializedResourceClasses);
this.resourceDescriptionFactory = resourceDescriptionFactory;
Function get
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
get: function () {
if (!this._resourceFn) {
var name = this.name;
var relationship = this.relationship;
var promiseEndpointFactory = this.promiseEndpointFactory;
Function pathSet
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
pathSet: function(jsonpath, value) {
var path = jsonPath(this._response, jsonpath, {
wrap: true,
resultType: "path"
});
Function resourceFn
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
get resourceFn() {
if (!this._resourceFn) {
var name = this.name;
var relationship = this.relationship;
var promiseEndpointFactory = this.promiseEndpointFactory;
Function RelationshipDescription
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
var RelationshipDescription = (function () {
function RelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues) {
_classCallCheck(this, RelationshipDescription);
this.initializer = relationshipInitializerFactory(ResourceClass, initialValues);
Function resourceFn
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
get resourceFn(){
if(!this._resourceFn) {
var name = this.name;
var relationship = this.relationship;
var promiseEndpointFactory = this.promiseEndpointFactory;
Function resourceFn
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
get resourceFn(){
if(!this._resourceFn) {
var name = this.name;
var relationship = this.relationship;
var promiseEndpointFactory = this.promiseEndpointFactory;
Function pathClear
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
pathClear: function(jsonpath) {
var path = jsonPath(this._response, jsonpath, {
wrap: true,
resultType: "path"
});
Function get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
- 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 get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
- 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 get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
- 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"