@@ -29,7 +29,9 @@ discard block |
||
29 | 29 | * @return ICalDAVRequestFactory |
30 | 30 | */ |
31 | 31 | public static function getInstance(){ |
32 | - if(is_null(self::$instance)) self::$instance = new CalDAVRequestFactory(); |
|
32 | + if(is_null(self::$instance)) { |
|
33 | + self::$instance = new CalDAVRequestFactory(); |
|
34 | + } |
|
33 | 35 | return self::$instance; |
34 | 36 | } |
35 | 37 | |
@@ -58,28 +60,34 @@ discard block |
||
58 | 60 | case self::CalendarRequestType: |
59 | 61 | return new GetCalendarRequest(); |
60 | 62 | case self::CalendarSyncRequestType: |
61 | - if(count($params) == 0 ) |
|
62 | - throw new \InvalidArgumentException(); |
|
63 | + if(count($params) == 0 ) { |
|
64 | + throw new \InvalidArgumentException(); |
|
65 | + } |
|
63 | 66 | return new CalendarSyncRequest($params[0]); |
64 | 67 | case self::CalendarMultiGetRequestType: |
65 | - if(count($params) == 0 ) |
|
66 | - throw new \InvalidArgumentException(); |
|
68 | + if(count($params) == 0 ) { |
|
69 | + throw new \InvalidArgumentException(); |
|
70 | + } |
|
67 | 71 | return new CalendarMultiGetRequest($params[0]); |
68 | 72 | case self::CalendarQueryRequestType: |
69 | - if(count($params) == 0 ) |
|
70 | - throw new \InvalidArgumentException(); |
|
73 | + if(count($params) == 0 ) { |
|
74 | + throw new \InvalidArgumentException(); |
|
75 | + } |
|
71 | 76 | return new CalendarQueryRequest($params[0]); |
72 | 77 | case self::CalendarCreateRequestType: |
73 | - if(count($params) == 0 ) |
|
74 | - throw new \InvalidArgumentException(); |
|
78 | + if(count($params) == 0 ) { |
|
79 | + throw new \InvalidArgumentException(); |
|
80 | + } |
|
75 | 81 | return new CalendarCreateRequest($params[0]); |
76 | 82 | case self::EventCreateRequestType: |
77 | - if(count($params) == 0 ) |
|
78 | - throw new \InvalidArgumentException(); |
|
83 | + if(count($params) == 0 ) { |
|
84 | + throw new \InvalidArgumentException(); |
|
85 | + } |
|
79 | 86 | return new EventCreateRequest($params[0]); |
80 | 87 | case self::EventUpdateRequestType: |
81 | - if(count($params) == 0 ) |
|
82 | - throw new \InvalidArgumentException(); |
|
88 | + if(count($params) == 0 ) { |
|
89 | + throw new \InvalidArgumentException(); |
|
90 | + } |
|
83 | 91 | return new EventUpdateRequest($params[0]); |
84 | 92 | } |
85 | 93 | return null; |