8000 CS: remove unneeded parentheses around control statements · symfony/symfony@45d250d · GitHub
[go: up one dir, main page]

Skip to content

Commit 45d250d

Browse files
committed
CS: remove unneeded parentheses around control statements
1 parent d9b8d0c commit 45d250d

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

src/Symfony/Bridge/Doctrine/Form/ChoiceList/ORMQueryBuilderLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getEntities()
7676
*/
7777
public function getEntitiesByIds($identifier, array $values)
7878
{
79-
$qb = clone ($this->queryBuilder);
79+
$qb = clone $this->queryBuilder;
8080
$alias = current($qb->getRootAliases());
8181
$parameter = 'ORMQueryBuilderLoader_getEntitiesByIds_'.$identifier;
8282
$where = $qb->expr()->in($alias.'.'.$identifier, ':'.$parameter);

src/Symfony/Component/Filesystem/Filesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,13 +428,13 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
428428
*/
429429
public function isAbsolutePath($file)
430430
{
431-
return (strspn($file, '/\\', 0, 1)
431+
return strspn($file, '/\\', 0, 1)
432432
|| (strlen($file) > 3 && ctype_alpha($file[0])
433433
&& substr($file, 1, 1) === ':'
434434
&& (strspn($file, '/\\', 2, 1))
435435
)
436436
|| null !== parse_url($file, PHP_URL_SCHEME)
437-
);
437+
;
438438
}
439439

440440
/**

src/Symfony/Component/Finder/Iterator/SortableIterator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public function __construct(\Traversable $iterator, $sort)
5555
};
5656
} elseif (self::SORT_BY_ACCESSED_TIME === $sort) {
5757
$this->sort = function ($a, $b) {
58-
return ($a->getATime() - $b->getATime());
58+
return $a->getATime() - $b->getATime();
5959
};
6060
} elseif (self::SORT_BY_CHANGED_TIME === $sort) {
6161
$this->sort = function ($a, $b) {
62-
return ($a->getCTime() - $b->getCTime());
62+
return $a->getCTime() - $b->getCTime();
6363
};
6464
} elseif (self::SORT_BY_MODIFIED_TIME === $sort) {
6565
$this->sort = function ($a, $b) {
66-
return ($a->getMTime() - $b->getMTime());
66+
return $a->getMTime() - $b->getMTime();
6767
};
6868
} elseif (is_callable($sort)) {
6969
$this->sort = $sort;

src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function getSaveHandlerName()
5252
*/
5353
public function isSessionHandlerInterface()
5454
{
55-
return ($this instanceof \SessionHandlerInterface);
55+
return $this instanceof \SessionHandlerInterface;
5656
}
5757

5858
/**

src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function getReverseMatchingRegExp($pattern)
214214
*/
215215
public function isQuoteMatch($quoteMatch)
216216
{
217-
return ("'" === $quoteMatch[0]);
217+
return "'" === $quoteMatch[0];
218218
}
219219

220220
/**

src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ private function supports($class)
242242
*/
243243
private function isGetMethod(\ReflectionMethod $method)
244244
{
245-
return (
245+
return
246246
0 === strpos($method->name, 'get') &&
247247
3 < strlen($method->name) &&
248248
0 === $method->getNumberOfRequiredParameters()
249-
);
249+
;
250250
}
251251
}

src/Symfony/Component/Yaml/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,6 @@ private function isNextLineUnIndentedCollection()
670670
*/
671671
private function isStringUnIndentedCollectionItem()
672672
{
673-
return (0 === strpos($this->currentLine, '- '));
673+
return 0 === strpos($this->currentLine, '- ');
674674
}
675675
}

0 commit comments

Comments
 (0)
0