Skip to content

Commit

Permalink
minor #57868 Remove useless code (alexandre-daubois)
Browse files Browse the repository at this point in the history
This PR was merged into the 7.2 branch.

Discussion
----------

Remove useless code

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | -
| License       | MIT

I went through the remaining components and bundles, following my last PRs of this kind.

Commits
-------

58941cec67 Remove useless code
  • Loading branch information
nicolas-grekas committed Aug 12, 2024
2 parents 0dd8b0c + fa29121 commit 6b3d6c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Tests/Transport/DoctrineReceiverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,8 @@ private function createDoctrineEnvelope(): array

private function createSerializer(): Serializer
{
$serializer = new Serializer(
return new Serializer(
new SerializerComponent\Serializer([new ObjectNormalizer()], ['json' => new JsonEncoder()])
);

return $serializer;
}
}
2 changes: 1 addition & 1 deletion Transport/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function get(): ?array
if (method_exists(QueryBuilder::class, 'forUpdate')) {
$sql = $this->addLockMode($query, $sql);
} else {
if (preg_match('/FROM (.+) WHERE/', (string) $sql, $matches)) {
if (preg_match('/FROM (.+) WHERE/', $sql, $matches)) {
$fromClause = $matches[1];
$sql = str_replace(
\sprintf('FROM %s WHERE', $fromClause),
Expand Down

0 comments on commit 6b3d6c6

Please sign in to comment.