@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | /** |
| 380 | 380 | * Return the IDs of all the marked nodes. |
| 381 | 381 | * |
| 382 | - * @return array |
|
| 382 | + * @return integer[] |
|
| 383 | 383 | */ |
| 384 | 384 | public function markedNodeIDs() { |
| 385 | 385 | return array_keys($this->markedNodes); |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
| 757 | 757 | * then search the parents. |
| 758 | 758 | * @param string $className Class name of the node to find. |
| 759 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
| 759 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
| 760 | 760 | * @param DataObject $afterNode Used for recursive calls to this function |
| 761 | 761 | * @return DataObject |
| 762 | 762 | */ |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | * |
| 192 | 192 | * TODO: Pass $response object to ->outputToBrowser() to loosen dependence on global state for easier testing/prototyping so dev can inject custom SS_HTTPResponse instance. |
| 193 | 193 | * |
| 194 | - * @return HTMLText |
|
| 194 | + * @return DBField |
|
| 195 | 195 | */ |
| 196 | 196 | public function outputToBrowser() { |
| 197 | 197 | $prevState = Config::inst()->get('SSViewer', 'source_file_comments'); |
@@ -222,6 +222,7 @@ discard block |
||
| 222 | 222 | * via the standard template inclusion process. |
| 223 | 223 | * |
| 224 | 224 | * @param string |
| 225 | + * @param string $template |
|
| 225 | 226 | */ |
| 226 | 227 | public function setTemplate($template) { |
| 227 | 228 | $this->template = $template; |
@@ -318,6 +319,7 @@ discard block |
||
| 318 | 319 | /** |
| 319 | 320 | * Return the named field as an obj() call from $this->failover. |
| 320 | 321 | * Default to the given class if there's no casting information. |
| 322 | + * @param string $fieldName |
|
| 321 | 323 | */ |
| 322 | 324 | public function rssField($fieldName, $defaultClass = 'Varchar') { |
| 323 | 325 | if($fieldName) { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | /** |
| 101 | 101 | * Get value of display_errors ini value |
| 102 | 102 | * |
| 103 | - * @return mixed |
|
| 103 | + * @return string |
|
| 104 | 104 | */ |
| 105 | 105 | protected function getDisplayErrors() { |
| 106 | 106 | return ini_get('display_errors'); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * Add this callback to the chain of callbacks to call along with the state |
| 111 | 111 | * that $error must be in this point in the chain for the callback to be called |
| 112 | 112 | * |
| 113 | - * @param $callback - The callback to call |
|
| 113 | + * @param callable $callback - The callback to call |
|
| 114 | 114 | * @param $onErrorState - false if only call if no errors yet, true if only call if already errors, null for either |
| 115 | 115 | * @return $this |
| 116 | 116 | */ |
@@ -558,8 +558,8 @@ discard block |
||
| 558 | 558 | |
| 559 | 559 | /** |
| 560 | 560 | * Helper function to duplicate relations from one object to another |
| 561 | - * @param $sourceObject the source object to duplicate from |
|
| 562 | - * @param $destinationObject the destination object to populate with the duplicated relations |
|
| 561 | + * @param DataObject $sourceObject the source object to duplicate from |
|
| 562 | + * @param DataObject $destinationObject the destination object to populate with the duplicated relations |
|
| 563 | 563 | * @param $name the name of the relation to duplicate (e.g. members) |
| 564 | 564 | */ |
| 565 | 565 | private function duplicateRelations($sourceObject, $destinationObject, $name) { |
@@ -957,6 +957,7 @@ discard block |
||
| 957 | 957 | * @param $includeRelations Boolean Merge any existing relations (optional) |
| 958 | 958 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
| 959 | 959 | * Only applicable with $priority='right'. (optional) |
| 960 | + * @param DataObject|null $rightObj |
|
| 960 | 961 | * @return Boolean |
| 961 | 962 | */ |
| 962 | 963 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2243,6 +2244,7 @@ discard block |
||
| 2243 | 2244 | * |
| 2244 | 2245 | * This is experimental, and is currently only a Postgres-specific enhancement. |
| 2245 | 2246 | * |
| 2247 | + * @param string $class |
|
| 2246 | 2248 | * @return array or false |
| 2247 | 2249 | */ |
| 2248 | 2250 | public function database_extensions($class){ |
@@ -2721,6 +2723,7 @@ discard block |
||
| 2721 | 2723 | |
| 2722 | 2724 | /** |
| 2723 | 2725 | * {@inheritdoc} |
| 2726 | + * @param string $field |
|
| 2724 | 2727 | */ |
| 2725 | 2728 | public function castingHelper($field) { |
| 2726 | 2729 | if ($fieldSpec = $this->db($field)) { |
@@ -3067,7 +3070,7 @@ discard block |
||
| 3067 | 3070 | * Traverses to a field referenced by relationships between data objects, returning the value |
| 3068 | 3071 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
| 3069 | 3072 | * |
| 3070 | - * @param $fieldName string |
|
| 3073 | + * @param string $fieldName string |
|
| 3071 | 3074 | * @return string | null - will return null on a missing value |
| 3072 | 3075 | */ |
| 3073 | 3076 | public function relField($fieldName) { |
@@ -3136,7 +3139,7 @@ discard block |
||
| 3136 | 3139 | * @param string $callerClass The class of objects to be returned |
| 3137 | 3140 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
| 3138 | 3141 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
| 3139 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
| 3142 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
| 3140 | 3143 | * BY clause. If omitted, self::$default_sort will be used. |
| 3141 | 3144 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
| 3142 | 3145 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -3346,6 +3349,8 @@ discard block |
||
| 3346 | 3349 | /** |
| 3347 | 3350 | * @see $sourceQueryParams |
| 3348 | 3351 | * @param array |
| 3352 | + * @param string $key |
|
| 3353 | + * @param string $value |
|
| 3349 | 3354 | */ |
| 3350 | 3355 | public function setSourceQueryParam($key, $value) { |
| 3351 | 3356 | $this->sourceQueryParams[$key] = $value; |
@@ -3353,6 +3358,7 @@ discard block |
||
| 3353 | 3358 | |
| 3354 | 3359 | /** |
| 3355 | 3360 | * @see $sourceQueryParams |
| 3361 | + * @param string $key |
|
| 3356 | 3362 | * @return Mixed |
| 3357 | 3363 | */ |
| 3358 | 3364 | public function getSourceQueryParam($key) { |
@@ -44,6 +44,7 @@ discard block |
||
| 44 | 44 | * Create a new DataQuery. |
| 45 | 45 | * |
| 46 | 46 | * @param String The name of the DataObject class that you wish to query |
| 47 | + * @param string $dataClass |
|
| 47 | 48 | */ |
| 48 | 49 | public function __construct($dataClass) { |
| 49 | 50 | $this->dataClass = $dataClass; |
@@ -166,7 +167,7 @@ discard block |
||
| 166 | 167 | /** |
| 167 | 168 | * Ensure that the query is ready to execute. |
| 168 | 169 | * |
| 169 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 170 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 170 | 171 | * @return SQLSelect The finalised sql query |
| 171 | 172 | */ |
| 172 | 173 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -925,6 +926,7 @@ discard block |
||
| 925 | 926 | |
| 926 | 927 | /** |
| 927 | 928 | * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query. |
| 929 | + * @param string $key |
|
| 928 | 930 | */ |
| 929 | 931 | public function getQueryParam($key) { |
| 930 | 932 | if(isset($this->queryParams[$key])) return $this->queryParams[$key]; |
@@ -957,6 +959,9 @@ discard block |
||
| 957 | 959 | */ |
| 958 | 960 | protected $whereQuery; |
| 959 | 961 | |
| 962 | + /** |
|
| 963 | + * @param string $connective |
|
| 964 | + */ |
|
| 960 | 965 | public function __construct(DataQuery $base, $connective) { |
| 961 | 966 | $this->dataClass = $base->dataClass; |
| 962 | 967 | $this->query = $base->query; |
@@ -966,6 +971,9 @@ discard block |
||
| 966 | 971 | $base->where($this); |
| 967 | 972 | } |
| 968 | 973 | |
| 974 | + /** |
|
| 975 | + * @param string $filter |
|
| 976 | + */ |
|
| 969 | 977 | public function where($filter) { |
| 970 | 978 | if($filter) { |
| 971 | 979 | $this->whereQuery->addWhere($filter); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * Modify method visibility to public for testing |
| 26 | 26 | * |
| 27 | - * @param mixed $errors |
|
| 27 | + * @param string $errors |
|
| 28 | 28 | */ |
| 29 | 29 | public function setDisplayErrors($errors) |
| 30 | 30 | { |
@@ -33,6 +33,10 @@ discard block |
||
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | // Change function visibility to be testable directly |
| 36 | + |
|
| 37 | + /** |
|
| 38 | + * @param string $memstring |
|
| 39 | + */ |
|
| 36 | 40 | public function translateMemstring($memstring) { |
| 37 | 41 | return parent::translateMemstring($memstring); |
| 38 | 42 | } |