@@ -38,7 +38,6 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Injector injection point for database controller |
40 | 40 | * |
41 | - * @param SS_Database $connector |
|
42 | 41 | */ |
43 | 42 | public function setDatabase(SS_Database $database) { |
44 | 43 | $this->database = $database; |
@@ -104,6 +103,7 @@ discard block |
||
104 | 103 | * |
105 | 104 | * @var callable $callback |
106 | 105 | * @throws Exception |
106 | + * @param Closure $callback |
|
107 | 107 | */ |
108 | 108 | public function schemaUpdate($callback) { |
109 | 109 | // Begin schema update |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | /** |
477 | 477 | * Given an index spec determines the index type |
478 | 478 | * |
479 | - * @param array|string $spec |
|
479 | + * @param string $spec |
|
480 | 480 | * @return string |
481 | 481 | */ |
482 | 482 | protected function determineIndexType($spec) { |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | /** |
545 | 545 | * Returns true if the given table is exists in the current database |
546 | 546 | * |
547 | - * @param string $table Name of table to check |
|
547 | + * @param string $tableName Name of table to check |
|
548 | 548 | * @return boolean Flag indicating existence of table |
549 | 549 | */ |
550 | 550 | abstract public function hasTable($tableName); |
@@ -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'; |
@@ -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() { |
@@ -50,6 +50,7 @@ |
||
50 | 50 | * |
51 | 51 | * @param DataObject (Optional) |
52 | 52 | * @param DataObject |
53 | + * @param DataObject|null $fromRecord |
|
53 | 54 | */ |
54 | 55 | public function __construct($fromRecord, DataObject $toRecord) { |
55 | 56 | if(!$toRecord) user_error("DataDifferencer constructed without a toRecord", E_USER_WARNING); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | * Returns a new DataList instance with the specified query parameter assigned |
158 | 158 | * |
159 | 159 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
160 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
160 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
161 | 161 | * @return DataList |
162 | 162 | */ |
163 | 163 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | * Check if the given field specification could be interpreted as an unquoted relation name |
521 | 521 | * |
522 | 522 | * @param string $field |
523 | - * @return bool |
|
523 | + * @return integer |
|
524 | 524 | */ |
525 | 525 | protected function isValidRelationName($field) { |
526 | 526 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
636 | 636 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
637 | 637 | * ORM have a value of 10. |
638 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
638 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
639 | 639 | * @return DataList |
640 | 640 | */ |
641 | 641 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
654 | 654 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
655 | 655 | * ORM have a value of 10. |
656 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
656 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
657 | 657 | * @return DataList |
658 | 658 | */ |
659 | 659 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | * Return the maximum value of the given field in this DataList |
781 | 781 | * |
782 | 782 | * @param string $fieldName |
783 | - * @return mixed |
|
783 | + * @return string |
|
784 | 784 | */ |
785 | 785 | public function max($fieldName) { |
786 | 786 | return $this->dataQuery->max($fieldName); |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | * Return the minimum value of the given field in this DataList |
791 | 791 | * |
792 | 792 | * @param string $fieldName |
793 | - * @return mixed |
|
793 | + * @return string |
|
794 | 794 | */ |
795 | 795 | public function min($fieldName) { |
796 | 796 | return $this->dataQuery->min($fieldName); |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | * Return the average value of the given field in this DataList |
801 | 801 | * |
802 | 802 | * @param string $fieldName |
803 | - * @return mixed |
|
803 | + * @return string |
|
804 | 804 | */ |
805 | 805 | public function avg($fieldName) { |
806 | 806 | return $this->dataQuery->avg($fieldName); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | * Return the sum of the values of the given field in this DataList |
811 | 811 | * |
812 | 812 | * @param string $fieldName |
813 | - * @return mixed |
|
813 | + * @return string |
|
814 | 814 | */ |
815 | 815 | public function sum($fieldName) { |
816 | 816 | return $this->dataQuery->sum($fieldName); |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | /** |
863 | 863 | * Restrict the columns to fetch into this DataList |
864 | 864 | * |
865 | - * @param array $queriedColumns |
|
865 | + * @param string[] $queriedColumns |
|
866 | 866 | * @return DataList |
867 | 867 | */ |
868 | 868 | public function setQueriedColumns($queriedColumns) { |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | /** |
1136 | 1136 | * Returns item stored in list with index $key |
1137 | 1137 | * |
1138 | - * @param mixed $key |
|
1138 | + * @param integer $key |
|
1139 | 1139 | * @return DataObject |
1140 | 1140 | */ |
1141 | 1141 | public function offsetGet($key) { |
@@ -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 | /** |
@@ -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) { |
@@ -939,6 +939,7 @@ discard block |
||
939 | 939 | * @param $includeRelations Boolean Merge any existing relations (optional) |
940 | 940 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
941 | 941 | * Only applicable with $priority='right'. (optional) |
942 | + * @param DataObject|null $rightObj |
|
942 | 943 | * @return Boolean |
943 | 944 | */ |
944 | 945 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2224,6 +2225,7 @@ discard block |
||
2224 | 2225 | * |
2225 | 2226 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2226 | 2227 | * |
2228 | + * @param string $class |
|
2227 | 2229 | * @return array or false |
2228 | 2230 | */ |
2229 | 2231 | public function database_extensions($class){ |
@@ -3033,7 +3035,7 @@ discard block |
||
3033 | 3035 | * Traverses to a field referenced by relationships between data objects, returning the value |
3034 | 3036 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
3035 | 3037 | * |
3036 | - * @param $fieldName string |
|
3038 | + * @param string $fieldName string |
|
3037 | 3039 | * @return string | null - will return null on a missing value |
3038 | 3040 | */ |
3039 | 3041 | public function relField($fieldName) { |
@@ -3102,7 +3104,7 @@ discard block |
||
3102 | 3104 | * @param string $callerClass The class of objects to be returned |
3103 | 3105 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
3104 | 3106 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
3105 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
3107 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
3106 | 3108 | * BY clause. If omitted, self::$default_sort will be used. |
3107 | 3109 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
3108 | 3110 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -3312,6 +3314,8 @@ discard block |
||
3312 | 3314 | /** |
3313 | 3315 | * @see $sourceQueryParams |
3314 | 3316 | * @param array |
3317 | + * @param string $key |
|
3318 | + * @param string $value |
|
3315 | 3319 | */ |
3316 | 3320 | public function setSourceQueryParam($key, $value) { |
3317 | 3321 | $this->sourceQueryParams[$key] = $value; |
@@ -3319,6 +3323,7 @@ discard block |
||
3319 | 3323 | |
3320 | 3324 | /** |
3321 | 3325 | * @see $sourceQueryParams |
3326 | + * @param string $key |
|
3322 | 3327 | * @return Mixed |
3323 | 3328 | */ |
3324 | 3329 | public function getSourceQueryParam($key) { |
@@ -707,7 +707,7 @@ |
||
707 | 707 | * Get the next node in the tree of the type. If there is no instance of the className descended from this node, |
708 | 708 | * then search the parents. |
709 | 709 | * @param string $className Class name of the node to find. |
710 | - * @param string|int $root ID/ClassName of the node to limit the search to |
|
710 | + * @param integer $root ID/ClassName of the node to limit the search to |
|
711 | 711 | * @param DataObject afterNode Used for recursive calls to this function |
712 | 712 | * @return DataObject |
713 | 713 | */ |
@@ -74,9 +74,6 @@ |
||
74 | 74 | * Given a list of assignments in any user-acceptible format, normalise the |
75 | 75 | * value to a common array('SQL' => array(parameters)) format |
76 | 76 | * |
77 | - * @param array $predicates List of assignments. |
|
78 | - * The key of this array should be the field name, and the value the assigned |
|
79 | - * literal value, or an array with parameterised information. |
|
80 | 77 | * @return array List of normalised assignments |
81 | 78 | */ |
82 | 79 | protected function normaliseAssignments(array $assignments) { |
@@ -374,7 +374,6 @@ discard block |
||
374 | 374 | * @see SQLConditionalExpression::addWhere() for syntax examples |
375 | 375 | * |
376 | 376 | * @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries |
377 | - * @param mixed $where,... Unlimited additional predicates |
|
378 | 377 | * @return self Self reference |
379 | 378 | */ |
380 | 379 | public function setWhere($where) { |
@@ -460,7 +459,6 @@ discard block |
||
460 | 459 | * </code> |
461 | 460 | * |
462 | 461 | * @param mixed $where Predicate(s) to set, as escaped SQL statements or paramaterised queries |
463 | - * @param mixed $where,... Unlimited additional predicates |
|
464 | 462 | * @return self Self reference |
465 | 463 | */ |
466 | 464 | public function addWhere($where) { |
@@ -476,7 +474,6 @@ discard block |
||
476 | 474 | * @see SQLConditionalExpression::addWhere() |
477 | 475 | * |
478 | 476 | * @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries |
479 | - * @param mixed $filters,... Unlimited additional predicates |
|
480 | 477 | * @return self Self reference |
481 | 478 | */ |
482 | 479 | public function setWhereAny($filters) { |
@@ -490,7 +487,6 @@ discard block |
||
490 | 487 | * @see SQLConditionalExpression::addWhere() |
491 | 488 | * |
492 | 489 | * @param mixed $filters Predicate(s) to set, as escaped SQL statements or paramaterised queries |
493 | - * @param mixed $filters,... Unlimited additional predicates |
|
494 | 490 | * @return self Self reference |
495 | 491 | */ |
496 | 492 | public function addWhereAny($filters) { |