Completed
Push — namespace-model ( 32fe71...476d0e )
by Sam
16:05
created
tests/view/ContentNegotiatorTest.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -5,6 +5,7 @@
 block discarded – undo
5 5
 	/**
6 6
 	 * Small helper to render templates from strings
7 7
 	 * Cloned from SSViewerTest
8
+	 * @param string $templateString
8 9
 	 */
9 10
 	private function render($templateString, $data = null) {
10 11
 		$t = SSViewer::fromString($templateString);
Please login to merge, or discard this patch.
model/DataObject.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -2,10 +2,8 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace SilverStripe\Model;
4 4
 
5
-use SilverStripe\Model\FieldType\DBPolymorphicForeignKey;
6 5
 use SilverStripe\Model\FieldType\DBField;
7 6
 use SilverStripe\Model\FieldType\DBDatetime;
8
-use SilverStripe\Model\FieldType\DBPrimaryKey;
9 7
 use SilverStripe\Model\FieldType\DBComposite;
10 8
 use SilverStripe\Model\FieldType\DBClassName;
11 9
 use Object;
@@ -14,7 +12,6 @@  discard block
 block discarded – undo
14 12
 use i18nEntityProvider;
15 13
 use Config;
16 14
 use FieldList;
17
-
18 15
 use SQLSelect;
19 16
 
20 17
 
Please login to merge, or discard this patch.
admin/code/CampaignAdmin.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
 	/**
195 195
 	 * REST endpoint to get a list of campaigns.
196 196
 	 *
197
-	 * @param SS_HTTPRequest $request
197
+	 * @param HTTPRequest $request
198 198
 	 *
199
-	 * @return SS_HTTPResponse
199
+	 * @return HTTPResponse
200 200
 	 */
201 201
 	public function readCampaigns(HTTPRequest $request) {
202 202
 		$response = new HTTPResponse();
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	/**
336 336
 	 * Gets viewable list of campaigns
337 337
 	 *
338
-	 * @return SS_List
338
+	 * @return SilverStripe\Model\ArrayList
339 339
 	 */
340 340
 	protected function getListItems() {
341 341
 		return ChangeSet::get()
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 	/**
350 350
 	 * REST endpoint to get a campaign.
351 351
 	 *
352
-	 * @param SS_HTTPRequest $request
352
+	 * @param HTTPRequest $request
353 353
 	 *
354 354
 	 * @return SS_HTTPResponse
355 355
 	 */
@@ -382,9 +382,9 @@  discard block
 block discarded – undo
382 382
 	/**
383 383
 	 * REST endpoint to delete a campaign.
384 384
 	 *
385
-	 * @param SS_HTTPRequest $request
385
+	 * @param HTTPRequest $request
386 386
 	 *
387
-	 * @return SS_HTTPResponse
387
+	 * @return HTTPResponse
388 388
 	 */
389 389
 	public function deleteCampaign(HTTPRequest $request) {
390 390
 		$id = $request->param('ID');
@@ -409,9 +409,9 @@  discard block
 block discarded – undo
409 409
 	/**
410 410
 	 * REST endpoint to publish a {@link ChangeSet} and all of its items.
411 411
 	 *
412
-	 * @param SS_HTTPRequest $request
412
+	 * @param HTTPRequest $request
413 413
 	 *
414
-	 * @return SS_HTTPResponse
414
+	 * @return HTTPResponse
415 415
 	 */
416 416
 	public function publishCampaign(HTTPRequest $request) {
417 417
 		// Protect against CSRF on destructive action
Please login to merge, or discard this patch.
admin/code/CMSBatchActionHandler.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	 * Respond with the list of applicable pages for a given filter
128 128
 	 *
129 129
 	 * @param SS_HTTPRequest $request
130
-	 * @return SS_HTTPResponse
130
+	 * @return HTTPResponse
131 131
 	 */
132 132
 	public function handleApplicablePages($request) {
133 133
 		// Find the action handler
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * Check if this action has a confirmation step
155 155
 	 *
156 156
 	 * @param SS_HTTPRequest $request
157
-	 * @return SS_HTTPResponse
157
+	 * @return HTTPResponse
158 158
 	 */
159 159
 	public function handleConfirmation($request) {
160 160
 		// Find the action handler
Please login to merge, or discard this patch.
admin/code/LeftAndMain.php 1 patch
Doc Comments   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	/**
200 200
 	 * Gets the combined configuration of all LeafAndMain subclasses required by the client app.
201 201
 	 *
202
-	 * @return array
202
+	 * @return string
203 203
 	 *
204 204
 	 * WARNING: Experimental API
205 205
 	 */
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	 * schema if X-Formschema-Request header is set.
284 284
 	 *
285 285
 	 * @param Form $form
286
-	 * @return SS_HTTPResponse
286
+	 * @return HTTPResponse|null
287 287
 	 */
288 288
 	protected function getSchemaResponse($form) {
289 289
 		$request = $this->getRequest();
@@ -889,6 +889,7 @@  discard block
 block discarded – undo
889 889
 	 * Return a list of appropriate templates for this class, with the given suffix using
890 890
 	 * {@link SSViewer::get_templates_by_class()}
891 891
 	 *
892
+	 * @param string $suffix
892 893
 	 * @return array
893 894
 	 */
894 895
 	public function getTemplatesWithSuffix($suffix) {
@@ -1758,7 +1759,7 @@  discard block
 block discarded – undo
1758 1759
 	 * The controller might not have any previewable content, in which case
1759 1760
 	 * this method returns FALSE.
1760 1761
 	 *
1761
-	 * @return String|boolean
1762
+	 * @return boolean
1762 1763
 	 */
1763 1764
 	public function LinkPreview() {
1764 1765
 		return false;
@@ -1945,7 +1946,7 @@  discard block
 block discarded – undo
1945 1946
 	}
1946 1947
 
1947 1948
 	/**
1948
-	 * @return String
1949
+	 * @return DBField
1949 1950
 	 */
1950 1951
 	public function Locale() {
1951 1952
 		return DBField::create_field('Locale', i18n::get_locale());
@@ -2111,6 +2112,9 @@  discard block
 block discarded – undo
2111 2112
 		return (parent::isFinished() || $this->isFinished);
2112 2113
 	}
2113 2114
 
2115
+	/**
2116
+	 * @param boolean $bool
2117
+	 */
2114 2118
 	public function setIsFinished($bool) {
2115 2119
 		$this->isFinished = $bool;
2116 2120
 	}
Please login to merge, or discard this patch.
admin/code/ModelAdmin.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@
 block discarded – undo
117 117
 		Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ModelAdmin.js');
118 118
 	}
119 119
 
120
+	/**
121
+	 * @param string $action
122
+	 */
120 123
 	public function Link($action = null) {
121 124
 		if(!$action) $action = $this->sanitiseClassName($this->modelClass);
122 125
 		return parent::Link($action);
Please login to merge, or discard this patch.
control/ContentNegotiator.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -119,6 +119,7 @@  discard block
 block discarded – undo
119 119
 	/**
120 120
 	 * Returns true if negotiation is enabled for the given response. By default, negotiation is only
121 121
 	 * enabled for pages that have the xml header.
122
+	 * @param HTTPResponse $response
122 123
 	 */
123 124
 	public static function enabled_for($response) {
124 125
 		$contentType = $response->getHeader("Content-Type");
@@ -134,7 +135,7 @@  discard block
 block discarded – undo
134 135
 	}
135 136
 
136 137
 	/**
137
-	 * @param SS_HTTPResponse $response
138
+	 * @param HTTPResponse $response
138 139
 	 */
139 140
 	public static function process(HTTPResponse $response) {
140 141
 		if(!self::enabled_for($response)) return;
@@ -184,7 +185,7 @@  discard block
 block discarded – undo
184 185
 	 * Replaces a few common tags and entities with their XHTML representations (<br>, <img>, &nbsp;
185 186
 	 * <input>, checked, selected).
186 187
 	 *
187
-	 * @param SS_HTTPResponse $response
188
+	 * @param HTTPResponse $response
188 189
 	 *
189 190
 	 * @todo Search for more xhtml replacement
190 191
 	 */
@@ -224,7 +225,7 @@  discard block
 block discarded – undo
224 225
 	 * - Replaces all occurrences of "application/xhtml+xml" with "text/html" in the template.
225 226
 	 * - Removes "xmlns" attributes and any <?xml> Pragmas.
226 227
 	 *
227
-	 * @param SS_HTTPResponse $response
228
+	 * @param HTTPResponse $response
228 229
 	 */
229 230
 	public function html(HTTPResponse $response) {
230 231
 		$encoding = Config::inst()->get('SilverStripe\Control\ContentNegotiator', 'encoding');
Please login to merge, or discard this patch.
control/Controller.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 	 * $this->pushCurrent() and end the method with $this->popCurrent(). Failure to do this will create
144 144
 	 * weird session errors.
145 145
 	 *
146
-	 * @param SS_HTTPRequest $request
146
+	 * @param HTTPRequest $request
147 147
 	 * @param DataModel $model
148 148
 	 *
149
-	 * @return SS_HTTPResponse
149
+	 * @return string
150 150
 	 */
151 151
 	public function handleRequest(HTTPRequest $request, DataModel $model) {
152 152
 		if(!$request) user_error("Controller::handleRequest() not passed a request!", E_USER_ERROR);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	/**
282 282
 	 * Sets the SS_HTTPResponse object that this controller is building up.
283 283
 	 *
284
-	 * @param SS_HTTPResponse $response
284
+	 * @param HTTPResponse $response
285 285
 	 *
286 286
 	 * @return $this
287 287
 	 */
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 	 *
323 323
 	 * @param string $action
324 324
 	 *
325
-	 * @return HTMLText
325
+	 * @return \SilverStripe\Model\FieldType\DBField
326 326
 	 */
327 327
 	public function defaultAction($action) {
328 328
 		return $this->getViewer($action)->process($this);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	 *
459 459
 	 * @param array $params
460 460
 	 *
461
-	 * @return string
461
+	 * @return \SilverStripe\Model\FieldType\DBField
462 462
 	 */
463 463
 	public function render($params = null) {
464 464
 		$template = $this->getViewer($this->getAction());
@@ -623,7 +623,7 @@  discard block
 block discarded – undo
623 623
 	 * Tests whether a redirection has been requested. If redirect() has been called, it will return
624 624
 	 * the URL redirected to. Otherwise, it will return null.
625 625
 	 *
626
-	 * @return null|string
626
+	 * @return boolean
627 627
 	 */
628 628
 	public function redirectedTo() {
629 629
 		return $this->getResponse() && $this->getResponse()->getHeader('Location');
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,6 @@
 block discarded – undo
16 16
 
17 17
 use SilverStripe\Model\DataModel;
18 18
 use BasicAuth;
19
-
20
-
21 19
 use Debug;
22 20
 use Object;
23 21
 use SSViewer;
Please login to merge, or discard this patch.
control/Director.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 	/**
415 415
 	 * Handle an HTTP request, defined with a SS_HTTPRequest object.
416 416
 	 *
417
-	 * @param SS_HTTPRequest $request
417
+	 * @param HTTPRequest $request
418 418
 	 * @param Session $session
419 419
 	 * @param DataModel $model
420 420
 	 *
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
 	 * Returns the domain part of the URL 'http://www.mysite.com'. Returns FALSE is this environment
561 561
 	 * variable isn't set.
562 562
 	 *
563
-	 * @return bool|string
563
+	 * @return string|false
564 564
 	 */
565 565
 	public static function protocolAndHost() {
566 566
 		$alternate = Config::inst()->get('SilverStripe\Control\Director', 'alternate_base_url');
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
 	/**
894 894
 	 * Returns true if the given file exists. Filename should be relative to the site root.
895 895
 	 *
896
-	 * @param $file
896
+	 * @param string $file
897 897
 	 *
898 898
 	 * @return bool
899 899
 	 */
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
 	 * Can also be checked with {@link Director::isDev()}, {@link Director::isTest()}, and
1112 1112
 	 * {@link Director::isLive()}.
1113 1113
 	 *
1114
-	 * @return bool|string
1114
+	 * @return string|false
1115 1115
 	 */
1116 1116
 	public static function get_environment_type() {
1117 1117
 		if (Director::isLive()) {
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -9,9 +9,6 @@
 block discarded – undo
9 9
 use Injector;
10 10
 use ArrayIterator;
11 11
 use ViewableData;
12
-
13
-
14
-
15 12
 use SilverStripe\Model\Filterable;
16 13
 use SilverStripe\Model\Sortable;
17 14
 use SilverStripe\Model\Limitable;
Please login to merge, or discard this patch.