@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | * |
357 | 357 | * @param string $property |
358 | 358 | * the name of the property |
359 | - * @param object $object |
|
359 | + * @param string $object |
|
360 | 360 | * the object to be set |
361 | 361 | */ |
362 | 362 | public function addAutoProperty($property, $object) { |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | * The name of the service to update the definition for |
451 | 451 | * @param string $property |
452 | 452 | * The name of the property to update. |
453 | - * @param mixed $value |
|
453 | + * @param string $value |
|
454 | 454 | * The value to set |
455 | 455 | * @param boolean $append |
456 | 456 | * Whether to append (the default) when the property is an array |
@@ -755,6 +755,7 @@ discard block |
||
755 | 755 | * |
756 | 756 | * Will recursively call hasService for each depth of dotting |
757 | 757 | * |
758 | + * @param string $name |
|
758 | 759 | * @return string |
759 | 760 | * The name of the service (as it might be different from the one passed in) |
760 | 761 | */ |
@@ -918,7 +919,6 @@ discard block |
||
918 | 919 | * Additional parameters are passed through as |
919 | 920 | * |
920 | 921 | * @param string $name |
921 | - * @param mixed $arguments,... arguments to pass to the constructor |
|
922 | 922 | * @return mixed A new instance of the specified object |
923 | 923 | */ |
924 | 924 | public function create($name) { |
@@ -932,8 +932,6 @@ discard block |
||
932 | 932 | * |
933 | 933 | * @param string $name |
934 | 934 | * Name of the class to create an object of |
935 | - * @param array $args |
|
936 | - * Arguments to pass to the constructor |
|
937 | 935 | * @return mixed |
938 | 936 | */ |
939 | 937 | public function createWithArgs($name, $constructorArgs) { |
@@ -43,6 +43,7 @@ discard block |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * @todo Move this to SS_Database or DB |
46 | + * @param string $class |
|
46 | 47 | */ |
47 | 48 | public static function hasTable($class) { |
48 | 49 | // Cache the list of all table names to reduce on DB traffic |
@@ -80,7 +81,7 @@ discard block |
||
80 | 81 | * |
81 | 82 | * @todo Move this into {@see DataObjectSchema} |
82 | 83 | * |
83 | - * @param string|object $class |
|
84 | + * @param string $class |
|
84 | 85 | * @return array |
85 | 86 | */ |
86 | 87 | public static function dataClassesFor($class) { |
@@ -205,6 +206,7 @@ discard block |
||
205 | 206 | |
206 | 207 | /** |
207 | 208 | * Returns true if the given class implements the given interface |
209 | + * @param string $interfaceName |
|
208 | 210 | */ |
209 | 211 | public static function classImplements($className, $interfaceName) { |
210 | 212 | return in_array($className, self::implementorsOf($interfaceName)); |
@@ -255,6 +257,9 @@ discard block |
||
255 | 257 | |
256 | 258 | private static $method_from_cache = array(); |
257 | 259 | |
260 | + /** |
|
261 | + * @param string $method |
|
262 | + */ |
|
258 | 263 | public static function has_method_from($class, $method, $compclass) { |
259 | 264 | $lClass = strtolower($class); |
260 | 265 | $lMethod = strtolower($method); |
@@ -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 | */ |
@@ -260,6 +260,9 @@ discard block |
||
260 | 260 | return $this; |
261 | 261 | } |
262 | 262 | |
263 | + /** |
|
264 | + * @param string $type |
|
265 | + */ |
|
263 | 266 | protected function invokeCallbacks($type, $args = array()) { |
264 | 267 | foreach($this->callbacks[$type] as $callback) { |
265 | 268 | call_user_func_array($callback, $args); |
@@ -299,6 +302,9 @@ discard block |
||
299 | 302 | $obj->$name = $this->parseValue($value, $fixtures); |
300 | 303 | } |
301 | 304 | |
305 | + /** |
|
306 | + * @param string $fieldName |
|
307 | + */ |
|
302 | 308 | protected function overrideField($obj, $fieldName, $value, $fixtures = null) { |
303 | 309 | $class = get_class($obj); |
304 | 310 | $table = DataObject::getSchema()->tableForField($class, $fieldName); |
@@ -885,6 +885,7 @@ discard block |
||
885 | 885 | * @param $includeRelations Boolean Merge any existing relations (optional) |
886 | 886 | * @param $overwriteWithEmpty Boolean Overwrite existing left values with empty right values. |
887 | 887 | * Only applicable with $priority='right'. (optional) |
888 | + * @param DataObject|null $rightObj |
|
888 | 889 | * @return Boolean |
889 | 890 | */ |
890 | 891 | public function merge($rightObj, $priority = 'right', $includeRelations = true, $overwriteWithEmpty = false) { |
@@ -2167,7 +2168,7 @@ discard block |
||
2167 | 2168 | * |
2168 | 2169 | * This is experimental, and is currently only a Postgres-specific enhancement. |
2169 | 2170 | * |
2170 | - * @param $class |
|
2171 | + * @param string $class |
|
2171 | 2172 | * @return array or false |
2172 | 2173 | */ |
2173 | 2174 | public function database_extensions($class){ |
@@ -2647,6 +2648,7 @@ discard block |
||
2647 | 2648 | |
2648 | 2649 | /** |
2649 | 2650 | * {@inheritdoc} |
2651 | + * @param string $field |
|
2650 | 2652 | */ |
2651 | 2653 | public function castingHelper($field) { |
2652 | 2654 | if ($fieldSpec = $this->db($field)) { |
@@ -2988,7 +2990,7 @@ discard block |
||
2988 | 2990 | * Traverses to a field referenced by relationships between data objects, returning the value |
2989 | 2991 | * The path to the related field is specified with dot separated syntax (eg: Parent.Child.Child.FieldName) |
2990 | 2992 | * |
2991 | - * @param $fieldName string |
|
2993 | + * @param string $fieldName string |
|
2992 | 2994 | * @return string | null - will return null on a missing value |
2993 | 2995 | */ |
2994 | 2996 | public function relField($fieldName) { |
@@ -3058,7 +3060,7 @@ discard block |
||
3058 | 3060 | * @param string $callerClass The class of objects to be returned |
3059 | 3061 | * @param string|array $filter A filter to be inserted into the WHERE clause. |
3060 | 3062 | * Supports parameterised queries. See SQLSelect::addWhere() for syntax examples. |
3061 | - * @param string|array $sort A sort expression to be inserted into the ORDER |
|
3063 | + * @param string $sort A sort expression to be inserted into the ORDER |
|
3062 | 3064 | * BY clause. If omitted, self::$default_sort will be used. |
3063 | 3065 | * @param string $join Deprecated 3.0 Join clause. Use leftJoin($table, $joinClause) instead. |
3064 | 3066 | * @param string|array $limit A limit expression to be inserted into the LIMIT clause. |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | /** |
91 | 91 | * Remove a filter from the query |
92 | 92 | * |
93 | - * @param string|array $fieldExpression The predicate of the condition to remove |
|
93 | + * @param string|null $fieldExpression The predicate of the condition to remove |
|
94 | 94 | * (ignoring parameters). The expression will be considered a match if it's |
95 | 95 | * contained within any other predicate. |
96 | 96 | * @return DataQuery Self reference |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | /** |
170 | 170 | * Ensure that the query is ready to execute. |
171 | 171 | * |
172 | - * @param array|null $queriedColumns Any columns to filter the query by |
|
172 | + * @param string[] $queriedColumns Any columns to filter the query by |
|
173 | 173 | * @return SQLSelect The finalised sql query |
174 | 174 | */ |
175 | 175 | public function getFinalisedQuery($queriedColumns = null) { |
@@ -1033,6 +1033,9 @@ discard block |
||
1033 | 1033 | */ |
1034 | 1034 | protected $whereQuery; |
1035 | 1035 | |
1036 | + /** |
|
1037 | + * @param string $connective |
|
1038 | + */ |
|
1036 | 1039 | public function __construct(DataQuery $base, $connective) { |
1037 | 1040 | parent::__construct($base->dataClass); |
1038 | 1041 | $this->query = $base->query; |
@@ -1042,6 +1045,9 @@ discard block |
||
1042 | 1045 | $base->where($this); |
1043 | 1046 | } |
1044 | 1047 | |
1048 | + /** |
|
1049 | + * @param string $filter |
|
1050 | + */ |
|
1045 | 1051 | public function where($filter) { |
1046 | 1052 | if($filter) { |
1047 | 1053 | $this->whereQuery->addWhere($filter); |