@@ -98,6 +98,9 @@ |
||
98 | 98 | return $properties[$property]; |
99 | 99 | } |
100 | 100 | |
101 | + /** |
|
102 | + * @param string $property |
|
103 | + */ |
|
101 | 104 | private function formatProperty($property, $value) |
102 | 105 | { |
103 | 106 | switch($property) |
@@ -62,7 +62,7 @@ |
||
62 | 62 | /** |
63 | 63 | * Sets the value that should be assigned as the checked value for |
64 | 64 | * this check box. |
65 | - * @param $checkedValue The value to be assigned. |
|
65 | + * @param string $checkedValue The value to be assigned. |
|
66 | 66 | * @return Checkbox |
67 | 67 | */ |
68 | 68 | public function setCheckedValue($checkedValue) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | /** |
77 | 77 | * Get the value of the field. |
78 | 78 | * |
79 | - * @return unknown |
|
79 | + * @return string |
|
80 | 80 | */ |
81 | 81 | public function getValue() |
82 | 82 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | /** |
98 | 98 | * Returns the required status of the field. |
99 | 99 | * |
100 | - * @return The required status of the field. |
|
100 | + * @return boolean required status of the field. |
|
101 | 101 | */ |
102 | 102 | public function getRequired() |
103 | 103 | { |
@@ -30,6 +30,10 @@ discard block |
||
30 | 30 | return $image; |
31 | 31 | } |
32 | 32 | |
33 | + /** |
|
34 | + * @param resource $image |
|
35 | + * @param string $path |
|
36 | + */ |
|
33 | 37 | private function writeImage($image, $path) |
34 | 38 | { |
35 | 39 | $array = explode(".", $path); |
@@ -115,7 +119,6 @@ discard block |
||
115 | 119 | /** |
116 | 120 | * A smart thumbnailing function. Generates thumbnail images without |
117 | 121 | * distorting the output of the final image. |
118 | - * @param string $file |
|
119 | 122 | * @param string $width |
120 | 123 | * @param string $height |
121 | 124 | * @param string $head |
@@ -33,6 +33,11 @@ discard block |
||
33 | 33 | array_unshift($this->pathHierarchy, $path); |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $testTemplate |
|
38 | + * @param string[] $paths |
|
39 | + * @param string $extension |
|
40 | + */ |
|
36 | 41 | private function testTemplateFile($testTemplate, $paths, $extension) |
37 | 42 | { |
38 | 43 | $templateFile = ''; |
@@ -46,6 +51,10 @@ discard block |
||
46 | 51 | return $templateFile; |
47 | 52 | } |
48 | 53 | |
54 | + /** |
|
55 | + * @param string $testTemplate |
|
56 | + * @param string[] $paths |
|
57 | + */ |
|
49 | 58 | private function testNoEngineTemplateFile($testTemplate, $paths) |
50 | 59 | { |
51 | 60 | $templateFile = ''; |
@@ -53,6 +62,10 @@ discard block |
||
53 | 62 | $newTemplateFile = "$testTemplate.*"; |
54 | 63 | $files = array_filter( |
55 | 64 | scandir($path), |
65 | + |
|
66 | + /** |
|
67 | + * @param string $file |
|
68 | + */ |
|
56 | 69 | function($file) use($newTemplateFile) { |
57 | 70 | return fnmatch($newTemplateFile, $file); |
58 | 71 | }); |
@@ -67,6 +80,9 @@ discard block |
||
67 | 80 | return $templateFile; |
68 | 81 | } |
69 | 82 | |
83 | + /** |
|
84 | + * @param string $template |
|
85 | + */ |
|
70 | 86 | private function searchTemplateDirectory($template, $ignoreEngine = false) |
71 | 87 | { |
72 | 88 | $templateFile = ''; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * parsed. |
63 | 63 | * |
64 | 64 | * @param string $time |
65 | - * @return DatesHelper |
|
65 | + * @return DateHelper |
|
66 | 66 | */ |
67 | 67 | public function help($time) |
68 | 68 | { |
@@ -229,6 +229,10 @@ discard block |
||
229 | 229 | return $englishDate; |
230 | 230 | } |
231 | 231 | |
232 | + /** |
|
233 | + * @param double $value |
|
234 | + * @param boolean $future |
|
235 | + */ |
|
232 | 236 | private function getEnglishDate($timeFrame, $value, $future) |
233 | 237 | { |
234 | 238 | return ($timeFrame['show_elapsed'] ? "$value " : '') . |
@@ -31,9 +31,6 @@ |
||
31 | 31 | |
32 | 32 | namespace ntentan\honam\engines\php\helpers\form; |
33 | 33 | |
34 | -use ntentan\honam\helpers\FormHelper; |
|
35 | -use ntentan\honam\TemplateEngine; |
|
36 | - |
|
37 | 34 | /** |
38 | 35 | * The form element class. An element can be anything from the form |
39 | 36 | * itself to the objects that are put in the form. Provides an |
@@ -126,6 +126,9 @@ discard block |
||
126 | 126 | $this->setId($id); |
127 | 127 | } |
128 | 128 | |
129 | + /** |
|
130 | + * @param string $id |
|
131 | + */ |
|
129 | 132 | public function setId($id) |
130 | 133 | { |
131 | 134 | $this->id = str_replace(".","_",$id); |
@@ -141,7 +144,7 @@ discard block |
||
141 | 144 | /** |
142 | 145 | * Public accessor for setting the name property of the field. |
143 | 146 | * |
144 | - * @param $name The name to assign to the form element. |
|
147 | + * @param string $name The name to assign to the form element. |
|
145 | 148 | * @return Element |
146 | 149 | */ |
147 | 150 | public function setName($name) |
@@ -153,7 +156,7 @@ discard block |
||
153 | 156 | /** |
154 | 157 | * Public accessor for getting the name property of the field. |
155 | 158 | * |
156 | - * @return The name of the form field. |
|
159 | + * @return string name of the form field. |
|
157 | 160 | */ |
158 | 161 | public function getName() |
159 | 162 | { |
@@ -161,6 +164,10 @@ discard block |
||
161 | 164 | } |
162 | 165 | |
163 | 166 | //! Sets the label which is attached to this element. |
167 | + |
|
168 | + /** |
|
169 | + * @param string $label |
|
170 | + */ |
|
164 | 171 | public function setLabel($label) |
165 | 172 | { |
166 | 173 | $this->label = $label; |
@@ -188,7 +195,8 @@ discard block |
||
188 | 195 | * Sets the description which is attached to this element. The description |
189 | 196 | * is normally displayed under the element when rendering HTML. |
190 | 197 | * |
191 | - * @return string |
|
198 | + * @param string $description |
|
199 | + * @return Element |
|
192 | 200 | */ |
193 | 201 | public function setDescription($description) |
194 | 202 | { |
@@ -247,6 +255,10 @@ discard block |
||
247 | 255 | //! This method internally creates a new Attribute object and appends |
248 | 256 | //! it to the list of attributes. |
249 | 257 | //! \see Attribute |
258 | + |
|
259 | + /** |
|
260 | + * @param string $attribute |
|
261 | + */ |
|
250 | 262 | public function setAttribute($attribute,$value,$scope = Element::SCOPE_ELEMENT) |
251 | 263 | { |
252 | 264 | // Force the setting of the attribute. |
@@ -276,6 +288,9 @@ discard block |
||
276 | 288 | return $attributes; |
277 | 289 | } |
278 | 290 | |
291 | + /** |
|
292 | + * @param string $attribute |
|
293 | + */ |
|
279 | 294 | public function getAttribute($attribute, $scope = Element::SCOPE_ELEMENT) |
280 | 295 | { |
281 | 296 | $attributes = $this->getAttributes($scope); |
@@ -293,6 +308,9 @@ discard block |
||
293 | 308 | return $this->renderLabel; |
294 | 309 | } |
295 | 310 | |
311 | + /** |
|
312 | + * @param boolean $renderLabel |
|
313 | + */ |
|
296 | 314 | public function setRenderLabel($renderLabel) |
297 | 315 | { |
298 | 316 | $this->renderLabel = $renderLabel; |
@@ -33,7 +33,6 @@ |
||
33 | 33 | namespace ntentan\honam\engines\php\helpers; |
34 | 34 | |
35 | 35 | use ntentan\honam\engines\php\Helper; |
36 | - |
|
37 | 36 | use ntentan\honam\engines\php\helpers\form\Container; |
38 | 37 | use ntentan\honam\exceptions\HelperException; |
39 | 38 | use ntentan\utils\Text; |
@@ -14,6 +14,8 @@ |
||
14 | 14 | |
15 | 15 | /** |
16 | 16 | * |
17 | + * @param \Mustache_Engine $stringRenderingEngine |
|
18 | + * @param \Mustache_Engine $fileRenderingEngine |
|
17 | 19 | * @return \Mustache_Engine |
18 | 20 | */ |
19 | 21 | public function __construct($stringRenderingEngine, $fileRenderingEngine) |