@@ -52,6 +52,9 @@ |
||
52 | 52 | return 0; |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $value |
|
57 | + */ |
|
55 | 58 | public function prepValueForDB($value) { |
56 | 59 | if($value === true) { |
57 | 60 | return 1; |
@@ -236,6 +236,8 @@ discard block |
||
236 | 236 | } |
237 | 237 | |
238 | 238 | /** |
239 | + * @param string $currency |
|
240 | + * @param string $locale |
|
239 | 241 | * @return string |
240 | 242 | */ |
241 | 243 | public function getSymbol($currency = null, $locale = null) { |
@@ -247,6 +249,8 @@ discard block |
||
247 | 249 | } |
248 | 250 | |
249 | 251 | /** |
252 | + * @param string $currency |
|
253 | + * @param string $locale |
|
250 | 254 | * @return string |
251 | 255 | */ |
252 | 256 | public function getShortName($currency = null, $locale = null) { |
@@ -257,6 +261,8 @@ discard block |
||
257 | 261 | } |
258 | 262 | |
259 | 263 | /** |
264 | + * @param string $currency |
|
265 | + * @param string $locale |
|
260 | 266 | * @return string |
261 | 267 | */ |
262 | 268 | public function getName($currency = null, $locale = null) { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @param string $name |
20 | - * @param DataOject $object The object that this is primary key for (should have a relation with $name) |
|
20 | + * @param DataObject $object The object that this is primary key for (should have a relation with $name) |
|
21 | 21 | */ |
22 | 22 | public function __construct($name = null, $object) { |
23 | 23 | $this->object = $object; |
@@ -71,8 +71,8 @@ |
||
71 | 71 | /** |
72 | 72 | * resizeRatio |
73 | 73 | * |
74 | - * @param int $width |
|
75 | - * @param int $height |
|
74 | + * @param integer $maxWidth |
|
75 | + * @param integer $maxHeight |
|
76 | 76 | * @return Image_Backend |
77 | 77 | */ |
78 | 78 | public function resizeRatio($maxWidth, $maxHeight, $useAsMinimum = false); |
@@ -33,6 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @deprecated since version 4.0 |
36 | + * @param boolean $value |
|
36 | 37 | */ |
37 | 38 | public function setDelete($value) { |
38 | 39 | Deprecation::notice('4.0', 'SQLQuery::setDelete is deprecated. Use toDelete instead'); |
@@ -47,6 +48,9 @@ discard block |
||
47 | 48 | return $this->isDelete; |
48 | 49 | } |
49 | 50 | |
51 | + /** |
|
52 | + * @return string |
|
53 | + */ |
|
50 | 54 | public function sql(&$parameters = array()) { |
51 | 55 | return $this->toAppropriateExpression()->sql($parameters); |
52 | 56 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * column. Can contain a relation name in dot notation, which will automatically join |
48 | 48 | * the necessary tables (e.g. "Comments.Name" to join the "Comments" has-many relationship and |
49 | 49 | * search the "Name" column when applying this filter to a SiteTree class). |
50 | - * @param mixed $value |
|
50 | + * @param boolean|string $value |
|
51 | 51 | * @param array $modifiers |
52 | 52 | */ |
53 | 53 | public function __construct($fullName, $value = false, array $modifiers = array()) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | /** |
288 | 288 | * Determines case sensitivity based on {@link getModifiers()}. |
289 | 289 | * |
290 | - * @return Mixed TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
290 | + * @return boolean|null TRUE or FALSE to enforce sensitivity, NULL to use field collation. |
|
291 | 291 | */ |
292 | 292 | protected function getCaseSensitive() { |
293 | 293 | $modifiers = $this->getModifiers(); |
@@ -304,6 +304,10 @@ |
||
304 | 304 | // Delete files in the default uploads directory that match the name pattern. |
305 | 305 | // @param String $namePattern A regular expression applied to files in the directory. If the name matches |
306 | 306 | // the pattern, it is deleted. Directories, . and .. are excluded. |
307 | + |
|
308 | + /** |
|
309 | + * @param string $namePattern |
|
310 | + */ |
|
307 | 311 | public function deleteTestUploadFiles($namePattern) { |
308 | 312 | $tmpFolder = ASSETS_PATH . "/" . Config::inst()->get('Upload', 'uploads_folder'); |
309 | 313 | $files = scandir($tmpFolder); |
@@ -51,6 +51,9 @@ discard block |
||
51 | 51 | ); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param Requirements_Backend $backend |
|
56 | + */ |
|
54 | 57 | protected function setupCombinedRequirements($backend) { |
55 | 58 | $basePath = $this->getCurrentRelativePath(); |
56 | 59 | |
@@ -76,6 +79,9 @@ discard block |
||
76 | 79 | ); |
77 | 80 | } |
78 | 81 | |
82 | + /** |
|
83 | + * @param Requirements_Backend $backend |
|
84 | + */ |
|
79 | 85 | protected function setupCombinedNonrequiredRequirements($backend) { |
80 | 86 | $basePath = $this->getCurrentRelativePath(); |
81 | 87 | |
@@ -452,6 +458,10 @@ discard block |
||
452 | 458 | $this->assertNotRegexp('/RequirementsTest_b\.css\?m=[\d]*&foo=bar&bla=blubb"/', $html); |
453 | 459 | } |
454 | 460 | |
461 | + /** |
|
462 | + * @param Requirements_Backend $backend |
|
463 | + * @param string $type |
|
464 | + */ |
|
455 | 465 | public function assertFileIncluded($backend, $type, $files) { |
456 | 466 | $type = strtolower($type); |
457 | 467 | switch (strtolower($type)) { |
@@ -496,6 +506,10 @@ discard block |
||
496 | 506 | } |
497 | 507 | } |
498 | 508 | |
509 | + /** |
|
510 | + * @param Requirements_Backend $backend |
|
511 | + * @param string $type |
|
512 | + */ |
|
499 | 513 | public function assertFileNotIncluded($backend, $type, $files) { |
500 | 514 | $type = strtolower($type); |
501 | 515 | switch ($type) { |
@@ -376,11 +376,17 @@ discard block |
||
376 | 376 | |
377 | 377 | // LOADING FUNCTIONS |
378 | 378 | |
379 | + /** |
|
380 | + * @param string $input |
|
381 | + */ |
|
379 | 382 | private function __load($input) { |
380 | 383 | $Source = $this->loadFromSource($input); |
381 | 384 | return $this->loadWithSource($Source); |
382 | 385 | } |
383 | 386 | |
387 | + /** |
|
388 | + * @param string $input |
|
389 | + */ |
|
384 | 390 | private function __loadString($input) { |
385 | 391 | $Source = $this->loadFromString($input); |
386 | 392 | return $this->loadWithSource($Source); |
@@ -598,6 +604,7 @@ discard block |
||
598 | 604 | /** |
599 | 605 | * Used in inlines to check for more inlines or quoted strings |
600 | 606 | * @access private |
607 | + * @param string $inline |
|
601 | 608 | * @return array |
602 | 609 | */ |
603 | 610 | private function _inlineEscape($inline) { |
@@ -701,12 +708,18 @@ discard block |
||
701 | 708 | return $explode; |
702 | 709 | } |
703 | 710 | |
711 | + /** |
|
712 | + * @param integer $lineIndent |
|
713 | + */ |
|
704 | 714 | private function literalBlockContinues ($line, $lineIndent) { |
705 | 715 | if (!trim($line)) return true; |
706 | 716 | if (strlen($line) - strlen(ltrim($line)) > $lineIndent) return true; |
707 | 717 | return false; |
708 | 718 | } |
709 | 719 | |
720 | + /** |
|
721 | + * @param boolean $alias |
|
722 | + */ |
|
710 | 723 | private function referenceContentsByAlias ($alias) { |
711 | 724 | do { |
712 | 725 | if (!isset($this->SavedGroups[$alias])) { echo "Bad group name: $alias."; break; } |
@@ -799,6 +812,9 @@ discard block |
||
799 | 812 | |
800 | 813 | } |
801 | 814 | |
815 | + /** |
|
816 | + * @param string $line |
|
817 | + */ |
|
802 | 818 | private static function startsLiteralBlock ($line) { |
803 | 819 | $lastChar = substr (trim($line), -1); |
804 | 820 | if ($lastChar != '>' && $lastChar != '|') return false; |
@@ -808,6 +824,9 @@ discard block |
||
808 | 824 | return $lastChar; |
809 | 825 | } |
810 | 826 | |
827 | + /** |
|
828 | + * @param string $line |
|
829 | + */ |
|
811 | 830 | private static function greedilyNeedNextLine($line) { |
812 | 831 | $line = trim ($line); |
813 | 832 | if (!strlen($line)) return false; |
@@ -817,6 +836,10 @@ discard block |
||
817 | 836 | return false; |
818 | 837 | } |
819 | 838 | |
839 | + /** |
|
840 | + * @param string $literalBlock |
|
841 | + * @param string $literalBlockStyle |
|
842 | + */ |
|
820 | 843 | private function addLiteralLine ($literalBlock, $line, $literalBlockStyle) { |
821 | 844 | $line = self::stripIndent($line); |
822 | 845 | $line = rtrim ($line, "\r\n\t ") . "\n"; |
@@ -833,6 +856,9 @@ discard block |
||
833 | 856 | return $literalBlock . $line; |
834 | 857 | } |
835 | 858 | |
859 | + /** |
|
860 | + * @param string $literalBlock |
|
861 | + */ |
|
836 | 862 | function revertLiteralPlaceHolder ($lineArray, $literalBlock) { |
837 | 863 | foreach ($lineArray as $k => $_) { |
838 | 864 | if (is_array($_)) |
@@ -848,6 +874,9 @@ discard block |
||
848 | 874 | return substr ($line, $indent); |
849 | 875 | } |
850 | 876 | |
877 | + /** |
|
878 | + * @param integer $indent |
|
879 | + */ |
|
851 | 880 | private function getParentPathByIndent ($indent) { |
852 | 881 | if ($indent == 0) return array(); |
853 | 882 | $linePath = $this->path; |
@@ -873,6 +902,9 @@ discard block |
||
873 | 902 | } |
874 | 903 | |
875 | 904 | |
905 | + /** |
|
906 | + * @param string $line |
|
907 | + */ |
|
876 | 908 | private static function isComment ($line) { |
877 | 909 | if (!$line) return false; |
878 | 910 | if ($line[0] == '#') return true; |
@@ -880,6 +912,9 @@ discard block |
||
880 | 912 | return false; |
881 | 913 | } |
882 | 914 | |
915 | + /** |
|
916 | + * @param string $line |
|
917 | + */ |
|
883 | 918 | private static function isEmpty ($line) { |
884 | 919 | return (trim ($line) === ''); |
885 | 920 | } |
@@ -905,10 +940,16 @@ discard block |
||
905 | 940 | } |
906 | 941 | |
907 | 942 | |
943 | + /** |
|
944 | + * @param string $line |
|
945 | + */ |
|
908 | 946 | private function startsMappedSequence ($line) { |
909 | 947 | return ($line[0] == '-' && substr ($line, -1, 1) == ':'); |
910 | 948 | } |
911 | 949 | |
950 | + /** |
|
951 | + * @param string $line |
|
952 | + */ |
|
912 | 953 | private function returnMappedSequence ($line) { |
913 | 954 | $array = array(); |
914 | 955 | $key = trim(substr($line,1,-1)); |
@@ -917,6 +958,9 @@ discard block |
||
917 | 958 | return array($array); |
918 | 959 | } |
919 | 960 | |
961 | + /** |
|
962 | + * @param string $line |
|
963 | + */ |
|
920 | 964 | private function returnMappedValue ($line) { |
921 | 965 | $array = array(); |
922 | 966 | $key = trim(substr($line,0,-1)); |
@@ -924,18 +968,30 @@ discard block |
||
924 | 968 | return $array; |
925 | 969 | } |
926 | 970 | |
971 | + /** |
|
972 | + * @param string $line |
|
973 | + */ |
|
927 | 974 | private function startsMappedValue ($line) { |
928 | 975 | return (substr ($line, -1, 1) == ':'); |
929 | 976 | } |
930 | 977 | |
978 | + /** |
|
979 | + * @param string $line |
|
980 | + */ |
|
931 | 981 | private function isPlainArray ($line) { |
932 | 982 | return ($line[0] == '[' && substr ($line, -1, 1) == ']'); |
933 | 983 | } |
934 | 984 | |
985 | + /** |
|
986 | + * @param string $line |
|
987 | + */ |
|
935 | 988 | private function returnPlainArray ($line) { |
936 | 989 | return $this->_toType($line); |
937 | 990 | } |
938 | 991 | |
992 | + /** |
|
993 | + * @param string $line |
|
994 | + */ |
|
939 | 995 | private function returnKeyValuePair ($line) { |
940 | 996 | $array = array(); |
941 | 997 | if (strpos ($line, ':')) { |
@@ -965,6 +1021,9 @@ discard block |
||
965 | 1021 | } |
966 | 1022 | |
967 | 1023 | |
1024 | + /** |
|
1025 | + * @param string $line |
|
1026 | + */ |
|
968 | 1027 | private function returnArrayElement ($line) { |
969 | 1028 | if (strlen($line) <= 1) return array(array()); // Weird %) |
970 | 1029 | $array = array(); |
@@ -975,6 +1034,9 @@ discard block |
||
975 | 1034 | } |
976 | 1035 | |
977 | 1036 | |
1037 | + /** |
|
1038 | + * @param string $line |
|
1039 | + */ |
|
978 | 1040 | private function nodeContainsGroup ($line) { |
979 | 1041 | $symbolsForReference = 'A-z0-9_\-'; |
980 | 1042 | if (strpos($line, '&') === false && strpos($line, '*') === false) return false; // Please die fast ;-) |
@@ -987,12 +1049,20 @@ discard block |
||
987 | 1049 | |
988 | 1050 | } |
989 | 1051 | |
1052 | + /** |
|
1053 | + * @param string $line |
|
1054 | + * @param string $group |
|
1055 | + */ |
|
990 | 1056 | private function addGroup ($line, $group) { |
991 | 1057 | if ($group[0] == '&') $this->_containsGroupAnchor = substr ($group, 1); |
992 | 1058 | if ($group[0] == '*') $this->_containsGroupAlias = substr ($group, 1); |
993 | 1059 | //print_r ($this->path); |
994 | 1060 | } |
995 | 1061 | |
1062 | + /** |
|
1063 | + * @param string $line |
|
1064 | + * @param string $group |
|
1065 | + */ |
|
996 | 1066 | private function stripGroup ($line, $group) { |
997 | 1067 | $line = trim(str_replace($group, '', $line)); |
998 | 1068 | return $line; |