@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | final class CalDAVRequestFactory implements ICalDAVRequestFactory |
20 | 20 | { |
21 | - private function __construct(){} |
|
21 | + private function __construct() {} |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * @var ICalDAVRequestFactory |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * @return ICalDAVRequestFactory |
30 | 30 | */ |
31 | - public static function getInstance(){ |
|
32 | - if(is_null(self::$instance)) self::$instance = new CalDAVRequestFactory(); |
|
31 | + public static function getInstance() { |
|
32 | + if (is_null(self::$instance)) self::$instance = new CalDAVRequestFactory(); |
|
33 | 33 | return self::$instance; |
34 | 34 | } |
35 | 35 | |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | * @return IAbstractWebDAVRequest|null |
48 | 48 | * @throws \InvalidArgumentException |
49 | 49 | */ |
50 | - public function build($type, $params = []){ |
|
51 | - switch(strtoupper($type)){ |
|
50 | + public function build($type, $params = []) { |
|
51 | + switch (strtoupper($type)) { |
|
52 | 52 | case self::PrincipalRequestType: |
53 | 53 | return new UserPrincipalRequest(); |
54 | 54 | case self::CalendarHomeRequestType: |
@@ -58,27 +58,27 @@ discard block |
||
58 | 58 | case self::CalendarRequestType: |
59 | 59 | return new GetCalendarRequest(); |
60 | 60 | case self::CalendarSyncRequestType: |
61 | - if(count($params) == 0 ) |
|
61 | + if (count($params) == 0) |
|
62 | 62 | throw new \InvalidArgumentException(); |
63 | 63 | return new CalendarSyncRequest($params[0]); |
64 | 64 | case self::CalendarMultiGetRequestType: |
65 | - if(count($params) == 0 ) |
|
65 | + if (count($params) == 0) |
|
66 | 66 | throw new \InvalidArgumentException(); |
67 | 67 | return new CalendarMultiGetRequest($params[0]); |
68 | 68 | case self::CalendarQueryRequestType: |
69 | - if(count($params) == 0 ) |
|
69 | + if (count($params) == 0) |
|
70 | 70 | throw new \InvalidArgumentException(); |
71 | 71 | return new CalendarQueryRequest($params[0]); |
72 | 72 | case self::CalendarCreateRequestType: |
73 | - if(count($params) == 0 ) |
|
73 | + if (count($params) == 0) |
|
74 | 74 | throw new \InvalidArgumentException(); |
75 | 75 | return new CalendarCreateRequest($params[0]); |
76 | 76 | case self::EventCreateRequestType: |
77 | - if(count($params) == 0 ) |
|
77 | + if (count($params) == 0) |
|
78 | 78 | throw new \InvalidArgumentException(); |
79 | 79 | return new EventCreateRequest($params[0]); |
80 | 80 | case self::EventUpdateRequestType: |
81 | - if(count($params) == 0 ) |
|
81 | + if (count($params) == 0) |
|
82 | 82 | throw new \InvalidArgumentException(); |
83 | 83 | return new EventUpdateRequest($params[0]); |
84 | 84 | } |