@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * Which columns are handled by this component |
| 56 | 56 | * |
| 57 | 57 | * @param GridField $gridField |
| 58 | - * @return array |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public function getColumnsHandled($gridField) { |
| 61 | 61 | return array('Actions'); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * @param DataObject $record |
| 77 | 77 | * @param string $columnName |
| 78 | 78 | * |
| 79 | - * @return string - the HTML for the column |
|
| 79 | + * @return DBHTMLText - the HTML for the column |
|
| 80 | 80 | */ |
| 81 | 81 | public function getColumnContent($gridField, $record, $columnName) { |
| 82 | 82 | // No permission checks, handled through GridFieldDetailForm, |
@@ -123,6 +123,10 @@ discard block |
||
| 123 | 123 | )); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | + /** |
|
| 127 | + * @param DBHTMLText $result |
|
| 128 | + * @param string[] $expected |
|
| 129 | + */ |
|
| 126 | 130 | private function assertExpectedStrings($result, $expected) { |
| 127 | 131 | foreach ($expected as $expectedStr) { |
| 128 | 132 | $this->assertTrue( |
@@ -756,6 +760,10 @@ discard block |
||
| 756 | 760 | $this->assertEquals('A A1 A1 i A1 ii A2 A3', $rationalisedResult); |
| 757 | 761 | } |
| 758 | 762 | |
| 763 | + /** |
|
| 764 | + * @param string $a |
|
| 765 | + * @param string $b |
|
| 766 | + */ |
|
| 759 | 767 | public function assertEqualIgnoringWhitespace($a, $b) { |
| 760 | 768 | $this->assertEquals(preg_replace('/\s+/', '', $a), preg_replace('/\s+/', '', $b)); |
| 761 | 769 | } |
@@ -1375,6 +1383,11 @@ discard block |
||
| 1375 | 1383 | Config::inst()->update('SSViewer', 'source_file_comments', false); |
| 1376 | 1384 | Config::inst()->update('Director', 'environment_type', $origEnv); |
| 1377 | 1385 | } |
| 1386 | + |
|
| 1387 | + /** |
|
| 1388 | + * @param string $name |
|
| 1389 | + * @param string $expected |
|
| 1390 | + */ |
|
| 1378 | 1391 | private function _renderWithSourceFileComments($name, $expected) { |
| 1379 | 1392 | $viewer = new SSViewer(array($name)); |
| 1380 | 1393 | $data = new ArrayData(array()); |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | * |
| 212 | 212 | * @todo Mix in custom column mappings |
| 213 | 213 | * |
| 214 | - * @return array |
|
| 214 | + * @return string |
|
| 215 | 215 | **/ |
| 216 | 216 | public function getImportSpec() { |
| 217 | 217 | $spec = array(); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * so this is mainly a customization method. |
| 238 | 238 | * |
| 239 | 239 | * @param mixed $val |
| 240 | - * @param string $field Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 240 | + * @param string $fieldName Name of the field as specified in the array-values for {@link self::$columnMap}. |
|
| 241 | 241 | * @return boolean |
| 242 | 242 | */ |
| 243 | 243 | protected function isNullValue($val, $fieldName = null) { |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | /** |
| 363 | 363 | * @param $obj DataObject |
| 364 | - * @param $message string |
|
| 364 | + * @param string $message string |
|
| 365 | 365 | */ |
| 366 | 366 | public function addCreated($obj, $message = null) { |
| 367 | 367 | $this->created[] = $this->lastChange = array( |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | /** |
| 376 | 376 | * @param $obj DataObject |
| 377 | - * @param $message string |
|
| 377 | + * @param string $message string |
|
| 378 | 378 | */ |
| 379 | 379 | public function addUpdated($obj, $message = null) { |
| 380 | 380 | $this->updated[] = $this->lastChange = array( |
@@ -386,8 +386,8 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
| 389 | - * @param $obj DataObject |
|
| 390 | - * @param $message string |
|
| 389 | + * @param DataObject|null $obj DataObject |
|
| 390 | + * @param string $message string |
|
| 391 | 391 | */ |
| 392 | 392 | public function addDeleted($obj, $message = null) { |
| 393 | 393 | $data = $obj->toMap(); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @param array|string $val String to escape, or array of strings |
| 52 | 52 | * |
| 53 | - * @return array|string |
|
| 53 | + * @return string |
|
| 54 | 54 | */ |
| 55 | 55 | public static function raw2htmlname($val) { |
| 56 | 56 | if(is_array($val)) { |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * table, or column name. Supports encoding of multi identfiers separated by |
| 177 | 177 | * a delimiter (e.g. ".") |
| 178 | 178 | * |
| 179 | - * @param string|array $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers |
|
| 179 | + * @param string $identifier The identifier to escape. E.g. 'SiteTree.Title' or list of identifiers |
|
| 180 | 180 | * to be joined via the separator. |
| 181 | 181 | * @param string $separator The string that delimits subsequent identifiers |
| 182 | 182 | * @return string The escaped identifier. E.g. '"SiteTree"."Title"' |
@@ -257,6 +257,7 @@ discard block |
||
| 257 | 257 | * call this function directly, Please use {@link Convert::xml2array()} |
| 258 | 258 | * |
| 259 | 259 | * @param SimpleXMLElement |
| 260 | + * @param SimpleXMLElement $xml |
|
| 260 | 261 | * |
| 261 | 262 | * @return mixed |
| 262 | 263 | */ |
@@ -450,7 +451,7 @@ discard block |
||
| 450 | 451 | * - IDField => idField |
| 451 | 452 | * - iDField => iDField |
| 452 | 453 | * |
| 453 | - * @param $str |
|
| 454 | + * @param string $str |
|
| 454 | 455 | * @return string |
| 455 | 456 | */ |
| 456 | 457 | public static function upperCamelToLowerCamel($str) { |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | /** |
| 90 | 90 | * Get list of File dataobjects to import |
| 91 | 91 | * |
| 92 | - * @return DataList |
|
| 92 | + * @return SilverStripe\ORM\DataList |
|
| 93 | 93 | */ |
| 94 | 94 | protected function getFileQuery() { |
| 95 | 95 | // Select all records which have a Filename value, but not FileFilename. |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * Find the given folder or create it as a database record |
| 48 | 48 | * |
| 49 | 49 | * @param string $folderPath Directory path relative to assets root |
| 50 | - * @return Folder|null |
|
| 50 | + * @return null|SilverStripe\ORM\DataObject |
|
| 51 | 51 | */ |
| 52 | 52 | public static function find_or_make($folderPath) { |
| 53 | 53 | // replace leading and trailing slashes |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | /** |
| 150 | 150 | * Returns all children of this folder |
| 151 | 151 | * |
| 152 | - * @return DataList |
|
| 152 | + * @return SilverStripe\ORM\DataList |
|
| 153 | 153 | */ |
| 154 | 154 | public function myChildren() { |
| 155 | 155 | return File::get()->filter("ParentID", $this->ID); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | /** |
| 201 | 201 | * Get the children of this folder that are also folders. |
| 202 | 202 | * |
| 203 | - * @return DataList |
|
| 203 | + * @return SilverStripe\ORM\DataList |
|
| 204 | 204 | */ |
| 205 | 205 | public function ChildFolders() { |
| 206 | 206 | return Folder::get()->filter('ParentID', $this->ID); |
@@ -513,7 +513,7 @@ |
||
| 513 | 513 | /** |
| 514 | 514 | * Get HTML for img containing the icon for this file |
| 515 | 515 | * |
| 516 | - * @return DBHTMLText |
|
| 516 | + * @return DBField |
|
| 517 | 517 | */ |
| 518 | 518 | public function IconTag() { |
| 519 | 519 | return DBField::create_field( |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | /** |
| 64 | 64 | * Assign a new configuration instance or identifier |
| 65 | 65 | * |
| 66 | - * @param string|HTMLEditorConfig $config |
|
| 66 | + * @param string $config |
|
| 67 | 67 | * @return $this |
| 68 | 68 | */ |
| 69 | 69 | public function setEditorConfig($config) { |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @param string $name The internal field name, passed to forms. |
| 79 | 79 | * @param string $title The human-readable field label. |
| 80 | - * @param mixed $value The value of the field. |
|
| 80 | + * @param integer $value The value of the field. |
|
| 81 | 81 | * @param string $config HTMLEditorConfig identifier to be used. Default to the active one. |
| 82 | 82 | */ |
| 83 | 83 | public function __construct($name, $title = null, $value = '', $config = null) { |
@@ -118,6 +118,9 @@ discard block |
||
| 118 | 118 | $record->{$this->name} = $htmlValue->getContent(); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | + /** |
|
| 122 | + * @param string|null $value |
|
| 123 | + */ |
|
| 121 | 124 | public function setValue($value) { |
| 122 | 125 | // Regenerate links prior to preview, so that the editor can see them. |
| 123 | 126 | $value = Image::regenerate_html_links($value); |
@@ -185,6 +188,10 @@ discard block |
||
| 185 | 188 | |
| 186 | 189 | protected $controller, $name; |
| 187 | 190 | |
| 191 | + /** |
|
| 192 | + * @param Controller|null $controller |
|
| 193 | + * @param string $name |
|
| 194 | + */ |
|
| 188 | 195 | public function __construct($controller, $name) { |
| 189 | 196 | parent::__construct(); |
| 190 | 197 | |
@@ -203,7 +210,7 @@ discard block |
||
| 203 | 210 | /** |
| 204 | 211 | * Searches the SiteTree for display in the dropdown |
| 205 | 212 | * |
| 206 | - * @return callback |
|
| 213 | + * @return SilverStripe\ORM\DataList |
|
| 207 | 214 | */ |
| 208 | 215 | public function siteTreeSearchCallback($sourceObject, $labelField, $search) { |
| 209 | 216 | return DataObject::get($sourceObject)->filterAny(array( |
@@ -583,7 +590,7 @@ discard block |
||
| 583 | 590 | /** |
| 584 | 591 | * Find all anchors available on the given page. |
| 585 | 592 | * |
| 586 | - * @return array |
|
| 593 | + * @return string |
|
| 587 | 594 | * @throws SS_HTTPResponse_Exception |
| 588 | 595 | */ |
| 589 | 596 | public function getanchors() { |
@@ -646,7 +653,7 @@ discard block |
||
| 646 | 653 | * Gets files filtered by a given parent with the allowed extensions |
| 647 | 654 | * |
| 648 | 655 | * @param int $parentID |
| 649 | - * @return DataList |
|
| 656 | + * @return SilverStripe\ORM\DataList |
|
| 650 | 657 | */ |
| 651 | 658 | protected function getFiles($parentID = null) { |
| 652 | 659 | $exts = $this->getAllowedExtensions(); |
@@ -1159,7 +1166,7 @@ discard block |
||
| 1159 | 1166 | } |
| 1160 | 1167 | |
| 1161 | 1168 | /** |
| 1162 | - * @return AdapterInterface |
|
| 1169 | + * @return Embed |
|
| 1163 | 1170 | */ |
| 1164 | 1171 | public function getEmbed() { |
| 1165 | 1172 | return $this->embed; |
@@ -115,6 +115,9 @@ |
||
| 115 | 115 | $this->query("ALTER TABLE \"$tableName\" $alterations"); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | + /** |
|
| 119 | + * @param string $tableName |
|
| 120 | + */ |
|
| 118 | 121 | public function isView($tableName) { |
| 119 | 122 | $info = $this->query("SHOW /*!50002 FULL*/ TABLES LIKE '$tableName'")->record(); |
| 120 | 123 | return $info && strtoupper($info['Table_type']) == 'VIEW'; |