[Code Style] Rename shadowing variables

This commit is contained in:
Victor Woeltjen
2016-05-20 11:39:49 -07:00
parent e468080373
commit ad5691142e
56 changed files with 256 additions and 262 deletions

View File

@@ -126,11 +126,11 @@ define(
label = this.verb + " To";
validateLocation = function (newParent) {
validateLocation = function (newParentObj) {
var newContext = self.cloneContext();
newContext.selectedObject = object;
newContext.domainObject = newParent;
return composeService.validate(object, newParent) &&
newContext.domainObject = newParentObj;
return composeService.validate(object, newParentObj) &&
self.policyService.allow("action", self, newContext);
};
@@ -139,8 +139,8 @@ define(
label,
validateLocation,
currentParent
).then(function (newParent) {
return composeService.perform(object, newParent);
).then(function (newParentObj) {
return composeService.perform(object, newParentObj);
});
};

View File

@@ -83,11 +83,11 @@ define(
// Combines caller-provided filter (if any) with the
// baseline behavior of respecting creation policy.
function filterWithPolicy(domainObject) {
return (!filter || filter(domainObject)) &&
function filterWithPolicy(domainObj) {
return (!filter || filter(domainObj)) &&
policyService.allow(
"creation",
domainObject.getCapability("type")
domainObj.getCapability("type")
);
}

View File

@@ -77,8 +77,8 @@ define(
return dialogService
.getUserInput(formStructure, formState)
.then(function (formState) {
return formState.location;
.then(function (userFormState) {
return userFormState.location;
});
}
};

View File

@@ -458,17 +458,17 @@ define(
});
it("throws an error", function () {
var copyService =
var service =
new CopyService(mockQ, policyService);
function perform() {
copyService.perform(object, newParent);
service.perform(object, newParent);
}
spyOn(copyService, "validate");
copyService.validate.andReturn(true);
spyOn(service, "validate");
service.validate.andReturn(true);
expect(perform).not.toThrow();
copyService.validate.andReturn(false);
service.validate.andReturn(false);
expect(perform).toThrow();
});
});