minor #12774 Docblock Fixes (GrahamCampbell)

This PR was merged into the 2.3 branch.

Discussion
----------

Docblock Fixes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

##### This pull request fixes the docblock alignment as requested in #12760.

It was also necessary for me to ensure the `@return` annotations were correctly separated in order to accurately align the `@param` annotations.

Commits
-------

443307e Docblock fixes
This commit is contained in:
Fabien Potencier 2014-11-30 17:59:09 +01:00
commit c68ff54aac
356 changed files with 1546 additions and 1467 deletions

View File

@ -44,6 +44,7 @@ class ContainerAwareEventManager extends EventManager
* the name of the method that is invoked on listeners.
* @param EventArgs $eventArgs The event arguments to pass to the event handlers/listeners.
* If not supplied, the single empty EventArgs instance is used.
*
* @return bool
*/
public function dispatchEvent($eventName, EventArgs $eventArgs = null)

View File

@ -22,6 +22,7 @@ class EntityType extends DoctrineType
* @param ObjectManager $manager
* @param mixed $queryBuilder
* @param string $class
*
* @return ORMQueryBuilderLoader
*/
public function getLoader(ObjectManager $manager, $queryBuilder, $class)

View File

@ -47,6 +47,7 @@ class LogoutUrlExtension extends \Twig_Extension
* Generate the relative logout URL for the firewall.
*
* @param string $key The firewall key
*
* @return string The relative logout URL
*/
public function getLogoutPath($key)
@ -58,6 +59,7 @@ class LogoutUrlExtension extends \Twig_Extension
* Generate the absolute logout URL for the firewall.
*
* @param string $key The firewall key
*
* @return string The absolute logout URL
*/
public function getLogoutUrl($key)

View File

@ -151,7 +151,8 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
}
/**
* Create a test treebuilder with a variable node, and init the validation
* Create a test treebuilder with a variable node, and init the validation.
*
* @return TreeBuilder
*/
protected function getTestBuilder()
@ -167,10 +168,12 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
}
/**
* Close the validation process and finalize with the given config
* Close the validation process and finalize with the given config.
*
* @param TreeBuilder $testBuilder The tree builder to finalize
* @param array $config The config you want to use for the finalization, if nothing provided
* a simple array('key'=>'value') will be used
*
* @return array The finalized config values
*/
protected function finalizeTestBuilder($testBuilder, $config = null)
@ -185,8 +188,10 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
}
/**
* Return a closure that will return the given value
* @param $val The value that the closure must return
* Return a closure that will return the given value.
*
* @param mixed $val The value that the closure must return
*
* @return Closure
*/
protected function returnClosure($val)
@ -201,6 +206,7 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
*
* @param mixed $value The value to test
* @param TreeBuilder $treeBuilder The tree builder to finalize
*
* @param mixed $config The config values that new to be finalized
*/
protected function assertFinalizedValueIs($value, $treeBuilder, $config = null)

View File

@ -194,9 +194,10 @@ class InputOption
}
/**
* Checks whether the given option equals this one
* Checks whether the given option equals this one.
*
* @param InputOption $option option to compare
*
* @return bool
*/
public function equals(InputOption $option)

View File

@ -460,6 +460,7 @@ class Filesystem
* @param string $content The data to write into the file.
* @param null|int $mode The file mode (octal). If null, file permissions are not modified
* Deprecated since version 2.3.12, to be removed in 3.0.
*
* @throws IOException If the file cannot be written to.
*/
public function dumpFile($filename, $content, $mode = 0666)

View File

@ -62,6 +62,7 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
/**
* @param FormConfigInterface $config
* @param bool $synchronized
*
* @return \PHPUnit_Framework_MockObject_MockObject
*/
private function getForm(FormConfigInterface $config, $synchronized = true, $submitted = true)

View File

@ -17,9 +17,10 @@ namespace Symfony\Component\HttpFoundation\File\MimeType;
interface ExtensionGuesserInterface
{
/**
* Makes a best guess for a file extension, given a mime type
* Makes a best guess for a file extension, given a mime type.
*
* @param string $mimeType The mime type
*
* @return string The guessed extension or NULL, if none could be guessed
*/
public function guess($mimeType);

View File

@ -112,19 +112,20 @@ class StringUtil
);
/**
* This class should not be instantiated
* This class should not be instantiated.
*/
private function __construct()
{
}
/**
* Returns the singular form of a word
* Returns the singular form of a word.
*
* If the method can't determine the form with certainty, an array of the
* possible singulars is returned.
*
* @param string $plural A word in plural form
*
* @return string|array The singular form or an array of possible singular
* forms
*/

View File

@ -223,6 +223,7 @@ class AclProvider implements AclProviderInterface
* ACEs, and security identities.
*
* @param array $ancestorIds
*
* @return string
*/
protected function getLookupSql(array $ancestorIds)
@ -328,6 +329,7 @@ SELECTCLAUSE;
*
* @param ObjectIdentityInterface $oid
* @param bool $directChildrenOnly
*
* @return string
*/
protected function getFindChildrenSql(ObjectIdentityInterface $oid, $directChildrenOnly)
@ -359,6 +361,7 @@ FINDCHILDREN;
* identity.
*
* @param ObjectIdentityInterface $oid
*
* @return string
*/
protected function getSelectObjectIdentityIdSql(ObjectIdentityInterface $oid)
@ -383,6 +386,7 @@ QUERY;
* Returns the primary key of the passed object identity.
*
* @param ObjectIdentityInterface $oid
*
* @return int
*/
final protected function retrieveObjectIdentityPrimaryKey(ObjectIdentityInterface $oid)
@ -491,8 +495,10 @@ QUERY;
* @param Statement $stmt
* @param array $oidLookup
* @param array $sids
* @throws \RuntimeException
*
* @return \SplObjectStorage
*
* @throws \RuntimeException
*/
private function hydrateObjectIdentities(Statement $stmt, array $oidLookup, array $sids)
{

View File

@ -355,6 +355,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* Constructs the SQL for deleting access control entries.
*
* @param int $oidPK
*
* @return string
*/
protected function getDeleteAccessControlEntriesSql($oidPK)
@ -370,6 +371,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* Constructs the SQL for deleting a specific ACE.
*
* @param int $acePK
*
* @return string
*/
protected function getDeleteAccessControlEntrySql($acePK)
@ -385,6 +387,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* Constructs the SQL for deleting an object identity.
*
* @param int $pk
*
* @return string
*/
protected function getDeleteObjectIdentitySql($pk)
@ -400,6 +403,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* Constructs the SQL for deleting relation entries.
*
* @param int $pk
*
* @return string
*/
protected function getDeleteObjectIdentityRelationsSql($pk)
@ -424,6 +428,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf
* @param bool $granting
* @param bool $auditSuccess
* @param bool $auditFailure
*
* @return string
*/
protected function getInsertAccessControlEntrySql($classId, $objectIdentityId, $field, $aceOrder, $securityIdentityId, $strategy, $mask, $granting, $auditSuccess, $auditFailure)
@ -464,6 +469,7 @@ QUERY;
* Constructs the SQL for inserting a new class type.
*
* @param string $classType
*
* @return string
*/
protected function getInsertClassSql($classType)
@ -480,6 +486,7 @@ QUERY;
*
* @param int $objectIdentityId
* @param int $ancestorId
*
* @return string
*/
protected function getInsertObjectIdentityRelationSql($objectIdentityId, $ancestorId)
@ -498,6 +505,7 @@ QUERY;
* @param string $identifier
* @param int $classId
* @param bool $entriesInheriting
*
* @return string
*/
protected function getInsertObjectIdentitySql($identifier, $classId, $entriesInheriting)
@ -520,7 +528,9 @@ QUERY;
* Constructs the SQL for inserting a security identity.
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*/
protected function getInsertSecurityIdentitySql(SecurityIdentityInterface $sid)
@ -550,6 +560,7 @@ QUERY;
* @param int $oid
* @param string $field
* @param int $order
*
* @return string
*/
protected function getSelectAccessControlEntryIdSql($classId, $oid, $field, $order)
@ -573,6 +584,7 @@ QUERY;
* the passed class type.
*
* @param string $classType
*
* @return string
*/
protected function getSelectClassIdSql($classType)
@ -588,7 +600,9 @@ QUERY;
* Constructs the SQL for selecting the primary key of a security identity.
*
* @param SecurityIdentityInterface $sid
*
* @throws \InvalidArgumentException
*
* @return string
*/
protected function getSelectSecurityIdentityIdSql(SecurityIdentityInterface $sid)
@ -616,7 +630,9 @@ QUERY;
*
* @param int $pk
* @param array $changes
*
* @throws \InvalidArgumentException
*
* @return string
*/
protected function getUpdateObjectIdentitySql($pk, array $changes)
@ -638,7 +654,9 @@ QUERY;
*
* @param int $pk
* @param array $sets
*
* @throws \InvalidArgumentException
*
* @return string
*/
protected function getUpdateAccessControlEntrySql($pk, array $sets)
@ -673,6 +691,7 @@ QUERY;
* If the type does not yet exist in the database, it will be created.
*
* @param string $classType
*
* @return int
*/
private function createOrRetrieveClassId($classType)
@ -693,6 +712,7 @@ QUERY;
* created.
*
* @param SecurityIdentityInterface $sid
*
* @return int
*/
private function createOrRetrieveSecurityIdentityId(SecurityIdentityInterface $sid)

View File

@ -399,6 +399,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
*
* @param string $property
* @param int $index
*
* @throws \OutOfBoundsException
*/
private function deleteAce($property, $index)
@ -424,6 +425,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param string $property
* @param int $index
* @param string $field
*
* @throws \OutOfBoundsException
*/
private function deleteFieldAce($property, $index, $field)
@ -452,6 +454,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param SecurityIdentityInterface $sid
* @param bool $granting
* @param string $strategy
*
* @throws \OutOfBoundsException
* @throws \InvalidArgumentException
*/
@ -501,6 +504,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param SecurityIdentityInterface $sid
* @param bool $granting
* @param string $strategy
*
* @throws \InvalidArgumentException
* @throws \OutOfBoundsException
*/
@ -555,6 +559,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param int $index
* @param int $mask
* @param string $strategy
*
* @throws \OutOfBoundsException
*/
private function updateAce($property, $index, $mask, $strategy = null)
@ -582,6 +587,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param int $index
* @param bool $auditSuccess
* @param bool $auditFailure
*
* @throws \OutOfBoundsException
*/
private function updateAuditing(array &$aces, $index, $auditSuccess, $auditFailure)
@ -609,6 +615,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged
* @param string $field
* @param int $mask
* @param string $strategy
*
* @throws \InvalidArgumentException
* @throws \OutOfBoundsException
*/

View File

@ -147,6 +147,7 @@ class DoctrineAclCache implements AclCacheInterface
* Unserializes the ACL.
*
* @param string $serialized
*
* @return AclInterface
*/
private function unserializeAcl($serialized)
@ -205,6 +206,7 @@ class DoctrineAclCache implements AclCacheInterface
* Returns the key for the object identity
*
* @param ObjectIdentityInterface $oid
*
* @return string
*/
private function getDataKeyByIdentity(ObjectIdentityInterface $oid)
@ -217,6 +219,7 @@ class DoctrineAclCache implements AclCacheInterface
* Returns the alias key for the object identity key
*
* @param string $aclId
*
* @return string
*/
private function getAliasKeyForIdentity($aclId)

View File

@ -51,7 +51,9 @@ final class ObjectIdentity implements ObjectIdentityInterface
* Constructs an ObjectIdentity for the given domain object
*
* @param object $domainObject
*
* @throws InvalidDomainObjectException
*
* @return ObjectIdentity
*/
public static function fromDomainObject($domainObject)

View File

@ -51,6 +51,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
* Creates a user security identity from a UserInterface
*
* @param UserInterface $user
*
* @return UserSecurityIdentity
*/
public static function fromAccount(UserInterface $user)
@ -62,6 +63,7 @@ final class UserSecurityIdentity implements SecurityIdentityInterface
* Creates a user security identity from a TokenInterface
*
* @param TokenInterface $token
*
* @return UserSecurityIdentity
*/
public static function fromToken(TokenInterface $token)

View File

@ -38,6 +38,7 @@ interface AclCacheInterface
* Retrieves an ACL for the given object identity primary key from the cache
*
* @param int $primaryKey
*
* @return AclInterface
*/
public function getFromCacheById($primaryKey);
@ -46,6 +47,7 @@ interface AclCacheInterface
* Retrieves an ACL for the given object identity from the cache
*
* @param ObjectIdentityInterface $oid
*
* @return AclInterface
*/
public function getFromCacheByIdentity(ObjectIdentityInterface $oid);

View File

@ -36,6 +36,7 @@ interface AclInterface extends \Serializable
* Returns all class-field-based ACEs associated with this ACL
*
* @param string $field
*
* @return array
*/
public function getClassFieldAces($field);
@ -51,6 +52,7 @@ interface AclInterface extends \Serializable
* Returns all object-field-based ACEs associated with this ACL
*
* @param string $field
*
* @return array
*/
public function getObjectFieldAces($field);
@ -83,6 +85,7 @@ interface AclInterface extends \Serializable
* @param array $masks
* @param array $securityIdentities
* @param bool $administrativeMode
*
* @return bool
*/
public function isFieldGranted($field, array $masks, array $securityIdentities, $administrativeMode = false);
@ -90,10 +93,12 @@ interface AclInterface extends \Serializable
/**
* Determines whether access is granted
*
* @throws NoAceFoundException when no ACE was applicable for this request
* @param array $masks
* @param array $securityIdentities
* @param bool $administrativeMode
*
* @throws NoAceFoundException when no ACE was applicable for this request
*
* @return bool
*/
public function isGranted(array $masks, array $securityIdentities, $administrativeMode = false);
@ -102,6 +107,7 @@ interface AclInterface extends \Serializable
* Whether the ACL has loaded ACEs for all of the passed security identities
*
* @param mixed $securityIdentities an implementation of SecurityIdentityInterface, or an array thereof
*
* @return bool
*/
public function isSidLoaded($securityIdentities);

View File

@ -21,9 +21,11 @@ interface MutableAclProviderInterface extends AclProviderInterface
/**
* Creates a new ACL for the given object identity.
*
* @param ObjectIdentityInterface $oid
*
* @throws AclAlreadyExistsException when there already is an ACL for the given
* object identity
* @param ObjectIdentityInterface $oid
*
* @return MutableAclInterface
*/
public function createAcl(ObjectIdentityInterface $oid);

View File

@ -28,6 +28,7 @@ interface ObjectIdentityInterface
* Example for Object Equality: $object1->getId() === $object2->getId()
*
* @param ObjectIdentityInterface $identity
*
* @return bool
*/
public function equals(ObjectIdentityInterface $identity);

View File

@ -22,6 +22,7 @@ interface ObjectIdentityRetrievalStrategyInterface
* Retrieves the object identity from a domain object
*
* @param object $domainObject
*
* @return ObjectIdentityInterface
*/
public function getObjectIdentity($domainObject);

View File

@ -25,6 +25,7 @@ interface PermissionGrantingStrategyInterface
* @param array $masks
* @param array $sids
* @param bool $administrativeMode
*
* @return bool
*/
public function isGranted(AclInterface $acl, array $masks, array $sids, $administrativeMode = false);

View File

@ -179,8 +179,10 @@ class MaskBuilder
* Returns the code for the passed mask
*
* @param int $mask
*
* @throws \InvalidArgumentException
* @throws \RuntimeException
*
* @return string
*/
public static function getCode($mask)

View File

@ -26,6 +26,7 @@ interface PermissionMapInterface
*
* @param string $permission
* @param object $object
*
* @return array may return null if permission/object combination is not supported
*/
public function getMasks($permission, $object);
@ -34,6 +35,7 @@ interface PermissionMapInterface
* Whether this map contains the given permission
*
* @param string $permission
*
* @return bool
*/
public function contains($permission);

View File

@ -44,6 +44,7 @@ interface TokenProviderInterface
* @param string $series
* @param string $tokenValue
* @param \DateTime $lastUsed
*
* @throws TokenNotFoundException if the token is not found
*/
public function updateToken($series, $tokenValue, \DateTime $lastUsed);

View File

@ -89,6 +89,7 @@ abstract class AbstractToken implements TokenInterface
* a __toString method or the username as a regular string.
*
* @param string|object $user The user
*
* @throws \InvalidArgumentException
*/
public function setUser($user)

View File

@ -422,6 +422,7 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
*
* @param AclProvider $provider
* @param array $data
*
* @throws \InvalidArgumentException
* @throws \Exception
*/

View File

@ -65,6 +65,7 @@ class JsonEncode implements EncoderInterface
* Merge default json encode options with context.
*
* @param array $context
*
* @return array
*/
private function resolveContext(array $context = array())

View File

@ -173,6 +173,7 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
* returns attribute name in camelcase format
*
* @param string $attributeName
*
* @return string
*/
protected function formatAttribute($attributeName)

View File

@ -170,6 +170,7 @@ class MoFileLoader extends ArrayLoader implements LoaderInterface
*
* @param resource $stream
* @param bool $isBigEndian
*
* @return int
*/
private function readLong($stream, $isBigEndian)

View File

@ -98,6 +98,7 @@ abstract class AbstractComparisonValidatorTestCase extends AbstractConstraintVal
/**
* @param array $options Options for the constraint
*
* @return Constraint
*/
abstract protected function createConstraint(array $options);

View File

@ -80,7 +80,7 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa
}
/**
* @param $message
* @param mixed $message
* @param array $parameters
* @param string $propertyPath
* @param string $invalidValue
@ -182,7 +182,7 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa
}
/**
* @param $message
* @param mixed $message
* @param array $parameters
* @param string $propertyPath
* @param string $invalidValue