@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Gets the url to return to after build |
109 | 109 | * |
110 | - * @return string|null |
|
110 | + * @return string |
|
111 | 111 | */ |
112 | 112 | protected function getReturnURL() { |
113 | 113 | $url = $this->request->getVar('returnURL'); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | /** |
153 | 153 | * Returns the timestamp of the time that the database was last built |
154 | 154 | * |
155 | - * @return string Returns the timestamp of the time that the database was |
|
155 | + * @return integer|null Returns the timestamp of the time that the database was |
|
156 | 156 | * last built |
157 | 157 | */ |
158 | 158 | public static function lastBuilt() { |
@@ -1,9 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -use SilverStripe\Model\FieldType\DBPolymorphicForeignKey; |
|
4 | 3 | use SilverStripe\Model\FieldType\DBField; |
5 | 4 | use SilverStripe\Model\FieldType\DBDatetime; |
6 | -use SilverStripe\Model\FieldType\DBPrimaryKey; |
|
7 | 5 | use SilverStripe\Model\FieldType\DBComposite; |
8 | 6 | |
9 | 7 | /** |
@@ -588,8 +588,8 @@ discard block |
||
588 | 588 | |
589 | 589 | /** |
590 | 590 | * Helper function to duplicate relations from one object to another |
591 | - * @param $sourceObject the source object to duplicate from |
|
592 | - * @param $destinationObject the destination object to populate with the duplicated relations |
|
591 | + * @param DataObject $sourceObject the source object to duplicate from |
|
592 | + * @param DataObject $destinationObject the destination object to populate with the duplicated relations |
|
593 | 593 | * @param $name the name of the relation to duplicate (e.g. members) |
594 | 594 | */ |
595 | 595 | private function duplicateRelations($sourceObject, $destinationObject, $name) { |
@@ -987,6 +987,7 @@ discard block |
||
987 | 987 | * @param $includeRelations Boolean Merge any existing relations (optional) |
988 | 988 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
989 | 989 | * Only applicable with $priority='right'. (optional) |
990 | + * @param DataObject|null $rightObj |
|
990 | 991 | * @return Boolean |
991 | 992 | */ |
992 | 993 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2272,6 +2273,7 @@ discard block |
||
2272 | 2273 | * |
2273 | 2274 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2274 | 2275 | * |
2276 | + * @param string $class |
|
2275 | 2277 | * @return array or false |
2276 | 2278 | */ |
2277 | 2279 | public function database_extensions($class){ |
@@ -3081,7 +3083,7 @@ discard block |
||
3081 | 3083 | * Traverses to a field referenced by relationships between data objects, returning the value |
3082 | 3084 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3083 | 3085 | * |
3084 | - * @param $fieldName string |
|
3086 | + * @param string $fieldName string |
|
3085 | 3087 | * @return string | null - will return null on a missing value |
3086 | 3088 | */ |
3087 | 3089 | public function relField($fieldName) { |
@@ -3360,6 +3362,7 @@ discard block |
||
3360 | 3362 | /** |
3361 | 3363 | * @see $sourceQueryParams |
3362 | 3364 | * @param array |
3365 | + * @param string $key |
|
3363 | 3366 | */ |
3364 | 3367 | public function setSourceQueryParam($key, $value) { |
3365 | 3368 | $this->sourceQueryParams[$key] = $value; |
@@ -3367,6 +3370,7 @@ discard block |
||
3367 | 3370 | |
3368 | 3371 | /** |
3369 | 3372 | * @see $sourceQueryParams |
3373 | + * @param string $key |
|
3370 | 3374 | * @return Mixed |
3371 | 3375 | */ |
3372 | 3376 | public function getSourceQueryParam($key) { |
@@ -125,7 +125,6 @@ |
||
125 | 125 | * Copies the query parameters contained in this object to another |
126 | 126 | * SQLExpression |
127 | 127 | * |
128 | - * @param SQLExpression $expression The object to copy properties to |
|
129 | 128 | */ |
130 | 129 | protected function copyTo(SQLExpression $object) { |
131 | 130 | $target = array_keys(get_object_vars($object)); |
@@ -217,9 +217,8 @@ discard block |
||
217 | 217 | * Given the database configuration, this method will create the correct |
218 | 218 | * subclass of {@link SS_Database}. |
219 | 219 | * |
220 | - * @param array $database A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
220 | + * @param array $databaseConfig A map of options. The 'type' is the name of the subclass of SS_Database to use. For the |
|
221 | 221 | * rest of the options, see the specific class. |
222 | - * @param string $name identifier for the connection |
|
223 | 222 | * |
224 | 223 | * @return SS_Database |
225 | 224 | */ |
@@ -413,7 +412,7 @@ discard block |
||
413 | 412 | |
414 | 413 | /** |
415 | 414 | * Create a new table. |
416 | - * @param string $tableName The name of the table |
|
415 | + * @param string $table The name of the table |
|
417 | 416 | * @param array$fields A map of field names to field types |
418 | 417 | * @param array $indexes A map of indexes |
419 | 418 | * @param array $options An map of additional options. The available keys are as follows: |
@@ -500,6 +499,8 @@ discard block |
||
500 | 499 | |
501 | 500 | /** |
502 | 501 | * @deprecated since version 4.0 Use DB::require_field instead |
502 | + * @param string $table |
|
503 | + * @param string $field |
|
503 | 504 | */ |
504 | 505 | public static function requireField($table, $field, $spec) { |
505 | 506 | Deprecation::notice('4.0', 'Use DB::require_field instead'); |
@@ -563,7 +564,7 @@ discard block |
||
563 | 564 | /** |
564 | 565 | * Checks a table's integrity and repairs it if necessary. |
565 | 566 | * |
566 | - * @param string $tableName The name of the table. |
|
567 | + * @param string $table The name of the table. |
|
567 | 568 | * @return boolean Return true if the table has integrity after the method is complete. |
568 | 569 | */ |
569 | 570 | public static function check_and_repair_table($table) { |
@@ -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) { |
@@ -641,7 +642,7 @@ discard block |
||
641 | 642 | * mappings to the query object state. This has to be called |
642 | 643 | * in any overloaded {@link SearchFilter->apply()} methods manually. |
643 | 644 | * |
644 | - * @param String|array $relation The array/dot-syntax relation to follow |
|
645 | + * @param string $relation The array/dot-syntax relation to follow |
|
645 | 646 | * @param bool $linearOnly Set to true to restrict to linear relations only. Set this |
646 | 647 | * if this relation will be used for sorting, and should not include duplicate rows. |
647 | 648 | * @return The model class of the related item |
@@ -917,6 +918,7 @@ discard block |
||
917 | 918 | |
918 | 919 | /** |
919 | 920 | * Set an arbitrary query parameter, that can be used by decorators to add additional meta-data to the query. |
921 | + * @param string $key |
|
920 | 922 | */ |
921 | 923 | public function getQueryParam($key) { |
922 | 924 | if(isset($this->queryParams[$key])) return $this->queryParams[$key]; |
@@ -949,6 +951,9 @@ discard block |
||
949 | 951 | */ |
950 | 952 | protected $whereQuery; |
951 | 953 | |
954 | + /** |
|
955 | + * @param string $connective |
|
956 | + */ |
|
952 | 957 | public function __construct(DataQuery $base, $connective) { |
953 | 958 | $this->dataClass = $base->dataClass; |
954 | 959 | $this->query = $base->query; |
@@ -958,6 +963,9 @@ discard block |
||
958 | 963 | $base->where($this); |
959 | 964 | } |
960 | 965 | |
966 | + /** |
|
967 | + * @param string $filter |
|
968 | + */ |
|
961 | 969 | public function where($filter) { |
962 | 970 | if($filter) { |
963 | 971 | $this->whereQuery->addWhere($filter); |
@@ -40,7 +40,6 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * Injector injection point for database controller |
42 | 42 | * |
43 | - * @param SS_Database $connector |
|
44 | 43 | */ |
45 | 44 | public function setDatabase(SS_Database $database) { |
46 | 45 | $this->database = $database; |
@@ -478,7 +477,7 @@ discard block |
||
478 | 477 | /** |
479 | 478 | * Given an index spec determines the index type |
480 | 479 | * |
481 | - * @param array|string $spec |
|
480 | + * @param string $spec |
|
482 | 481 | * @return string |
483 | 482 | */ |
484 | 483 | protected function determineIndexType($spec) { |
@@ -546,7 +545,7 @@ discard block |
||
546 | 545 | /** |
547 | 546 | * Returns true if the given table is exists in the current database |
548 | 547 | * |
549 | - * @param string $table Name of table to check |
|
548 | + * @param string $tableName Name of table to check |
|
550 | 549 | * @return boolean Flag indicating existence of table |
551 | 550 | */ |
552 | 551 | abstract public function hasTable($tableName); |
@@ -8,9 +8,6 @@ |
||
8 | 8 | use InvalidArgumentException; |
9 | 9 | use LogicException; |
10 | 10 | use ViewableData; |
11 | - |
|
12 | - |
|
13 | - |
|
14 | 11 | use SilverStripe\Model\Filterable; |
15 | 12 | use SilverStripe\Model\Sortable; |
16 | 13 | use SilverStripe\Model\Limitable; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | * Returns a new DataList instance with the specified query parameter assigned |
177 | 177 | * |
178 | 178 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
179 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
179 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
180 | 180 | * @return static |
181 | 181 | */ |
182 | 182 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | * Check if the given field specification could be interpreted as an unquoted relation name |
540 | 540 | * |
541 | 541 | * @param string $field |
542 | - * @return bool |
|
542 | + * @return integer |
|
543 | 543 | */ |
544 | 544 | protected function isValidRelationName($field) { |
545 | 545 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
655 | 655 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
656 | 656 | * ORM have a value of 10. |
657 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
657 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
658 | 658 | * @return DataList |
659 | 659 | */ |
660 | 660 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
673 | 673 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
674 | 674 | * ORM have a value of 10. |
675 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
675 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
676 | 676 | * @return DataList |
677 | 677 | */ |
678 | 678 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | /** |
889 | 889 | * Restrict the columns to fetch into this DataList |
890 | 890 | * |
891 | - * @param array $queriedColumns |
|
891 | + * @param string[] $queriedColumns |
|
892 | 892 | * @return DataList |
893 | 893 | */ |
894 | 894 | public function setQueriedColumns($queriedColumns) { |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | /** |
1164 | 1164 | * Returns item stored in list with index $key |
1165 | 1165 | * |
1166 | - * @param mixed $key |
|
1166 | + * @param integer $key |
|
1167 | 1167 | * @return DataObject |
1168 | 1168 | */ |
1169 | 1169 | public function offsetGet($key) { |
@@ -9,9 +9,6 @@ |
||
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; |
@@ -152,7 +152,7 @@ |
||
152 | 152 | * Make an xpath query against this HTML |
153 | 153 | * |
154 | 154 | * @param $query string - The xpath query string |
155 | - * @return DOMNodeList |
|
155 | + * @return \DOMNodeList |
|
156 | 156 | */ |
157 | 157 | public function query($query) { |
158 | 158 | $xp = new DOMXPath($this->getDocument()); |