Skip to content

Commit baa9759

Browse files
committed
bug #3791 Property access tweaks (weaverryan)
This PR was merged into the master branch. Discussion ---------- Property access tweaks | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.5+ | Fixed tickets | #3729 Hi guys! This follows after #3729 - it includes several small suggestions made by @wouterj and @xabbuh. Additionally, this removes the 3rd argument to `isWritable`, which was removed in the orignal PR (symfony/symfony#10570) and didn't make it into the final feature. Thanks! Commits ------- fb9fe99 [#3729] Removing 3rd argument to isWritable - this doesn't exist in the final merged item 319bf29 [#3729] Making minor changes thansk to @wouterj and @xabbuh.
2 parents d6474fc + fb9fe99 commit baa9759

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: components/property_access/introduction.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,13 @@ Checking Property Paths
314314

315315
.. versionadded:: 2.5
316316
The methods
317-
:method:`PropertyAccessor::isReadable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
317+
:method:`PropertyAccessor::isReadable <Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
318318
and
319-
:method:`PropertyAccessor::isWritable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
320-
methods were added in Symfony 2.5.
319+
:method:`PropertyAccessor::isWritable <Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
320+
methods were introduced in Symfony 2.5.
321321

322-
When you want to check whether :method:`PropertyAccessor::getValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue>`
322+
When you want to check whether
323+
:method:`PropertyAccessor::getValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::getValue>`
323324
can safely be called without actually calling that method, you can use
324325
:method:`PropertyAccessor::isReadable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isReadable>`
325326
instead::
@@ -333,12 +334,11 @@ instead::
333334
The same is possible for :method:`PropertyAccessor::setValue<Symfony\\Component\\PropertyAccess\\PropertyAccessor::setValue>`:
334335
Call the
335336
:method:`PropertyAccessor::isWritable<Symfony\\Component\\PropertyAccess\\PropertyAccessor::isWritable>`
336-
method to find out whether a property path can be updated. In the third
337-
argument, you should pass the value that you want to write::
337+
method to find out whether a property path can be updated::
338338

339339
$person = new Person();
340340

341-
if ($accessor->isWritable($person, 'firstName', 'Wouter') {
341+
if ($accessor->isWritable($person, 'firstName') {
342342
// ...
343343
}
344344

0 commit comments

Comments
 (0)