@@ -159,6 +159,10 @@ discard block |
||
159 | 159 | ]); |
160 | 160 | } |
161 | 161 | |
162 | + /** |
|
163 | + * @param \SilverStripe\ORM\FieldType\DBHTMLText $result |
|
164 | + * @param string[] $expected |
|
165 | + */ |
|
162 | 166 | private function assertExpectedStrings($result, $expected) |
163 | 167 | { |
164 | 168 | foreach ($expected as $expectedStr) { |
@@ -1089,6 +1093,10 @@ discard block |
||
1089 | 1093 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
1090 | 1094 | } |
1091 | 1095 | |
1096 | + /** |
|
1097 | + * @param string $a |
|
1098 | + * @param string $b |
|
1099 | + */ |
|
1092 | 1100 | public function assertEqualIgnoringWhitespace($a, $b, $message = '') |
1093 | 1101 | { |
1094 | 1102 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b), $message); |
@@ -1817,6 +1825,11 @@ discard block |
||
1817 | 1825 | $this->_renderWithSourceFileComments('SSViewerTestComments/'.$template['name'], $template['expected']); |
1818 | 1826 | } |
1819 | 1827 | } |
1828 | + |
|
1829 | + /** |
|
1830 | + * @param string $name |
|
1831 | + * @param string $expected |
|
1832 | + */ |
|
1820 | 1833 | private function _renderWithSourceFileComments($name, $expected) |
1821 | 1834 | { |
1822 | 1835 | $viewer = new SSViewer(array($name)); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | /** |
20 | 20 | * Common method for setting up form, since that will always be a dependency for the validator. |
21 | 21 | * |
22 | - * @param array $fieldNames |
|
22 | + * @param string[] $fieldNames |
|
23 | 23 | * @return Form |
24 | 24 | */ |
25 | 25 | protected function getForm(array $fieldNames = array()) |
@@ -310,6 +310,9 @@ |
||
310 | 310 | |
311 | 311 | private static $method_from_cache = array(); |
312 | 312 | |
313 | + /** |
|
314 | + * @param string $method |
|
315 | + */ |
|
313 | 316 | public static function has_method_from($class, $method, $compclass) |
314 | 317 | { |
315 | 318 | $lClass = strtolower($class); |
@@ -190,7 +190,7 @@ |
||
190 | 190 | /** |
191 | 191 | * Ensure that the query is ready to execute. |
192 | 192 | * |
193 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
193 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
194 | 194 | * @return SQLSelect The finalised sql query |
195 | 195 | */ |
196 | 196 | public function getFinalisedQuery($queriedColumns = null) |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | * - array('fields' => array('A','B','C'), 'type' => 'index/unique/fulltext'): This gives you full |
332 | 332 | * control over the index. |
333 | 333 | * @param boolean $hasAutoIncPK A flag indicating that the primary key on this table is an autoincrement type |
334 | - * @param array $options Create table options (ENGINE, etc.) |
|
334 | + * @param string|null $options Create table options (ENGINE, etc.) |
|
335 | 335 | * @param array|bool $extensions List of extensions |
336 | 336 | */ |
337 | 337 | public function requireTable( |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | * |
596 | 596 | * @param string $table The table name. |
597 | 597 | * @param string $field The field name. |
598 | - * @param array|string $spec The field specification. If passed in array syntax, the specific database |
|
598 | + * @param string $spec The field specification. If passed in array syntax, the specific database |
|
599 | 599 | * driver takes care of the ALTER TABLE syntax. If passed as a string, its assumed to |
600 | 600 | * be prepared as a direct SQL framgment ready for insertion into ALTER TABLE. In this case you'll |
601 | 601 | * need to take care of database abstraction in your DBField subclass. |
@@ -2165,7 +2165,7 @@ discard block |
||
2165 | 2165 | * Called by {@link __get()} and any getFieldName() methods you might create. |
2166 | 2166 | * |
2167 | 2167 | * @param string $field The name of the field |
2168 | - * @return mixed The field value |
|
2168 | + * @return string|null The field value |
|
2169 | 2169 | */ |
2170 | 2170 | public function getField($field) |
2171 | 2171 | { |
@@ -2447,6 +2447,7 @@ discard block |
||
2447 | 2447 | |
2448 | 2448 | /** |
2449 | 2449 | * {@inheritdoc} |
2450 | + * @param string $field |
|
2450 | 2451 | */ |
2451 | 2452 | public function castingHelper($field) |
2452 | 2453 | { |
@@ -2552,7 +2553,7 @@ discard block |
||
2552 | 2553 | * </code> |
2553 | 2554 | * |
2554 | 2555 | * @param string $methodName Method on the same object, e.g. {@link canEdit()} |
2555 | - * @param Member|int $member |
|
2556 | + * @param Member|null $member |
|
2556 | 2557 | * @param array $context Optional context |
2557 | 2558 | * @return boolean|null |
2558 | 2559 | */ |
@@ -2575,7 +2576,7 @@ discard block |
||
2575 | 2576 | |
2576 | 2577 | /** |
2577 | 2578 | * @param Member $member |
2578 | - * @return boolean |
|
2579 | + * @return boolean|string |
|
2579 | 2580 | */ |
2580 | 2581 | public function canView($member = null) |
2581 | 2582 | { |
@@ -2588,7 +2589,7 @@ discard block |
||
2588 | 2589 | |
2589 | 2590 | /** |
2590 | 2591 | * @param Member $member |
2591 | - * @return boolean |
|
2592 | + * @return boolean|string |
|
2592 | 2593 | */ |
2593 | 2594 | public function canEdit($member = null) |
2594 | 2595 | { |
@@ -2601,7 +2602,7 @@ discard block |
||
2601 | 2602 | |
2602 | 2603 | /** |
2603 | 2604 | * @param Member $member |
2604 | - * @return boolean |
|
2605 | + * @return boolean|string |
|
2605 | 2606 | */ |
2606 | 2607 | public function canDelete($member = null) |
2607 | 2608 | { |
@@ -2616,7 +2617,7 @@ discard block |
||
2616 | 2617 | * @param Member $member |
2617 | 2618 | * @param array $context Additional context-specific data which might |
2618 | 2619 | * affect whether (or where) this object could be created. |
2619 | - * @return boolean |
|
2620 | + * @return boolean|string |
|
2620 | 2621 | */ |
2621 | 2622 | public function canCreate($member = null, $context = array()) |
2622 | 2623 | { |
@@ -2731,7 +2732,7 @@ discard block |
||
2731 | 2732 | * Traverses to a field referenced by relationships between data objects, returning the value |
2732 | 2733 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
2733 | 2734 | * |
2734 | - * @param $fieldName string |
|
2735 | + * @param string $fieldName string |
|
2735 | 2736 | * @return string | null - will return null on a missing value |
2736 | 2737 | */ |
2737 | 2738 | public function relField($fieldName) |
@@ -2809,7 +2810,7 @@ discard block |
||
2809 | 2810 | * @param string $callerClass The class of objects to be returned |
2810 | 2811 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
2811 | 2812 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
2812 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
2813 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
2813 | 2814 | * BY clause. If omitted, self::$default_sort will be used. |
2814 | 2815 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
2815 | 2816 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -49,6 +49,9 @@ discard block |
||
49 | 49 | return parent::login($request, Authenticator::CMS_LOGIN); |
50 | 50 | } |
51 | 51 | |
52 | + /** |
|
53 | + * @param string $action |
|
54 | + */ |
|
52 | 55 | public function Link($action = null) |
53 | 56 | { |
54 | 57 | /** @skipUpgrade */ |
@@ -79,6 +82,9 @@ discard block |
||
79 | 82 | return null; |
80 | 83 | } |
81 | 84 | |
85 | + /** |
|
86 | + * @param string $title |
|
87 | + */ |
|
82 | 88 | public function getResponseController($title) |
83 | 89 | { |
84 | 90 | // Use $this to prevent use of Page to render underlying templates |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * Combine the given forms into a formset with a tabbed interface |
602 | 602 | * |
603 | 603 | * @param $forms |
604 | - * @return string |
|
604 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
605 | 605 | */ |
606 | 606 | protected function generateLoginFormSet($forms) |
607 | 607 | { |
@@ -1241,6 +1241,7 @@ discard block |
||
1241 | 1241 | |
1242 | 1242 | /** |
1243 | 1243 | * For the database_is_ready call to return a certain value - used for testing |
1244 | + * @param boolean $isReady |
|
1244 | 1245 | */ |
1245 | 1246 | public static function force_database_is_ready($isReady) |
1246 | 1247 | { |
@@ -1284,7 +1285,7 @@ discard block |
||
1284 | 1285 | /** |
1285 | 1286 | * Set to true to ignore access to disallowed actions, rather than returning permission failure |
1286 | 1287 | * Note that this is just a flag that other code needs to check with Security::ignore_disallowed_actions() |
1287 | - * @param $flag True or false |
|
1288 | + * @param boolean $flag True or false |
|
1288 | 1289 | */ |
1289 | 1290 | public static function set_ignore_disallowed_actions($flag) |
1290 | 1291 | { |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | * |
372 | 372 | * @param string $property |
373 | 373 | * the name of the property |
374 | - * @param object $object |
|
374 | + * @param string $object |
|
375 | 375 | * the object to be set |
376 | 376 | * @return $this |
377 | 377 | */ |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | * The name of the service to update the definition for |
467 | 467 | * @param string $property |
468 | 468 | * The name of the property to update. |
469 | - * @param mixed $value |
|
469 | + * @param string $value |
|
470 | 470 | * The value to set |
471 | 471 | * @param boolean $append |
472 | 472 | * Whether to append (the default) when the property is an array |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | /** |
789 | 789 | * @deprecated 4.0.0:5.0.0 Use Injector::has() instead |
790 | 790 | * @param $name |
791 | - * @return string |
|
791 | + * @return boolean |
|
792 | 792 | */ |
793 | 793 | public function hasService($name) |
794 | 794 | { |