Skip to content

Commit 3191fca

Browse files
carusogabrielFrederic Delaunay
authored and
Frederic Delaunay
committed
Simplify returns
1 parent 197b5eb commit 3191fca

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/PhpSpreadsheet/Shared/TimeZone.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ class TimeZone
2323
*/
2424
private static function validateTimeZone($timezone)
2525
{
26-
if (in_array($timezone, DateTimeZone::listIdentifiers())) {
27-
return true;
28-
}
29-
30-
return false;
26+
return in_array($timezone, DateTimeZone::listIdentifiers());
3127
}
3228

3329
/**

src/PhpSpreadsheet/Worksheet/Worksheet.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -1469,11 +1469,7 @@ public function getConditionalStyles($pCoordinate)
14691469
*/
14701470
public function conditionalStylesExists($pCoordinate)
14711471
{
1472-
if (isset($this->conditionalStylesCollection[strtoupper($pCoordinate)])) {
1473-
return true;
1474-
}
1475-
1476-
return false;
1472+
return isset($this->conditionalStylesCollection[strtoupper($pCoordinate)]);
14771473
}
14781474

14791475
/**

0 commit comments

Comments
 (0)