Skip to content

Commit abf2edf

Browse files
committed
minor symfony#11483 fix some docblocks (xabbuh)
This PR was merged into the 2.3 branch. Discussion ---------- fix some docblocks | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 1775da5 fix some docblocks
2 parents cd005e6 + 1775da5 commit abf2edf

File tree

21 files changed

+47
-15
lines changed

21 files changed

+47
-15
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ abstract class RegisterMappingsPass implements CompilerPassInterface
7474
* @param string[] $managerParameters list of container parameters
7575
* that could hold the manager name
7676
* @param string $driverPattern pattern to get the metadata driver service names
77-
* @param string $enabledParameter service container parameter that must be
77+
* @param string|false $enabledParameter service container parameter that must be
7878
* present to enable the mapping. Set to false
7979
* to not do any check, optional.
8080
*/

src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ class ModelChoiceList extends ObjectChoiceList
8080
* Either an array if $choices is given,
8181
* or a ModelCriteria to be merged with the $queryObject.
8282
* @param PropertyAccessorInterface $propertyAccessor The reflection graph for reading property paths.
83+
*
84+
* @throws MissingOptionsException when no model class is given
85+
* @throws InvalidOptionsException when the model class cannot be found
8386
*/
8487
public function __construct($class, $labelPath = null, $choices = null, $queryObject = null, $groupPath = null, $preferred = array(), PropertyAccessorInterface $propertyAccessor = null)
8588
{

src/Symfony/Component/Config/Definition/BaseNode.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ protected function preNormalize($value)
287287
*
288288
* @return mixed The finalized value
289289
*
290+
* @throws Exception
290291
* @throws InvalidConfigurationException
291292
*/
292293
final public function finalize($value)

src/Symfony/Component/Console/Application.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,8 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
884884
* @param OutputInterface $output An Output instance
885885
*
886886
* @return int 0 if everything went fine, or an error code
887+
*
888+
* @throws \Exception when the command being run threw an exception
887889
*/
888890
protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output)
889891
{

src/Symfony/Component/Console/Helper/DescriptorHelper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ public function __construct()
4848
*
4949
* @param OutputInterface $output
5050
* @param object $object
51-
* @param string $format
51+
* @param string|null $format
5252
* @param bool $raw
53-
* @param string $namespace
53+
* @param string|null $namespace
54+
*
55+
* @throws \InvalidArgumentException when the given format is not supported
5456
*/
5557
public function describe(OutputInterface $output, $object, $format = null, $raw = false, $namespace = null)
5658
{

src/Symfony/Component/Console/Helper/DialogHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public function askHiddenResponse(OutputInterface $output, $question, $fallback
321321
* @param OutputInterface $output An Output instance
322322
* @param string|array $question The question to ask
323323
* @param callable $validator A PHP callback
324-
* @param int $attempts Max number of times to ask before giving up (false by default, which means infinite)
324+
* @param int|false $attempts Max number of times to ask before giving up (false by default, which means infinite)
325325
* @param string $default The default answer if none is given by the user
326326
* @param array $autocomplete List of values to autocomplete
327327
*
@@ -350,7 +350,7 @@ public function askAndValidate(OutputInterface $output, $question, $validator, $
350350
* @param OutputInterface $output An Output instance
351351
* @param string|array $question The question to ask
352352
* @param callable $validator A PHP callback
353-
* @param int $attempts Max number of times to ask before giving up (false by default, which means infinite)
353+
* @param int|false $attempts Max number of times to ask before giving up (false by default, which means infinite)
354354
* @param bool $fallback In case the response can not be hidden, whether to fallback on non-hidden question or not
355355
*
356356
* @return string The response
@@ -444,7 +444,7 @@ private function hasSttyAvailable()
444444
* @param callable $interviewer A callable that will ask for a question and return the result
445445
* @param OutputInterface $output An Output instance
446446
* @param callable $validator A PHP callback
447-
* @param int $attempts Max number of times to ask before giving up ; false will ask infinitely
447+
* @param int|false $attempts Max number of times to ask before giving up ; false will ask infinitely
448448
*
449449
* @return string The validated response
450450
*

src/Symfony/Component/Console/Helper/TableHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public function __construct()
7878
* @param int $layout self::LAYOUT_*
7979
*
8080
* @return TableHelper
81+
*
82+
* @throws InvalidArgumentException when the table layout is not known
8183
*/
8284
public function setLayout($layout)
8385
{

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,10 @@ public function has($id)
266266
*
267267
* @return object The associated service
268268
*
269-
* @throws InvalidArgumentException if the service is not defined
269+
* @throws InvalidArgumentException if the service is not defined
270270
* @throws ServiceCircularReferenceException When a circular reference is detected
271-
* @throws ServiceNotFoundException When the service is not defined
271+
* @throws ServiceNotFoundException When the service is not defined
272+
* @throws \Exception if an exception has been thrown when the service has been resolved
272273
*
273274
* @see Reference
274275
*

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,10 @@ private function addServiceProperties($id, $definition, $variableName = 'instanc
423423
*
424424
* @param string $id
425425
* @param Definition $definition
426+
*
426427
* @return string
428+
*
429+
* @throws ServiceCircularReferenceException when the container contains a circular reference
427430
*/
428431
private function addServiceInlinedDefinitionsSetup($id, $definition)
429432
{
@@ -627,6 +630,8 @@ private function addServices()
627630
*
628631
* @param string $id A service identifier
629632
* @param Definition $definition A Definition instance
633+
*
634+
* @return string|null
630635
*/
631636
private function addServiceSynchronizer($id, Definition $definition)
632637
{

src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ private function parseDefinition($id, $service, $file)
242242
* @param string $file
243243
*
244244
* @return array The file content
245+
*
246+
* @throws InvalidArgumentException when the given file is not a local file or when it does not exist
245247
*/
246248
protected function loadFile($file)
247249
{

src/Symfony/Component/Form/ButtonBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,8 @@ public function setRequestHandler(RequestHandlerInterface $requestHandler)
503503
*
504504
* @param bool $initialize
505505
*
506+
* @return ButtonBuilder
507+
*
506508
* @throws BadMethodCallException
507509
*/
508510
public function setAutoInitialize($initialize)

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function __construct($file, $status = 200, $headers = array(), $public =
6161
* @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename
6262
* @param bool $autoEtag Whether the ETag header should be automatically set
6363
* @param bool $autoLastModified Whether the Last-Modified header should be automatically set
64+
*
65+
* @return BinaryResponse The created response
6466
*/
6567
public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true)
6668
{

src/Symfony/Component/HttpFoundation/File/UploadedFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public static function getMaxFilesize()
286286
/**
287287
* Returns an informative upload error message.
288288
*
289-
* @param int $code The error code returned by an upload attempt
289+
* @param int $errorCode The error code returned by an upload attempt
290290
*
291291
* @return string The error message regarding the specified error code
292292
*/

src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,9 @@ public function preListenerCall($eventName, $eventId, $listener)
261261
/**
262262
* Returns information about the listener
263263
*
264-
* @param object $listener The listener
265-
* @param string $eventName The event name
264+
* @param object $listener The listener
265+
* @param int|null $eventId The event id
266+
* @param string $eventName The event name
266267
*
267268
* @return array Information about the listener
268269
*/

src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function setRequest(Request $request = null)
8181
* @return string|null The Response content or null when the Response is streamed
8282
*
8383
* @throws \InvalidArgumentException when the renderer does not exist
84+
* @throws \LogicException when no master request is being handled
8485
* @throws \RuntimeException when the Response is not successful
8586
*/
8687
public function render($uri, $renderer = 'inline', array $options = array())

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ public function parseCurrency($value, &$currency, &$position = null)
505505
* Parse a number
506506
*
507507
* @param string $value The value to parse
508-
* @param string $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default
508+
* @param int $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default
509509
* @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
510510
*
511511
* @return bool|string The parsed value of false on error

src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,12 +801,12 @@ private function updateNewFieldAceProperty($name, array $changes)
801801
}
802802

803803
/**
804-
* This process old entries changes on an ACE related property (classFieldAces, or objectFieldAces).
804+
* This processes old entries changes on an ACE related property (classFieldAces, or objectFieldAces).
805805
*
806806
* @param string $name
807-
* @param array $changes
807+
* @param array $changes
808808
*/
809-
private function updateOldFieldAceProperty($ane, array $changes)
809+
private function updateOldFieldAceProperty($name, array $changes)
810810
{
811811
$currentIds = array();
812812
foreach ($changes[1] as $field => $new) {

src/Symfony/Component/Security/Core/Encoder/BCryptPasswordEncoder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function __construct($cost)
6161
*
6262
* @return string The encoded password
6363
*
64+
* @throws BadCredentialsException when the given password is too long
65+
*
6466
* @link http://lxr.php.net/xref/PHP_5_5/ext/standard/password.c#111
6567
*/
6668
public function encodePassword($raw, $salt)

src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ protected function comparePasswords($password1, $password2)
8989
/**
9090
* Checks if the password is too long.
9191
*
92+
* @param string $password The password to check
93+
*
9294
* @return bool true if the password is too long, false otherwise
9395
*/
9496
protected function isPasswordTooLong($password)

src/Symfony/Component/Validator/Constraints/LuhnValidator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class LuhnValidator extends ConstraintValidator
3333
*
3434
* @param mixed $value
3535
* @param Constraint $constraint
36+
*
37+
* @throws UnexpectedTypeException when the given credit card number is no string
3638
*/
3739
public function validate($value, Constraint $constraint)
3840
{

src/Symfony/Component/Yaml/Inline.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ private static function parseMapping($mapping, &$i = 0)
384384
* @param string $scalar
385385
*
386386
* @return string A YAML string
387+
*
388+
* @throws ParseException when object parsing support was disabled and the parser detected a PHP object
387389
*/
388390
private static function evaluateScalar($scalar)
389391
{

0 commit comments

Comments
 (0)