Conditions | 3 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
63 | public function setAppValue($key, $value) { |
||
64 | if ($key === 'languages') { |
||
65 | if (! preg_match ( '/^(([a-z]{3,4}|[a-z]{3,4}\-[a-z]{3,4});)*([a-z]{3,4}|[a-z]{3,4}\-[a-z]{3,4})$/', $value )) { |
||
66 | throw new NotFoundException ( $this->l10n->t ( 'The languages are not specified in the correct format.' ) ); |
||
67 | } |
||
68 | } |
||
69 | return $this->config->setAppValue ( $this->appName, $key, $value ); |
||
70 | } |
||
71 | } |