Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php declare(strict_types=1); |
||
32 | static function xmlDeserialize(Reader $reader): Limit { |
||
|
|||
33 | $limit = new self(); |
||
34 | |||
35 | $elements = \Sabre\Xml\Deserializer\keyValue($reader); |
||
36 | $namespace = SearchPlugin::SEARCHDAV_NS; |
||
37 | |||
38 | $limit->maxResults = isset($elements['{DAV:}nresults']) ? $elements['{DAV:}nresults'] : 0; |
||
39 | $firstResult = '{' . $namespace . '}firstresult'; |
||
40 | $limit->firstResult = isset($elements[$firstResult]) ? $elements[$firstResult] : 0; |
||
41 | |||
42 | return $limit; |
||
43 | } |
||
45 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.