Fix existing inline PHP snippets#3206
Conversation
|
Preview of modified files: Too many files modified in a single PR, preview link list is skipped. (298 files > 150) |
|
| ```php | ||
| use Symfony\Component\HttpFoundation\Request; | ||
|
|
||
| /** @var \Symfony\Component\HttpFoundation\Request $request */ |
There was a problem hiding this comment.
@mnocon sorry, but i totally missed that you pinged me here a while ago.
Change looks good to me but I am not 100% sure - so would prefer getting approval from @ibexa/php-dev .
There was a problem hiding this comment.
I checked that and can confirm it is a secure 1:1 replacement 👍
1bff95b to
5150030
Compare
4e0bcb5 to
02b34ef
Compare
02b34ef to
c72a5c4
Compare
4806847 to
6fcae4d
Compare
Summary
|
| /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ | ||
| /** @var int $versionFromId */ | ||
| /** @var int $versionToId */ | ||
| /** @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ | ||
| /** @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface $comparisonService */ |
There was a problem hiding this comment.
It's OK for two lines but here…
| /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ | |
| /** @var int $versionFromId */ | |
| /** @var int $versionToId */ | |
| /** @var \Ibexa\Contracts\Core\Repository\ContentService $contentService */ | |
| /** @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface $comparisonService */ | |
| /** | |
| * @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo | |
| * @var int $versionFromId | |
| * @var int $versionToId | |
| * @var \Ibexa\Contracts\Core\Repository\ContentService $contentService | |
| * @var \Ibexa\Contracts\VersionComparison\Service\VersionComparisonServiceInterface | |
| */ |
There was a problem hiding this comment.
Modified for all entries where there is more than a single line, to make it unified:
0c7bbb0
I've checked and there's no hl_lines usage, no need to adjust that
code_samples/ change report
|
adriendupuis
left a comment
There was a problem hiding this comment.
I would only simplify use Ibexa\Core\FieldType\Url as Url; and keep the rest for another time.
|
|
||
| // Instantiates a checkbox value with a default state (false) | ||
| $checkboxValue = new Checkbox\Value(); | ||
| $checkboxValue = new Value(); |
There was a problem hiding this comment.
I prefer the original Checkbox\Value (like previously in $authorList = new Author\Value)
use Ibexa\Core\FieldType\Checkbox
// Instantiates a checkbox value with a default state (false)
$checkboxValue = new Checkbox\Value();Afterward, there were some wrong new Type\Value that might be a reminiscence of this preference but with a bad copy-pasting spreading the wrong use …\Type without understanding.
|
|
||
| use Ibexa\Core\FieldType\DateAndTime\Type; | ||
|
|
||
| $settings = [ |
There was a problem hiding this comment.
Side-note: How this $settings is supposed to be used? It's like the example stop too soon.
| ``` php {skip-validation} | ||
| ``` php | ||
| // Constructor example | ||
| use Ibexa\Core\FieldType\Url as Url; |
There was a problem hiding this comment.
Url as Url?
| use Ibexa\Core\FieldType\Url as Url; | |
| use Ibexa\Core\FieldType\Url; |



This PR fixes the existing inlined PHP code samples, using the following tools: