<NME> cache.ts
<BEF> export default class Cache<T, V> {
  public size = 0;
  public misses = 0;
  public hits = 0;

  constructor(
    private limit: number,
  }

  get(key: T): V {
    let value;
    if (this.store.has(key)) {
      this.hits++;

      value = this.store.get(key);
    } else {
      this.misses++;
      value = this.set(key, this.func(key));
    }

    return value;
  }

  set(key: T, value: V) {

  set(key: T, value: V) {
    if (this.limit > this.size) {
      this.size++;
      this.store.set(key, value);
    }

    return value;
  }

  purge() {
    this.store.clear();
    this.size = 0;
    this.hits = 0;
    this.misses = 0;
  }
}

<MSG> Remove extraneous variable. Return inside if/else

<DFF> @@ -8,17 +8,14 @@ export default class Cache<T, V> {
   }
 
   get(key: T): V {
-    let value;
     if (this.store.has(key)) {
       this.hits++;
 
-      value = this.store.get(key);
+      return this.store.get(key);
     } else {
       this.misses++;
-      value = this.set(key, this.func(key));
+      return this.set(key, this.func(key));
     }
-
-    return value;
   }
 
   set(key: T, value: V) {

{'addition_count': 2, 'commit_subject': 'Remove extraneous variable. Return inside if/else', 'deletion_count': 5, 'file_extension': '.ts', 'lang': 'ts', 'license': 'mit', 'repo_name': 'emberjs/ember.js'}