Skip to content

Instantly share code, notes, and snippets.

@axelarge
Last active March 9, 2016 07:51
Show Gist options
  • Save axelarge/be0ef1eb8cf31026c47c to your computer and use it in GitHub Desktop.
Save axelarge/be0ef1eb8cf31026c47c to your computer and use it in GitHub Desktop.
// Gandrīz vienmēr
if ([self someThingOrOther]) {
return;
}
// Retos gadījumos (return, break, continue)
if ([self somethingOrOther]) return;
// Pretējā gadījumā vieglāk var notikt šis
if ([self somethingOrOther])
return;
return;
// Vai šis
if ([self somethingOrOther]);
return;
// Es pat negribētu iedomāties, kā ar alignošanu pēc koliem + "liec visu savā rindā" stilu izskatītos, piemēram, šāds koda gabals
NSArray<CBTag *> *tagsToExport = [[[[[self.model
updatedTagIdsAfterUpdateId:lastUpdateId]
objectEnumerator]
map:^(NSString *tagId) {
return [self.tags tagWithId:tagId];
}]
filter:^(CBTag *tag) {
return [self shouldExportTag:tag];
}]
toArray];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment