Code Duplication    Length = 9-9 lines in 2 locations

src/voku/cache/AdapterMemcache.php 1 location

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

src/voku/cache/AdapterMemcached.php 1 location

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