Code Duplication    Length = 10-10 lines in 2 locations

src/Entity/Repository/Repository.php 1 location

@@ 54-63 (lines=10) @@
51
  /**
52
   * {@inheritdoc}
53
   */
54
  public function byId($id) {
55
    if (!isset($this->repository[$id])) {
56
      $factory = $this->entityManager->factory($this->getEntityTypeName());
57
      $this->repository[$id] = $factory->create(
58
        (object) array('id' => $id),
59
        $this->getEntityTypeName()
60
      );
61
    }
62
    return $this->repository[$id];
63
  }
64
65
  /**
66
   * {@inheritdoc}

src/Entity/Repository/SportRepository.php 1 location

@@ 24-33 (lines=10) @@
21
  /**
22
   * {@inheritdoc}
23
   */
24
  public function byId($id) {
25
    if (!isset($this->repository[$id])) {
26
      $factory = $this->entityManager->factory($this->getEntityTypeName());
27
      $this->repository[$id] = $factory->create(
28
        (object) array('id' => $id, 'name' => $id),
29
        $this->getEntityTypeName()
30
      );
31
    }
32
    return $this->repository[$id];
33
  }
34
35
  /**
36
   * {@inheritdoc}