@@ -167,7 +167,7 @@ |
||
167 | 167 | */ |
168 | 168 | public function existenceCheck() |
169 | 169 | { |
170 | - if (! in_array($this->getStatusCode(), [200, 404])) { |
|
170 | + if ( ! in_array($this->getStatusCode(), [200, 404])) { |
|
171 | 171 | throw new UnexpectedStatusException($this); |
172 | 172 | } |
173 | 173 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function fill($data) |
49 | 49 | { |
50 | 50 | foreach ($data as $key => $value) { |
51 | - if (! property_exists($this, $key)) { |
|
51 | + if ( ! property_exists($this, $key)) { |
|
52 | 52 | throw new InvalidPropertyException($key . ' is not a property on ' . get_class($this)); |
53 | 53 | } |
54 | 54 |
@@ -162,7 +162,7 @@ |
||
162 | 162 | { |
163 | 163 | $class = __NAMESPACE__ . '\\ResourceClients\\' . ucfirst($property) . 'Client'; |
164 | 164 | |
165 | - if (! class_exists($class)) { |
|
165 | + if ( ! class_exists($class)) { |
|
166 | 166 | throw new ClassNotFoundException($class); |
167 | 167 | } |
168 | 168 |
@@ -38,12 +38,12 @@ discard block |
||
38 | 38 | |
39 | 39 | public function urlCheck($pageShortName) |
40 | 40 | { |
41 | - return $this->head("fundraising/pages/".$pageShortName); |
|
41 | + return $this->head("fundraising/pages/" . $pageShortName); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | public function suggestShortNames($preferredName) |
45 | 45 | { |
46 | - return $this->get("fundraising/pages/suggest?preferredName=".urlencode($preferredName)); |
|
46 | + return $this->get("fundraising/pages/suggest?preferredName=" . urlencode($preferredName)); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | public function register(FundraisingPage $pageCreationRequest) |
@@ -53,12 +53,12 @@ discard block |
||
53 | 53 | |
54 | 54 | public function getById($id) |
55 | 55 | { |
56 | - return $this->get("/fundraising/pagebyid/".$id); |
|
56 | + return $this->get("/fundraising/pagebyid/" . $id); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function getByShortName($pageShortName) |
60 | 60 | { |
61 | - return $this->get("fundraising/pages/".$pageShortName); |
|
61 | + return $this->get("fundraising/pages/" . $pageShortName); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function getAllPages() |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function getDonations($pageShortName, $pageSize = 50, $pageNumber = 0) |
70 | 70 | { |
71 | - return $this->get("fundraising/pages/".$pageShortName."/donations"."?PageSize=".$pageSize."&PageNum=".$pageNumber); |
|
71 | + return $this->get("fundraising/pages/" . $pageShortName . "/donations" . "?PageSize=" . $pageSize . "&PageNum=" . $pageNumber); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function getDonationsByReference($pageShortName, $reference) |
80 | 80 | { |
81 | - return $this->get("fundraising/pages/".$pageShortName."/donations/ref/".$reference); |
|
81 | + return $this->get("fundraising/pages/" . $pageShortName . "/donations/ref/" . $reference); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | public function UpdateStory($pageShortName, $storyUpdate) |
@@ -86,17 +86,17 @@ discard block |
||
86 | 86 | $storyUpdateRequest = new StoryUpdateRequest(); |
87 | 87 | $storyUpdateRequest->storySupplement = $storyUpdate; |
88 | 88 | |
89 | - return $this->post("fundraising/pages/".$pageShortName, $storyUpdateRequest); |
|
89 | + return $this->post("fundraising/pages/" . $pageShortName, $storyUpdateRequest); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | public function getUpdates($pageShortName) |
93 | 93 | { |
94 | - return $this->get("fundraising/pages/".$pageShortName."/updates/"); |
|
94 | + return $this->get("fundraising/pages/" . $pageShortName . "/updates/"); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public function getUpdatesById($pageShortName, $updateId) |
98 | 98 | { |
99 | - return $this->get("fundraising/pages/".$pageShortName."/updates/".$updateId); |
|
99 | + return $this->get("fundraising/pages/" . $pageShortName . "/updates/" . $updateId); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -106,75 +106,75 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function addPostToPageUpdate($pageShortName, $addPostToPageUpdateRequest) |
108 | 108 | { |
109 | - return $this->post("fundraising/pages/".$pageShortName."/updates/", $addPostToPageUpdateRequest); |
|
109 | + return $this->post("fundraising/pages/" . $pageShortName . "/updates/", $addPostToPageUpdateRequest); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public function deletePageUpdate($pageShortName, $updateId) |
113 | 113 | { |
114 | - return $this->delete("fundraising/pages/".$pageShortName."/updates/".$updateId); |
|
114 | + return $this->delete("fundraising/pages/" . $pageShortName . "/updates/" . $updateId); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | public function deleteAttribution($pageShortName) |
118 | 118 | { |
119 | - return $this->delete("fundraising/pages/".$pageShortName."/attribution"); |
|
119 | + return $this->delete("fundraising/pages/" . $pageShortName . "/attribution"); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | public function updateAttribution($pageShortName, UpdateFundraisingPageAttributionRequest $updateAttributionRequest) |
123 | 123 | { |
124 | - return $this->put("fundraising/pages/".$pageShortName."/attribution", $updateAttributionRequest); |
|
124 | + return $this->put("fundraising/pages/" . $pageShortName . "/attribution", $updateAttributionRequest); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | public function appendToAttribution($pageShortName, $appendToAttributionRequest) |
128 | 128 | { |
129 | - return $this->post("fundraising/pages/".$pageShortName."/attribution", $appendToAttributionRequest); |
|
129 | + return $this->post("fundraising/pages/" . $pageShortName . "/attribution", $appendToAttributionRequest); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | public function getAttribution($pageShortName) |
133 | 133 | { |
134 | - return $this->get("fundraising/pages/".$pageShortName."/attribution"); |
|
134 | + return $this->get("fundraising/pages/" . $pageShortName . "/attribution"); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | public function uploadImage($pageShortName, $caption, $filename, $imageContentType = null) |
138 | 138 | { |
139 | - $url = "fundraising/pages/".$pageShortName."/images?caption=".urlencode($caption); |
|
139 | + $url = "fundraising/pages/" . $pageShortName . "/images?caption=" . urlencode($caption); |
|
140 | 140 | |
141 | 141 | return $this->postFile($url, $filename, $imageContentType); |
142 | 142 | } |
143 | 143 | |
144 | 144 | public function uploadDefaultImage($pageShortName, $filename, $imageContentType = null) |
145 | 145 | { |
146 | - $url = "fundraising/pages/".$pageShortName."/images/default"; |
|
146 | + $url = "fundraising/pages/" . $pageShortName . "/images/default"; |
|
147 | 147 | |
148 | 148 | return $this->postFile($url, $filename, $imageContentType); |
149 | 149 | } |
150 | 150 | |
151 | 151 | public function addImage($pageShortName, AddImageRequest $addImageRequest) |
152 | 152 | { |
153 | - return $this->put("fundraising/pages/".$pageShortName."/images", $addImageRequest); |
|
153 | + return $this->put("fundraising/pages/" . $pageShortName . "/images", $addImageRequest); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | public function getImages($pageShortName) |
157 | 157 | { |
158 | - return $this->get("fundraising/pages/".$pageShortName."/images"); |
|
158 | + return $this->get("fundraising/pages/" . $pageShortName . "/images"); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | public function deleteImage($pageShortName, $imageName) |
162 | 162 | { |
163 | - return $this->delete("fundraising/pages/".$pageShortName."/images/".$imageName); |
|
163 | + return $this->delete("fundraising/pages/" . $pageShortName . "/images/" . $imageName); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | public function addVideo($pageShortName, AddVideoRequest $addVideoRequest) |
167 | 167 | { |
168 | - return $this->put("fundraising/pages/".$pageShortName."/videos", $addVideoRequest); |
|
168 | + return $this->put("fundraising/pages/" . $pageShortName . "/videos", $addVideoRequest); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | public function getVideos($pageShortName) |
172 | 172 | { |
173 | - return $this->get("fundraising/pages/".$pageShortName."/videos"); |
|
173 | + return $this->get("fundraising/pages/" . $pageShortName . "/videos"); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | public function cancel($pageShortName) |
177 | 177 | { |
178 | - return $this->delete("fundraising/pages/".$pageShortName); |
|
178 | + return $this->delete("fundraising/pages/" . $pageShortName); |
|
179 | 179 | } |
180 | 180 | } |