Skip to content

Commit b794c18

Browse files
author
Romain Monteil
committed
Fix CS
1 parent bdf65ab commit b794c18

32 files changed

+14
-423
lines changed

Catalogue/CatalogueCounter.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
*/
2323
class CatalogueCounter
2424
{
25-
/**
26-
* @return int
27-
*/
2825
public function getNumberOfDefinedMessages(MessageCatalogueInterface $catalogue): int
2926
{
3027
$total = 0;
@@ -35,9 +32,6 @@ public function getNumberOfDefinedMessages(MessageCatalogueInterface $catalogue)
3532
return $total;
3633
}
3734

38-
/**
39-
* @return array
40-
*/
4135
public function getCatalogueStatistics(MessageCatalogueInterface $catalogue): array
4236
{
4337
$result = [];

Catalogue/CatalogueFetcher.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ public function __construct($reader)
4848

4949
/**
5050
* load any existing messages from the translation files.
51-
*
52-
* @return MessageCatalogue[]
5351
*/
5452
public function getCatalogues(Configuration $config, array $locales = []): array
5553
{
@@ -80,11 +78,6 @@ public function getCatalogues(Configuration $config, array $locales = []): array
8078
return $catalogues;
8179
}
8280

83-
/**
84-
* @param string $domain
85-
*
86-
* @return bool
87-
*/
8881
private function isValidDomain(Configuration $config, string $domain): bool
8982
{
9083
$blacklist = $config->getBlacklistDomains();

Catalogue/CatalogueManager.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ public function load(array $catalogues): void
3939
}
4040
}
4141

42-
/**
43-
* @return array
44-
*/
4542
public function getDomains(): array
4643
{
4744
/** @var MessageCatalogueInterface $c */
@@ -51,9 +48,6 @@ public function getDomains(): array
5148
}
5249

5350
/**
54-
* @param string $locale
55-
* @param string $domain
56-
*
5751
* @return CatalogueMessage[]
5852
*/
5953
public function getMessages(string $locale, string $domain): array
@@ -132,10 +126,8 @@ public function findMessages(array $config = []): array
132126
/**
133127
* @param string $domain
134128
* @param string $key
135-
*
136-
* @return array
137129
*/
138-
public function getTranslations($domain, $key)
130+
public function getTranslations($domain, $key): array
139131
{
140132
$translations = [];
141133
foreach ($this->catalogues as $locale => $catalogue) {
@@ -147,14 +139,6 @@ public function getTranslations($domain, $key)
147139
return $translations;
148140
}
149141

150-
/**
151-
* @param $locale
152-
* @param $domain
153-
* @param $key
154-
* @param $text
155-
*
156-
* @return CatalogueMessage
157-
*/
158142
private function createMessage(MessageCatalogueInterface $catalogue, string $locale, string $domain, string $key, string $text): CatalogueMessage
159143
{
160144
$catalogueMessage = new CatalogueMessage($this, $locale, $domain, $key, $text);

Catalogue/CatalogueWriter.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ final class CatalogueWriter
3636
*/
3737
private $defaultLocale;
3838

39-
/**
40-
* @param string $defaultLocale
41-
*/
42-
public function __construct(TranslationWriter $writer, $defaultLocale)
39+
public function __construct(TranslationWriter $writer, string $defaultLocale)
4340
{
4441
if (!$writer instanceof TranslationWriterInterface) {
4542
$writer = new LegacyTranslationWriter($writer);

Catalogue/Operation/ReplaceOperation.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ protected function processDomain($domain): void
9797

9898
/**
9999
* @param MessageCatalogueInterface|MetadataAwareInterface $catalogue
100-
* @param string $domain
101-
* @param string $key
100+
*
102101
* @return array|string|mixed|null Can return anything..
103102
*/
104103
private function getMetadata($catalogue, string $domain, string $key = '')
@@ -110,12 +109,6 @@ private function getMetadata($catalogue, string $domain, string $key = '')
110109
return $catalogue->getMetadata($key, $domain);
111110
}
112111

113-
/**
114-
* @param array|null $source
115-
* @param array|null $target
116-
*
117-
* @return array
118-
*/
119112
private function mergeMetadata(?array $source, ?array $target): array
120113
{
121114
if (empty($source) && empty($target)) {

Command/BundleTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ trait BundleTrait
2020
private function configureBundleDirs(InputInterface $input, Configuration $config): void
2121
{
2222
if ($bundleName = $input->getOption('bundle')) {
23-
if (strpos($bundleName, '@') === 0) {
23+
if (0 === \strpos($bundleName, '@')) {
2424
if (false === $pos = \strpos($bundleName, '/')) {
2525
$bundleName = \substr($bundleName, 1);
2626
} else {

Command/DownloadCommand.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
8989
}
9090

9191
/**
92-
* @param string $directory
93-
*
9492
* @return bool|string
9593
*/
9694
private function hashDirectory(string $directory)

Command/ExtractCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ protected function execute(InputInterface $input, OutputInterface $output): void
136136
}
137137
}
138138

139-
/**
140-
* @return Finder
141-
*/
142139
private function getConfiguredFinder(Configuration $config): Finder
143140
{
144141
$finder = new Finder();

Command/StorageTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ trait StorageTrait
2424
/**
2525
* @param string|string[]|null $configName
2626
*
27-
* @return \Translation\Bundle\Service\StorageService
28-
*
2927
* @throws \InvalidArgumentException
3028
*/
3129
private function getStorage($configName): StorageService

Controller/EditInPlaceController.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@
2424
*/
2525
class EditInPlaceController extends Controller
2626
{
27-
/**
28-
* @param string $configName
29-
* @param string $locale
30-
*
31-
* @return Response
32-
*/
3327
public function editAction(Request $request, string $configName, string $locale): Response
3428
{
3529
try {
@@ -53,8 +47,6 @@ public function editAction(Request $request, string $configName, string $locale)
5347
/**
5448
* Get and validate messages from the request.
5549
*
56-
* @param string $locale
57-
*
5850
* @return MessageInterface[]
5951
*
6052
* @throws MessageValidationException
@@ -67,7 +59,7 @@ private function getMessages(Request $request, string $locale, array $validation
6759
$validator = $this->get('validator');
6860

6961
foreach ($data as $key => $value) {
70-
list($domain, $translationKey) = \explode('|', $key);
62+
[$domain, $translationKey] = \explode('|', $key);
7163

7264
$message = new Message($translationKey, $domain, $locale, $value);
7365

0 commit comments

Comments
 (0)