Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | 2 | public function store(Password $password, $allowOverwrite = false) |
|
38 | { |
||
39 | 2 | if (!$allowOverwrite && $this->get($password->getId())) { |
|
40 | 1 | throw new PhPsstException('The ID already exists', PhPsstException::ID_IS_ALREADY_TAKEN); |
|
41 | } |
||
42 | 1 | $this->client->set($password->getId(), $password->getJson()); |
|
43 | 1 | } |
|
44 | |||
67 |