Skip to content

Commit 9dce79c

Browse files
authored
Merge pull request #174 from amboss-mededu/phpdoc-fixes
Fixes in php doc blocks
2 parents 6c7d319 + ff82cc8 commit 9dce79c

File tree

6 files changed

+35
-21
lines changed

6 files changed

+35
-21
lines changed

lib/form/sfForm.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public function embedForm($name, sfForm $form, $decorator = null)
476476
/**
477477
* Gets the list of embedded forms.
478478
*
479-
* @return array An array of embedded forms
479+
* @return sfForm[] An array of embedded forms
480480
*/
481481
public function getEmbeddedForms()
482482
{
@@ -1074,7 +1074,7 @@ public function offsetExists($name)
10741074
*
10751075
* @param string $name The offset of the value to get
10761076
*
1077-
* @return sfFormField A form field instance
1077+
* @return sfFormField|sfFormFieldSchema A form field instance
10781078
*/
10791079
public function offsetGet($name)
10801080
{

lib/i18n/sfChoiceFormat.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ public function __construct()
8585
*
8686
* @param float $number the number to test.
8787
* @param string $set the set, in set notation.
88-
* @return boolean true if number is in the set, false otherwise.
88+
*
89+
* @return bool true if number is in the set, false otherwise.
90+
* @throws sfException
8991
*/
9092
public function isValid($number, $set)
9193
{
@@ -176,6 +178,7 @@ protected function isValidSetNotation($number, $set)
176178
* Parses a choice string and get a list of sets and a list of strings corresponding to the sets.
177179
*
178180
* @param string $string the string containing the choices
181+
*
179182
* @return array array($sets, $strings)
180183
*/
181184
public function parse($string)
@@ -205,7 +208,8 @@ public function parse($string)
205208
*
206209
* @param string $string the choices string.
207210
* @param float $number the number to test.
208-
* @return string the choosen string.
211+
*
212+
* @return string the chosen string.
209213
*/
210214
public function format($string, $number)
211215
{

lib/plugins/sfDoctrinePlugin/lib/form/sfFormDoctrine.class.php

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ abstract class sfFormDoctrine extends sfFormObject
2525
/**
2626
* Constructor.
2727
*
28-
* @param mixed A object used to initialize default values
29-
* @param array An array of options
30-
* @param string A CSRF secret (false to disable CSRF protection, null to use the global CSRF secret)
28+
* @param mixed $object A object used to initialize default values
29+
* @param array $options An array of options
30+
* @param string $CSRFSecret A CSRF secret (false to disable CSRF protection, null to use the global CSRF secret)
3131
*
32+
* @throws sfException
3233
* @see sfForm
3334
*/
3435
public function __construct($object = null, $options = array(), $CSRFSecret = null)
@@ -66,8 +67,10 @@ public function getConnection()
6667
/**
6768
* Embeds i18n objects into the current form.
6869
*
69-
* @param array $cultures An array of cultures
70-
* @param string $decorator A HTML decorator for the embedded form
70+
* @param array $cultures An array of cultures
71+
* @param string $decorator A HTML decorator for the embedded form
72+
*
73+
* @throws sfException
7174
*/
7275
public function embedI18n($cultures, $decorator = null)
7376
{
@@ -98,11 +101,11 @@ public function embedI18n($cultures, $decorator = null)
98101
* $userForm = new UserForm($user);
99102
* $userForm->embedRelation('Groups AS groups');
100103
*
101-
* @param string $relationName The name of the relation and an optional alias
102-
* @param string $formClass The name of the form class to use
103-
* @param array $formArguments Arguments to pass to the constructor (related object will be shifted onto the front)
104-
* @param string $innerDecorator A HTML decorator for each embedded form
105-
* @param string $decorator A HTML decorator for the main embedded form
104+
* @param string $relationName The name of the relation and an optional alias
105+
* @param string $formClass The name of the form class to use
106+
* @param array $formArgs Arguments to pass to the constructor (related object will be shifted onto the front)
107+
* @param string $innerDecorator A HTML decorator for each embedded form
108+
* @param string $decorator A HTML decorator for the main embedded form
106109
*
107110
* @throws InvalidArgumentException If the relationship is not a collection
108111
*/
@@ -161,6 +164,10 @@ protected function doUpdateObject($values)
161164
* from the array of cleaned up values.
162165
*
163166
* @see sfFormObject
167+
*
168+
* @param array $values
169+
*
170+
* @return array
164171
*/
165172
public function processValues($values)
166173
{
@@ -228,6 +235,7 @@ public function getI18nFormClass()
228235
* Returns the primary key name of the i18n model.
229236
*
230237
* @return string The primary key name of the i18n model
238+
* @throws sfException
231239
*/
232240
public function getI18nModelPrimaryKeyName()
233241
{

lib/plugins/sfDoctrinePlugin/lib/form/sfFormFilterDoctrine.class.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public function setQuery($query)
7575
/**
7676
* Returns a Doctrine Query based on the current values form the form.
7777
*
78-
* @return Query A Doctrine Query object
78+
* @throws sfValidatorErrorSchema
79+
* @return Doctrine_Query A Doctrine Query object
7980
*/
8081
public function getQuery()
8182
{
@@ -97,7 +98,7 @@ public function getQuery()
9798
* The method must return the processed value or false to remove the value
9899
* from the array of cleaned up values.
99100
*
100-
* @param array An array of cleaned up values to process
101+
* @param array $values An array of cleaned up values to process
101102
*
102103
* @return array An array of cleaned up values processed by the user defined methods
103104
*/
@@ -126,9 +127,9 @@ public function processValues($values)
126127
/**
127128
* Builds a Doctrine Query based on the passed values.
128129
*
129-
* @param array An array of parameters to build the Query object
130+
* @param array $values An array of parameters to build the Query object
130131
*
131-
* @return Query A Doctrine Query object
132+
* @return Doctrine_Query A Doctrine Query object
132133
*/
133134
public function buildQuery(array $values)
134135
{
@@ -141,8 +142,9 @@ public function buildQuery(array $values)
141142
* Overload this method instead of {@link buildQuery()} to avoid running
142143
* {@link processValues()} multiple times.
143144
*
144-
* @param array $values
145+
* @throws LogicException
145146
*
147+
* @param array $values
146148
* @return Doctrine_Query
147149
*/
148150
protected function doBuildQuery(array $values)

lib/validator/sfValidatorErrorSchema.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function getErrors()
130130
/**
131131
* Gets an array of all named errors
132132
*
133-
* @return array An array of sfValidatorError instances
133+
* @return sfValidatorError[] An array of sfValidatorError instances
134134
*/
135135
public function getNamedErrors()
136136
{

lib/validator/sfValidatorSchema.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function offsetUnset($name)
355355
/**
356356
* Returns an array of fields.
357357
*
358-
* @return sfValidatorBase An array of sfValidatorBase instances
358+
* @return sfValidatorBase[] An array of sfValidatorBase instances
359359
*/
360360
public function getFields()
361361
{

0 commit comments

Comments
 (0)