Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3e518b

Browse filesBrowse files
committed
minor #52619 [Notifier][PropertyInfo][VarDumper] Remove unused code (alamirault)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- [Notifier][PropertyInfo][VarDumper] Remove unused code | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT Remove unused code Commits ------- c25ec99 [Notifier][PropertyInfo][VarDumper] Remove unused code
2 parents 67f3809 + c25ec99 commit e3e518b
Copy full SHA for e3e518b

File tree

6 files changed

+5
-28
lines changed
Filter options

6 files changed

+5
-28
lines changed

‎src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Mercure/MercureTransport.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(
4949

5050
public function __toString(): string
5151
{
52-
return sprintf('mercure://%s%s', $this->hubId, null !== $this->topics ? '?'.http_build_query(['topic' => $this->topics], '', '&') : '');
52+
return sprintf('mercure://%s%s', $this->hubId, '?'.http_build_query(['topic' => $this->topics], '', '&'));
5353
}
5454

5555
public function supports(MessageInterface $message): bool

‎src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Notifier/Bridge/Telnyx/TelnyxTransport.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected function doSend(MessageInterface $message): SentMessage
6565
if (!preg_match('/^[+]+[1-9][0-9]{9,14}$/', $from)) {
6666
if ('' === $from) {
6767
throw new IncompleteDsnException('This phone number is invalid.');
68-
} elseif ('' !== $from && null === $this->messagingProfileId) {
68+
} elseif (null === $this->messagingProfileId) {
6969
throw new IncompleteDsnException('The sending messaging profile must be specified.');
7070
}
7171

‎src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ private function getPropertyName(string $methodName, array $reflectionProperties
688688
*/
689689
private function findAdderAndRemover(\ReflectionClass $reflClass, array $singulars): array
690690
{
691-
if (!\is_array($this->arrayMutatorPrefixes) && 2 !== \count($this->arrayMutatorPrefixes)) {
691+
if (2 !== \count($this->arrayMutatorPrefixes)) {
692692
return [null, null, []];
693693
}
694694

‎src/Symfony/Component/PropertyInfo/PhpStan/NameScope.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/PropertyInfo/PhpStan/NameScope.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ public function resolveStringName(string $name): string
5151
return sprintf('%s\\%s', $this->uses[$firstNamePart], implode('\\', $nameParts));
5252
}
5353

54-
if (null !== $this->namespace) {
55-
return sprintf('%s\\%s', $this->namespace, $name);
56-
}
57-
58-
return $name;
54+
return sprintf('%s\\%s', $this->namespace, $name);
5955
}
6056

6157
public function resolveRootClass(): string

‎src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function castType(\ReflectionType $c, array $a, Stub $stub, bool $
9898

9999
if ($c instanceof \ReflectionNamedType) {
100100
$a += [
101-
$prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c,
101+
$prefix.'name' => $c->getName(),
102102
$prefix.'allowsNull' => $c->allowsNull(),
103103
$prefix.'isBuiltin' => $c->isBuiltin(),
104104
];

‎src/Symfony/Component/VarDumper/Cloner/VarCloner.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Cloner/VarCloner.php
-19Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ protected function doClone(mixed $var): array
4242

4343
$arrayStub = new Stub();
4444
$arrayStub->type = Stub::TYPE_ARRAY;
45-
$fromObjCast = false;
4645

4746
for ($i = 0; $i < $len; ++$i) {
4847
// Detect when we move on to the next tree depth
@@ -213,24 +212,6 @@ protected function doClone(mixed $var): array
213212
}
214213
}
215214

216-
if ($fromObjCast) {
217-
$fromObjCast = false;
218-
$refs = $vals;
219-
$vals = [];
220-
$j = -1;
221-
foreach ($queue[$i] as $k => $v) {
222-
foreach ([$k => true] as $gk => $gv) {
223-
}
224-
if ($gk !== $k) {
225-
$vals = (object) $vals;
226-
$vals->{$k} = $refs[++$j];
227-
$vals = (array) $vals;
228-
} else {
229-
$vals[$k] = $refs[++$j];
230-
}
231-
}
232-
}
233-
234215
$queue[$i] = $vals;
235216
}
236217

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.