MCPcopy Create free account
hub / github.com/Rello/analytics / removeValue

Method removeValue

lib/DataSession.php:88–102  ·  view source on GitHub ↗
(string $key, string $token)

Source from the content-addressed store, hash-verified

86 }
87
88 protected function removeValue(string $key, string $token): void
89 {
90 $values = $this->session->get($key);
91 if ($values === null) {
92 $values = [];
93 } else {
94 $values = json_decode($values, true);
95 if ($values === null) {
96 $values = [];
97 } else {
98 unset($values[$token]);
99 }
100 }
101 $this->session->set($key, json_encode($values));
102 }
103}

Callers 2

removeLegacyPasswordMethod · 0.95

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected