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

Method removeValue

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

Source from the content-addressed store, hash-verified

74 }
75
76 protected function removeValue(string $key, string $token): void
77 {
78 $values = $this->session->get($key);
79 if ($values === null) {
80 $values = [];
81 } else {
82 $values = json_decode($values, true);
83 if ($values === null) {
84 $values = [];
85 } else {
86 unset($values[$token]);
87 }
88 }
89 $this->session->set($key, json_encode($values));
90 }
91}

Callers 1

Calls 2

setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected