@@ -240,6 +240,9 @@ discard block |
||
240 | 240 | return $this; |
241 | 241 | } |
242 | 242 | |
243 | + /** |
|
244 | + * @param SS_HTTPRequest $request |
|
245 | + */ |
|
243 | 246 | protected function findAction($request) { |
244 | 247 | $handlerClass = ($this->class) ? $this->class : get_class($this); |
245 | 248 | |
@@ -273,7 +276,7 @@ discard block |
||
273 | 276 | * |
274 | 277 | * Must not raise SS_HTTPResponse_Exceptions - instead it should return |
275 | 278 | * |
276 | - * @param $request |
|
279 | + * @param SS_HTTPRequest $request |
|
277 | 280 | * @param $action |
278 | 281 | * @return SS_HTTPResponse |
279 | 282 | */ |
@@ -386,6 +389,7 @@ discard block |
||
386 | 389 | |
387 | 390 | /** |
388 | 391 | * Return the class that defines the given action, so that we know where to check allowed_actions. |
392 | + * @return string|null |
|
389 | 393 | */ |
390 | 394 | protected function definingClassForAction($actionOrigCasing) { |
391 | 395 | $action = strtolower($actionOrigCasing); |
@@ -495,6 +499,7 @@ discard block |
||
495 | 499 | * or {@link handleRequest()}, but in some based we want to set it manually. |
496 | 500 | * |
497 | 501 | * @param SS_HTTPRequest |
502 | + * @param SS_HTTPRequest $request |
|
498 | 503 | */ |
499 | 504 | public function setRequest($request) { |
500 | 505 | $this->request = $request; |
@@ -633,6 +633,7 @@ discard block |
||
633 | 633 | * |
634 | 634 | * Caution: this doesn't work on all fields, see {@link setAttribute()}. |
635 | 635 | * |
636 | + * @param string $name |
|
636 | 637 | * @return null|string |
637 | 638 | */ |
638 | 639 | public function getAttribute($name) { |
@@ -744,7 +745,6 @@ discard block |
||
744 | 745 | * Set the field value. |
745 | 746 | * |
746 | 747 | * @param mixed $value |
747 | - * @param null|array|DataObject $data {@see Form::loadDataFrom} |
|
748 | 748 | * |
749 | 749 | * @return $this |
750 | 750 | */ |
@@ -1225,6 +1225,7 @@ discard block |
||
1225 | 1225 | * @todo Make this abstract. |
1226 | 1226 | * |
1227 | 1227 | * @param Validator |
1228 | + * @param RequiredFields $validator |
|
1228 | 1229 | * |
1229 | 1230 | * @return bool |
1230 | 1231 | */ |
@@ -1479,7 +1480,7 @@ discard block |
||
1479 | 1480 | * Any passed keys that are not defined in {@link getSchemaDataDefaults()} are ignored. |
1480 | 1481 | * If you want to pass around ad hoc data use the `data` array e.g. pass `['data' => ['myCustomKey' => 'yolo']]`. |
1481 | 1482 | * |
1482 | - * @param array $schemaData - The data to be merged with $this->schemaData. |
|
1483 | + * @param array $schemaState - The data to be merged with $this->schemaData. |
|
1483 | 1484 | * @return FormField |
1484 | 1485 | * |
1485 | 1486 | * @todo Add deep merging of arrays like `data` and `attributes`. |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Given a TinyMCE pattern (close to unix glob style), create a regex that does the match |
43 | 43 | * |
44 | - * @param $str - The TinyMCE pattern |
|
44 | + * @param string|null $str - The TinyMCE pattern |
|
45 | 45 | * @return string - The equivalent regex |
46 | 46 | */ |
47 | 47 | protected function patternToRegex($str) { |
@@ -182,6 +182,7 @@ discard block |
||
182 | 182 | /** |
183 | 183 | * Given an attribute name, return the rule structure for that attribute |
184 | 184 | * @param string $name - The attribute name |
185 | + * @param stdClass $elementRule |
|
185 | 186 | * @return stdClass - The attribute rule |
186 | 187 | */ |
187 | 188 | protected function getRuleForAttribute($elementRule, $name) { |
@@ -245,7 +246,7 @@ discard block |
||
245 | 246 | * Given an SS_HTMLValue instance, will remove and elements and attributes that are |
246 | 247 | * not explicitly included in the whitelist passed to __construct on instance creation |
247 | 248 | * |
248 | - * @param SS_HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
249 | + * @param HTMLValue $html - The HTMLValue to remove any non-whitelisted elements & attributes from |
|
249 | 250 | */ |
250 | 251 | public function sanitise (HTMLValue $html) { |
251 | 252 | if(!$this->elements && !$this->elementPatterns) return; |
@@ -466,6 +466,7 @@ discard block |
||
466 | 466 | * Returns true if the given column can be used to filter the records. |
467 | 467 | * |
468 | 468 | * It works by checking the fields available in the first record of the list. |
469 | + * @param string $by |
|
469 | 470 | */ |
470 | 471 | public function canFilterBy($by) { |
471 | 472 | $firstRecord = $this->first(); |
@@ -596,6 +597,9 @@ discard block |
||
596 | 597 | return $this->filter('ID', $ids); |
597 | 598 | } |
598 | 599 | |
600 | + /** |
|
601 | + * @param integer $id |
|
602 | + */ |
|
599 | 603 | public function byID($id) { |
600 | 604 | $firstElement = $this->filter("ID", $id)->first(); |
601 | 605 | |
@@ -680,7 +684,6 @@ discard block |
||
680 | 684 | /** |
681 | 685 | * Returns whether an item with $key exists |
682 | 686 | * |
683 | - * @param mixed $key |
|
684 | 687 | * @return bool |
685 | 688 | */ |
686 | 689 | public function offsetExists($offset) { |
@@ -690,7 +693,6 @@ discard block |
||
690 | 693 | /** |
691 | 694 | * Returns item stored in list with index $key |
692 | 695 | * |
693 | - * @param mixed $key |
|
694 | 696 | * @return DataObject |
695 | 697 | */ |
696 | 698 | public function offsetGet($offset) { |
@@ -700,7 +702,6 @@ discard block |
||
700 | 702 | /** |
701 | 703 | * Set an item with the key in $key |
702 | 704 | * |
703 | - * @param mixed $key |
|
704 | 705 | * @param mixed $value |
705 | 706 | */ |
706 | 707 | public function offsetSet($offset, $value) { |
@@ -714,7 +715,6 @@ discard block |
||
714 | 715 | /** |
715 | 716 | * Unset an item with the key in $key |
716 | 717 | * |
717 | - * @param mixed $key |
|
718 | 718 | */ |
719 | 719 | public function offsetUnset($offset) { |
720 | 720 | unset($this->items[$offset]); |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | * @param boolean $create Flag indicating whether the database should be created |
695 | 695 | * if it doesn't exist. If $create is false and the database doesn't exist |
696 | 696 | * then an error will be raised |
697 | - * @param int|boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
697 | + * @param boolean $errorLevel The level of error reporting to enable for the query, or false if no error |
|
698 | 698 | * should be raised |
699 | 699 | * @return boolean Flag indicating success |
700 | 700 | */ |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | /** |
730 | 730 | * Returns the name of the currently selected database |
731 | 731 | * |
732 | - * @return string|null Name of the selected database, or null if none selected |
|
732 | + * @return string Name of the selected database, or null if none selected |
|
733 | 733 | */ |
734 | 734 | public function getSelectedDatabase() { |
735 | 735 | return $this->connector->getSelectedDatabase(); |
@@ -46,7 +46,6 @@ discard block |
||
46 | 46 | /** |
47 | 47 | * Injector injection point for database controller |
48 | 48 | * |
49 | - * @param SS_Database $connector |
|
50 | 49 | */ |
51 | 50 | public function setDatabase(SS_Database $database) { |
52 | 51 | $this->database = $database; |
@@ -483,7 +482,7 @@ discard block |
||
483 | 482 | /** |
484 | 483 | * Given an index spec determines the index type |
485 | 484 | * |
486 | - * @param array|string $spec |
|
485 | + * @param string $spec |
|
487 | 486 | * @return string |
488 | 487 | */ |
489 | 488 | protected function determineIndexType($spec) { |
@@ -551,7 +550,7 @@ discard block |
||
551 | 550 | /** |
552 | 551 | * Returns true if the given table is exists in the current database |
553 | 552 | * |
554 | - * @param string $table Name of table to check |
|
553 | + * @param string $tableName Name of table to check |
|
555 | 554 | * @return boolean Flag indicating existence of table |
556 | 555 | */ |
557 | 556 | abstract public function hasTable($tableName); |
@@ -324,7 +324,7 @@ |
||
324 | 324 | * @param int $errorLevel |
325 | 325 | * @param string $sql |
326 | 326 | * @param array $parameters |
327 | - * @return \PDOQuery |
|
327 | + * @return PDOQuery|null |
|
328 | 328 | */ |
329 | 329 | protected function prepareResults($statement, $errorLevel, $sql, $parameters = array()) { |
330 | 330 |
@@ -79,9 +79,15 @@ |
||
79 | 79 | public function can($member) { |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param \Member $member |
|
84 | + */ |
|
82 | 85 | public function canEdit($member) { |
83 | 86 | } |
84 | 87 | |
88 | + /** |
|
89 | + * @param \Member $member |
|
90 | + */ |
|
85 | 91 | public function canDelete($member) { |
86 | 92 | } |
87 | 93 |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * Returns a new DataList instance with the specified query parameter assigned |
173 | 173 | * |
174 | 174 | * @param string|array $keyOrArray Either the single key to set, or an array of key value pairs to set |
175 | - * @param mixed $val If $keyOrArray is not an array, this is the value to set |
|
175 | + * @param string $val If $keyOrArray is not an array, this is the value to set |
|
176 | 176 | * @return static |
177 | 177 | */ |
178 | 178 | public function setDataQueryParam($keyOrArray, $val = null) { |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | * Check if the given field specification could be interpreted as an unquoted relation name |
536 | 536 | * |
537 | 537 | * @param string $field |
538 | - * @return bool |
|
538 | + * @return integer |
|
539 | 539 | */ |
540 | 540 | protected function isValidRelationName($field) { |
541 | 541 | return preg_match('/^[A-Z0-9._]+$/i', $field); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
651 | 651 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
652 | 652 | * ORM have a value of 10. |
653 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
653 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
654 | 654 | * @return DataList |
655 | 655 | */ |
656 | 656 | public function innerJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | * @param int $order A numerical index to control the order that joins are added to the query; lower order values |
669 | 669 | * will cause the query to appear first. The default is 20, and joins created automatically by the |
670 | 670 | * ORM have a value of 10. |
671 | - * @param array $parameters Any additional parameters if the join is a parameterised subquery |
|
671 | + * @param string[] $parameters Any additional parameters if the join is a parameterised subquery |
|
672 | 672 | * @return DataList |
673 | 673 | */ |
674 | 674 | public function leftJoin($table, $onClause, $alias = null, $order = 20, $parameters = array()) { |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | /** |
885 | 885 | * Restrict the columns to fetch into this DataList |
886 | 886 | * |
887 | - * @param array $queriedColumns |
|
887 | + * @param string[] $queriedColumns |
|
888 | 888 | * @return DataList |
889 | 889 | */ |
890 | 890 | public function setQueriedColumns($queriedColumns) { |
@@ -1159,7 +1159,7 @@ discard block |
||
1159 | 1159 | /** |
1160 | 1160 | * Returns item stored in list with index $key |
1161 | 1161 | * |
1162 | - * @param mixed $key |
|
1162 | + * @param integer $key |
|
1163 | 1163 | * @return DataObject |
1164 | 1164 | */ |
1165 | 1165 | public function offsetGet($key) { |