Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix param docs for PropertyAccessor read method #7498

Closed
wants to merge 2 commits into from

3 participants

@jmikola
Q A
Fixed tickets none
License MIT
...omponent/PropertyAccess/PropertyAccessorInterface.php
@@ -72,8 +72,8 @@ public function setValue(&$objectOrArray, $propertyPath, $value);
*
* If none of them are found, an exception is thrown.
*
- * @param object|array $objectOrArray The object or array to traverse
- * @param string|PropertyPathInterface $propertyPath The property path to modify.
+ * @param object|array $objectOrArray The object or array to traverse.
+ * @param string|PropertyPathInterface $propertyPath The property path to read.
@fabpot Owner
fabpot added a note

Can you remove the dots at the end of this line and the line above?

@jmikola
jmikola added a note

I took a look through the component and noticed there were many trailing periods. bdb8473 should catch them all.

AFAIK, you should not fix coding style for the existing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jmikola jmikola [PropertyAccess] Remove trailing periods from doc blocks
Periods were left in place for entries with multiple sentences/statements.
bdb8473
@fabpot
Owner

Can you submit this PR on the 2.2 branch instead?

@jmikola

Ah, yes. Didn't realize that master was already for 2.3.

@jmikola jmikola closed this
@fabpot fabpot referenced this pull request from a commit
@fabpot fabpot merged branch jmikola/2.2-propertyaccess-docs (PR #7511)
This PR was merged into the 2.2 branch.

Discussion
----------

[PropertyAccess] Documentation cleanup

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Resubmission of #7498

Commits
-------

8aaa6ef [PropertyAccess] Remove trailing periods from doc blocks
d78fec9 Fix param docs for PropertyAccessor read method
92501eb
@mmucklo mmucklo referenced this pull request from a commit
@fabpot fabpot merged branch jmikola/2.2-propertyaccess-docs (PR #7511)
This PR was merged into the 2.2 branch.

Discussion
----------

[PropertyAccess] Documentation cleanup

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Resubmission of #7498

Commits
-------

8aaa6ef [PropertyAccess] Remove trailing periods from doc blocks
d78fec9 Fix param docs for PropertyAccessor read method
223c1c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2013
  1. @jmikola
  2. @jmikola

    [PropertyAccess] Remove trailing periods from doc blocks

    jmikola authored
    Periods were left in place for entries with multiple sentences/statements.
This page is out of date. Refresh to see the latest.
View
2  src/Symfony/Component/PropertyAccess/PropertyAccess.php
@@ -21,7 +21,7 @@
/**
* Creates a property accessor with the default configuration.
*
- * @return PropertyAccessor The new property accessor.
+ * @return PropertyAccessor The new property accessor
*/
public static function getPropertyAccessor()
{
View
54 src/Symfony/Component/PropertyAccess/PropertyAccessor.php
@@ -96,9 +96,9 @@ public function setValue(&$objectOrArray, $propertyPath, $value)
/**
* Reads the path from an object up to a given path index.
*
- * @param object|array $objectOrArray The object or array to read from.
- * @param PropertyPathInterface $propertyPath The property path to read.
- * @param integer $lastIndex The integer up to which should be read.
+ * @param object|array $objectOrArray The object or array to read from
+ * @param PropertyPathInterface $propertyPath The property path to read
+ * @param integer $lastIndex The index up to which should be read
*
* @return array The values read in the path.
*
@@ -139,12 +139,12 @@ private function &readPropertiesUntil(&$objectOrArray, PropertyPathInterface $pr
/**
* Reads a key from an array-like structure.
*
- * @param \ArrayAccess|array $array The array or \ArrayAccess object to read from.
- * @param string|integer $index The key to read.
+ * @param \ArrayAccess|array $array The array or \ArrayAccess object to read from
+ * @param string|integer $index The key to read
*
* @return mixed The value of the key
*
- * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array.
+ * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array
*/
private function &readIndex(&$array, $index)
{
@@ -180,9 +180,9 @@ private function &readIndex(&$array, $index)
*
* @return mixed The value of the read property
*
- * @throws NoSuchPropertyException If the property does not exist.
+ * @throws NoSuchPropertyException If the property does not exist
* @throws PropertyAccessDeniedException If the property cannot be accessed due to
- * access restrictions (private or protected).
+ * access restrictions (private or protected)
*/
private function &readProperty(&$object, $property)
{
@@ -250,11 +250,11 @@ private function &readProperty(&$object, $property)
/**
* Sets the value of the property at the given index in the path
*
- * @param \ArrayAccess|array $array An array or \ArrayAccess object to write to.
- * @param string|integer $index The index to write at.
- * @param mixed $value The value to write.
+ * @param \ArrayAccess|array $array An array or \ArrayAccess object to write to
+ * @param string|integer $index The index to write at
+ * @param mixed $value The value to write
*
- * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array.
+ * @throws NoSuchPropertyException If the array does not implement \ArrayAccess or it is not an array
*/
private function writeIndex(&$array, $index, $value)
{
@@ -268,14 +268,14 @@ private function writeIndex(&$array, $index, $value)
/**
* Sets the value of the property at the given index in the path
*
- * @param object|array $object The object or array to write to.
- * @param string $property The property to write.
- * @param string|null $singular The singular form of the property name or null.
- * @param mixed $value The value to write.
+ * @param object|array $object The object or array to write to
+ * @param string $property The property to write
+ * @param string|null $singular The singular form of the property name or null
+ * @param mixed $value The value to write
*
- * @throws NoSuchPropertyException If the property does not exist.
+ * @throws NoSuchPropertyException If the property does not exist
* @throws PropertyAccessDeniedException If the property cannot be accessed due to
- * access restrictions (private or protected).
+ * access restrictions (private or protected)
*/
private function writeProperty(&$object, $property, $singular, $value)
{
@@ -368,9 +368,9 @@ private function writeProperty(&$object, $property, $singular, $value)
/**
* Camelizes a given string.
*
- * @param string $string Some string.
+ * @param string $string Some string
*
- * @return string The camelized version of the string.
+ * @return string The camelized version of the string
*/
private function camelize($string)
{
@@ -381,11 +381,11 @@ private function camelize($string)
* Searches for add and remove methods.
*
* @param \ReflectionClass $reflClass The reflection class for the given object
- * @param array $singulars The singular form of the property name or null.
+ * @param array $singulars The singular form of the property name or null
*
- * @return array|null An array containing the adder and remover when found, null otherwise.
+ * @return array|null An array containing the adder and remover when found, null otherwise
*
- * @throws NoSuchPropertyException If the property does not exist.
+ * @throws NoSuchPropertyException If the property does not exist
*/
private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars)
{
@@ -416,12 +416,12 @@ private function findAdderAndRemover(\ReflectionClass $reflClass, array $singula
/**
* Returns whether a method is public and has a specific number of required parameters.
*
- * @param \ReflectionClass $class The class of the method.
- * @param string $methodName The method name.
- * @param integer $parameters The number of parameters.
+ * @param \ReflectionClass $class The class of the method
+ * @param string $methodName The method name
+ * @param integer $parameters The number of parameters
*
* @return Boolean Whether the method is public and has $parameters
- * required parameters.
+ * required parameters
*/
private function isAccessible(\ReflectionClass $class, $methodName, $parameters)
{
View
14 src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
@@ -39,15 +39,15 @@
*
* If neither is found, an exception is thrown.
*
- * @param object|array $objectOrArray The object or array to modify.
- * @param string|PropertyPathInterface $propertyPath The property path to modify.
- * @param mixed $value The value to set at the end of the property path.
+ * @param object|array $objectOrArray The object or array to modify
+ * @param string|PropertyPathInterface $propertyPath The property path to modify
+ * @param mixed $value The value to set at the end of the property path
*
- * @throws Exception\NoSuchPropertyException If a property does not exist.
+ * @throws Exception\NoSuchPropertyException If a property does not exist
* @throws Exception\PropertyAccessDeniedException If a property cannot be accessed due to
- * access restrictions (private or protected).
+ * access restrictions (private or protected)
* @throws Exception\UnexpectedTypeException If a value within the path is neither object
- * nor array.
+ * nor array
*/
public function setValue(&$objectOrArray, $propertyPath, $value);
@@ -73,7 +73,7 @@ public function setValue(&$objectOrArray, $propertyPath, $value);
* If none of them are found, an exception is thrown.
*
* @param object|array $objectOrArray The object or array to traverse
- * @param string|PropertyPathInterface $propertyPath The property path to modify.
+ * @param string|PropertyPathInterface $propertyPath The property path to read
*
* @return mixed The value at the end of the property path
*
View
6 src/Symfony/Component/PropertyAccess/PropertyPath.php
@@ -62,10 +62,10 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface
/**
* Constructs a property path from a string.
*
- * @param PropertyPath|string $propertyPath The property path as string or instance.
+ * @param PropertyPath|string $propertyPath The property path as string or instance
*
- * @throws UnexpectedTypeException If the given path is not a string.
- * @throws InvalidPropertyPathException If the syntax of the property path is not valid.
+ * @throws UnexpectedTypeException If the given path is not a string
+ * @throws InvalidPropertyPathException If the syntax of the property path is not valid
*/
public function __construct($propertyPath)
{
View
42 src/Symfony/Component/PropertyAccess/PropertyPathBuilder.php
@@ -44,9 +44,9 @@ public function __construct(PropertyPathInterface $path = null)
/**
* Appends a (sub-) path to the current path.
*
- * @param PropertyPathInterface $path The path to append.
+ * @param PropertyPathInterface $path The path to append
* @param integer $offset The offset where the appended piece
- * starts in $path.
+ * starts in $path
* @param integer $length The length of the appended piece.
* If 0, the full path is appended.
*/
@@ -67,7 +67,7 @@ public function append(PropertyPathInterface $path, $offset = 0, $length = 0)
/**
* Appends an index element to the current path.
*
- * @param string $name The name of the appended index.
+ * @param string $name The name of the appended index
*/
public function appendIndex($name)
{
@@ -78,7 +78,7 @@ public function appendIndex($name)
/**
* Appends a property element to the current path.
*
- * @param string $name The name of the appended property.
+ * @param string $name The name of the appended property
*/
public function appendProperty($name)
{
@@ -89,8 +89,8 @@ public function appendProperty($name)
/**
* Removes elements from the current path.
*
- * @param integer $offset The offset at which to remove.
- * @param integer $length The length of the removed piece.
+ * @param integer $offset The offset at which to remove
+ * @param integer $length The length of the removed piece
*
* @throws OutOfBoundsException if offset is invalid
*/
@@ -106,15 +106,15 @@ public function remove($offset, $length = 1)
/**
* Replaces a sub-path by a different (sub-) path.
*
- * @param integer $offset The offset at which to replace.
- * @param integer $length The length of the piece to replace.
- * @param PropertyPathInterface $path The path to insert.
+ * @param integer $offset The offset at which to replace
+ * @param integer $length The length of the piece to replace
+ * @param PropertyPathInterface $path The path to insert
* @param integer $pathOffset The offset where the inserted piece
- * starts in $path.
+ * starts in $path
* @param integer $pathLength The length of the inserted piece.
* If 0, the full path is inserted.
*
- * @throws OutOfBoundsException If the offset is invalid.
+ * @throws OutOfBoundsException If the offset is invalid
*/
public function replace($offset, $length, PropertyPathInterface $path, $pathOffset = 0, $pathLength = 0)
{
@@ -137,10 +137,10 @@ public function replace($offset, $length, PropertyPathInterface $path, $pathOffs
/**
* Replaces a property element by an index element.
*
- * @param integer $offset The offset at which to replace.
+ * @param integer $offset The offset at which to replace
* @param string $name The new name of the element. Optional.
*
- * @throws OutOfBoundsException If the offset is invalid.
+ * @throws OutOfBoundsException If the offset is invalid
*/
public function replaceByIndex($offset, $name = null)
{
@@ -158,10 +158,10 @@ public function replaceByIndex($offset, $name = null)
/**
* Replaces an index element by a property element.
*
- * @param integer $offset The offset at which to replace.
+ * @param integer $offset The offset at which to replace
* @param string $name The new name of the element. Optional.
*
- * @throws OutOfBoundsException If the offset is invalid.
+ * @throws OutOfBoundsException If the offset is invalid
*/
public function replaceByProperty($offset, $name = null)
{
@@ -179,7 +179,7 @@ public function replaceByProperty($offset, $name = null)
/**
* Returns the length of the current path.
*
- * @return integer The path length.
+ * @return integer The path length
*/
public function getLength()
{
@@ -189,7 +189,7 @@ public function getLength()
/**
* Returns the current property path.
*
- * @return PropertyPathInterface The constructed property path.
+ * @return PropertyPathInterface The constructed property path
*/
public function getPropertyPath()
{
@@ -201,7 +201,7 @@ public function getPropertyPath()
/**
* Returns the current property path as string.
*
- * @return string The property path as string.
+ * @return string The property path as string
*/
public function __toString()
{
@@ -225,9 +225,9 @@ public function __toString()
* removed at $offset and another chunk of length $insertionLength
* can be inserted.
*
- * @param integer $offset The offset where the removed chunk starts.
- * @param integer $cutLength The length of the removed chunk.
- * @param integer $insertionLength The length of the inserted chunk.
+ * @param integer $offset The offset where the removed chunk starts
+ * @param integer $cutLength The length of the removed chunk
+ * @param integer $insertionLength The length of the inserted chunk
*/
private function resize($offset, $cutLength, $insertionLength)
{
View
12 src/Symfony/Component/PropertyAccess/PropertyPathInterface.php
@@ -21,14 +21,14 @@
/**
* Returns the string representation of the property path
*
- * @return string The path as string.
+ * @return string The path as string
*/
public function __toString();
/**
* Returns the length of the property path, i.e. the number of elements.
*
- * @return integer The path length.
+ * @return integer The path length
*/
public function getLength();
@@ -40,7 +40,7 @@ public function getLength();
*
* If this property path only contains one item, null is returned.
*
- * @return PropertyPath The parent path or null.
+ * @return PropertyPath The parent path or null
*/
public function getParent();
@@ -58,7 +58,7 @@ public function getElements();
*
* @return string A property or index name
*
- * @throws Exception\OutOfBoundsException If the offset is invalid.
+ * @throws Exception\OutOfBoundsException If the offset is invalid
*/
public function getElement($index);
@@ -69,7 +69,7 @@ public function getElement($index);
*
* @return Boolean Whether the element at this index is a property
*
- * @throws Exception\OutOfBoundsException If the offset is invalid.
+ * @throws Exception\OutOfBoundsException If the offset is invalid
*/
public function isProperty($index);
@@ -80,7 +80,7 @@ public function isProperty($index);
*
* @return Boolean Whether the element at this index is an array index
*
- * @throws Exception\OutOfBoundsException If the offset is invalid.
+ * @throws Exception\OutOfBoundsException If the offset is invalid
*/
public function isIndex($index);
}
Something went wrong with that request. Please try again.