Code Duplication    Length = 9-9 lines in 2 locations

src/voku/cache/AdapterMemcache.php 1 location

@@ 94-102 (lines=9) @@
91
  /**
92
   * @inheritdoc
93
   */
94
  public function set(string $key, $value): bool
95
  {
96
    // Make sure we are under the proper limit
97
    if (\strlen($key) > 250) {
98
      throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true));
99
    }
100
101
    return $this->memcache->set($key, $value, $this->getCompressedFlag());
102
  }
103
104
  /**
105
   * @inheritdoc

src/voku/cache/AdapterMemcached.php 1 location

@@ 91-99 (lines=9) @@
88
  /**
89
   * @inheritdoc
90
   */
91
  public function set(string $key, $value): bool
92
  {
93
    // Make sure we are under the proper limit
94
    if (\strlen($this->memcached->getOption(\Memcached::OPT_PREFIX_KEY) . $key) > 250) {
95
      throw new InvalidArgumentException('The passed cache key is over 250 bytes:' . print_r($key, true));
96
    }
97
98
    return $this->memcached->set($key, $value);
99
  }
100
101
  /**
102
   * @inheritdoc