Skip to content

Commit 8c75b86

Browse files
Merge branch '4.4' into 5.2
* 4.4: [Contracts] Add missing `@return` annotations [FrameworkBundle] Fixed file operations in Sodium vault seal
2 parents 6c26499 + bafecf2 commit 8c75b86

File tree

7 files changed

+16
-3
lines changed

7 files changed

+16
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function seal(string $name, string $value): void
9090
$list = $this->list();
9191
$list[$name] = null;
9292
uksort($list, 'strnatcmp');
93-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
93+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
9494

9595
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
9696
}
@@ -142,7 +142,7 @@ public function remove(string $name): bool
142142

143143
$list = $this->list();
144144
unset($list[$name]);
145-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
145+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
146146

147147
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
148148

src/Symfony/Contracts/Cache/CacheTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ trait CacheTrait
2727
{
2828
/**
2929
* {@inheritdoc}
30+
*
31+
* @return mixed
3032
*/
3133
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
3234
{

src/Symfony/Contracts/HttpClient/Test/TestHttpServer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class TestHttpServer
1818
{
1919
private static $process = [];
2020

21+
/**
22+
* @return Process
23+
*/
2124
public static function start(int $port = 8057)
2225
{
2326
if (isset(self::$process[$port])) {

src/Symfony/Contracts/Service/ServiceSubscriberTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public static function getSubscribedServices(): array
5252

5353
/**
5454
* @required
55+
*
56+
* @return ContainerInterface|null
5557
*/
5658
public function setContainer(ContainerInterface $container)
5759
{

src/Symfony/Contracts/Service/Test/ServiceLocatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
abstract class ServiceLocatorTest extends TestCase
1919
{
20+
/**
21+
* @return ContainerInterface
22+
*/
2023
protected function getServiceLocator(array $factories)
2124
{
2225
return new class($factories) implements ContainerInterface {

src/Symfony/Contracts/Tests/Service/ServiceSubscriberTraitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function aParentService(): Service1
4242
{
4343
}
4444

45-
public function setContainer(ContainerInterface $container)
45+
public function setContainer(ContainerInterface $container): ContainerInterface
4646
{
4747
return $container;
4848
}

src/Symfony/Contracts/Translation/Test/TranslatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ protected function tearDown(): void
4343
\Locale::setDefault($this->defaultLocale);
4444
}
4545

46+
/**
47+
* @return TranslatorInterface
48+
*/
4649
public function getTranslator()
4750
{
4851
return new class() implements TranslatorInterface {

0 commit comments

Comments
 (0)