@@ -745,7 +745,7 @@ |
||
| 745 | 745 | /** |
| 746 | 746 | * Returns item stored in list with index $key |
| 747 | 747 | * |
| 748 | - * @param mixed $offset |
|
| 748 | + * @param integer $offset |
|
| 749 | 749 | * @return DataObject |
| 750 | 750 | */ |
| 751 | 751 | public function offsetGet($offset) |
@@ -768,7 +768,7 @@ |
||
| 768 | 768 | * @param boolean $create Flag indicating whether the database should be created |
| 769 | 769 | * if it doesn't exist. If $create is false and the database doesn't exist |
| 770 | 770 | * then an error will be raised |
| 771 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 771 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
| 772 | 772 | * should be raised |
| 773 | 773 | * @return boolean Flag indicating success |
| 774 | 774 | */ |
@@ -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( |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | /** |
| 530 | 530 | * Given an index spec determines the index type |
| 531 | 531 | * |
| 532 | - * @param array|string $spec |
|
| 532 | + * @param string $spec |
|
| 533 | 533 | * @return string |
| 534 | 534 | */ |
| 535 | 535 | protected function determineIndexType($spec) |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | * |
| 631 | 631 | * @param string $table The table name. |
| 632 | 632 | * @param string $field The field name. |
| 633 | - * @param array|string $spec The field specification. If passed in array syntax, the specific database |
|
| 633 | + * @param string $spec The field specification. If passed in array syntax, the specific database |
|
| 634 | 634 | * driver takes care of the ALTER TABLE syntax. If passed as a string, its assumed to |
| 635 | 635 | * be prepared as a direct SQL framgment ready for insertion into ALTER TABLE. In this case you'll |
| 636 | 636 | * need to take care of database abstraction in your DBField subclass. |
@@ -129,6 +129,9 @@ |
||
| 129 | 129 | $this->query("ALTER TABLE \"$tableName\" $alterations"); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | + /** |
|
| 133 | + * @param string $tableName |
|
| 134 | + */ |
|
| 132 | 135 | public function isView($tableName) |
| 133 | 136 | { |
| 134 | 137 | $info = $this->query("SHOW /*!50002 FULL*/ TABLES LIKE '$tableName'")->record(); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | /** |
| 144 | 144 | * Gets the url to return to after build |
| 145 | 145 | * |
| 146 | - * @return string|null |
|
| 146 | + * @return string |
|
| 147 | 147 | */ |
| 148 | 148 | protected function getReturnURL() |
| 149 | 149 | { |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | /** |
| 176 | 176 | * Returns the timestamp of the time that the database was last built |
| 177 | 177 | * |
| 178 | - * @return string Returns the timestamp of the time that the database was |
|
| 178 | + * @return integer|null Returns the timestamp of the time that the database was |
|
| 179 | 179 | * last built |
| 180 | 180 | */ |
| 181 | 181 | public static function lastBuilt() |
@@ -88,10 +88,16 @@ |
||
| 88 | 88 | { |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | + /** |
|
| 92 | + * @param \SilverStripe\Security\Member|null $member |
|
| 93 | + */ |
|
| 91 | 94 | public function canEdit($member) |
| 92 | 95 | { |
| 93 | 96 | } |
| 94 | 97 | |
| 98 | + /** |
|
| 99 | + * @param \SilverStripe\Security\Member|null $member |
|
| 100 | + */ |
|
| 95 | 101 | public function canDelete($member) |
| 96 | 102 | { |
| 97 | 103 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * Returns a new DataList instance with the specified query parameter assigned |
| 180 | 180 | * |
| 181 | 181 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
| 182 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
| 182 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
| 183 | 183 | * @return static |
| 184 | 184 | */ |
| 185 | 185 | public function setDataQueryParam($keyOrArray, $val = null) |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | * Check if the given field specification could be interpreted as an unquoted relation name |
| 555 | 555 | * |
| 556 | 556 | * @param string $field |
| 557 | - * @return bool |
|
| 557 | + * @return integer |
|
| 558 | 558 | */ |
| 559 | 559 | protected function isValidRelationName($field) |
| 560 | 560 | { |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 668 | 668 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 669 | 669 | * ORM have a value of 10. |
| 670 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 670 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 671 | 671 | * @return static |
| 672 | 672 | */ |
| 673 | 673 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
| 687 | 687 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
| 688 | 688 | * ORM have a value of 10. |
| 689 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
| 689 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
| 690 | 690 | * @return static |
| 691 | 691 | */ |
| 692 | 692 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) |
@@ -834,7 +834,7 @@ discard block |
||
| 834 | 834 | * Return the maximum value of the given field in this DataList |
| 835 | 835 | * |
| 836 | 836 | * @param string $fieldName |
| 837 | - * @return mixed |
|
| 837 | + * @return string |
|
| 838 | 838 | */ |
| 839 | 839 | public function max($fieldName) |
| 840 | 840 | { |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | * Return the minimum value of the given field in this DataList |
| 846 | 846 | * |
| 847 | 847 | * @param string $fieldName |
| 848 | - * @return mixed |
|
| 848 | + * @return string |
|
| 849 | 849 | */ |
| 850 | 850 | public function min($fieldName) |
| 851 | 851 | { |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | * Return the average value of the given field in this DataList |
| 857 | 857 | * |
| 858 | 858 | * @param string $fieldName |
| 859 | - * @return mixed |
|
| 859 | + * @return string |
|
| 860 | 860 | */ |
| 861 | 861 | public function avg($fieldName) |
| 862 | 862 | { |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | * Return the sum of the values of the given field in this DataList |
| 868 | 868 | * |
| 869 | 869 | * @param string $fieldName |
| 870 | - * @return mixed |
|
| 870 | + * @return string |
|
| 871 | 871 | */ |
| 872 | 872 | public function sum($fieldName) |
| 873 | 873 | { |
@@ -926,7 +926,7 @@ discard block |
||
| 926 | 926 | /** |
| 927 | 927 | * Restrict the columns to fetch into this DataList |
| 928 | 928 | * |
| 929 | - * @param array $queriedColumns |
|
| 929 | + * @param string[] $queriedColumns |
|
| 930 | 930 | * @return static |
| 931 | 931 | */ |
| 932 | 932 | public function setQueriedColumns($queriedColumns) |
@@ -1172,7 +1172,7 @@ discard block |
||
| 1172 | 1172 | /** |
| 1173 | 1173 | * Returns item stored in list with index $key |
| 1174 | 1174 | * |
| 1175 | - * @param mixed $key |
|
| 1175 | + * @param integer $key |
|
| 1176 | 1176 | * @return DataObject |
| 1177 | 1177 | */ |
| 1178 | 1178 | public function offsetGet($key) |
@@ -2470,6 +2470,7 @@ discard block |
||
| 2470 | 2470 | |
| 2471 | 2471 | /** |
| 2472 | 2472 | * {@inheritdoc} |
| 2473 | + * @param string $field |
|
| 2473 | 2474 | */ |
| 2474 | 2475 | public function castingHelper($field) |
| 2475 | 2476 | { |
@@ -2638,7 +2639,7 @@ discard block |
||
| 2638 | 2639 | |
| 2639 | 2640 | /** |
| 2640 | 2641 | * @param Member $member |
| 2641 | - * @return boolean |
|
| 2642 | + * @return boolean|string |
|
| 2642 | 2643 | */ |
| 2643 | 2644 | public function canView($member = null) |
| 2644 | 2645 | { |
@@ -2651,7 +2652,7 @@ discard block |
||
| 2651 | 2652 | |
| 2652 | 2653 | /** |
| 2653 | 2654 | * @param Member $member |
| 2654 | - * @return boolean |
|
| 2655 | + * @return boolean|string |
|
| 2655 | 2656 | */ |
| 2656 | 2657 | public function canEdit($member = null) |
| 2657 | 2658 | { |
@@ -2664,7 +2665,7 @@ discard block |
||
| 2664 | 2665 | |
| 2665 | 2666 | /** |
| 2666 | 2667 | * @param Member $member |
| 2667 | - * @return boolean |
|
| 2668 | + * @return boolean|string |
|
| 2668 | 2669 | */ |
| 2669 | 2670 | public function canDelete($member = null) |
| 2670 | 2671 | { |
@@ -2679,7 +2680,7 @@ discard block |
||
| 2679 | 2680 | * @param Member $member |
| 2680 | 2681 | * @param array $context Additional context-specific data which might |
| 2681 | 2682 | * affect whether (or where) this object could be created. |
| 2682 | - * @return boolean |
|
| 2683 | + * @return boolean|string |
|
| 2683 | 2684 | */ |
| 2684 | 2685 | public function canCreate($member = null, $context = array()) |
| 2685 | 2686 | { |
@@ -2789,7 +2790,7 @@ discard block |
||
| 2789 | 2790 | * Traverses to a field referenced by relationships between data objects, returning the value |
| 2790 | 2791 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
| 2791 | 2792 | * |
| 2792 | - * @param $fieldName string |
|
| 2793 | + * @param string $fieldName string |
|
| 2793 | 2794 | * @return string | null - will return null on a missing value |
| 2794 | 2795 | */ |
| 2795 | 2796 | public function relField($fieldName) |
@@ -2867,7 +2868,7 @@ discard block |
||
| 2867 | 2868 | * @param string $callerClass The class of objects to be returned |
| 2868 | 2869 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
| 2869 | 2870 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
| 2870 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
| 2871 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
| 2871 | 2872 | * BY clause. If omitted, self::$default_sort will be used. |
| 2872 | 2873 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
| 2873 | 2874 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | /** |
| 111 | 111 | * Remove a filter from the query |
| 112 | 112 | * |
| 113 | - * @param string|array $fieldExpression The predicate of the condition to remove |
|
| 113 | + * @param string|null $fieldExpression The predicate of the condition to remove |
|
| 114 | 114 | * (ignoring parameters). The expression will be considered a match if it's |
| 115 | 115 | * contained within any other predicate. |
| 116 | 116 | * @return DataQuery Self reference |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | /** |
| 192 | 192 | * Ensure that the query is ready to execute. |
| 193 | 193 | * |
| 194 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
| 194 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
| 195 | 195 | * @return SQLSelect The finalised sql query |
| 196 | 196 | */ |
| 197 | 197 | public function getFinalisedQuery($queriedColumns = null) |