Skip to content

Commit d876a5d

Browse files
authored
Merge pull request #183 from carusogabriel/simplify-returns
Simplify returns
2 parents 08a033e + eca206a commit d876a5d

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/PHPCR/Util/Console/Command/NodeTypeRegisterCommand.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ protected function getFilePaths($definitions)
167167

168168
protected function fileIsNodeType($filename)
169169
{
170-
if (substr($filename, -4) === '.cnd') {
171-
return true;
172-
}
173-
174-
return false;
170+
return substr($filename, -4) === '.cnd';
175171
}
176172
}

src/PHPCR/Util/UUIDHelper.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ class UUIDHelper
2222
public static function isUUID($id)
2323
{
2424
// UUID is HEX_CHAR{8}-HEX_CHAR{4}-HEX_CHAR{4}-HEX_CHAR{4}-HEX_CHAR{12}
25-
if (1 === preg_match('/^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$/', $id)) {
26-
return true;
27-
}
28-
29-
return false;
25+
return 1 === preg_match('/^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$/', $id);
3026
}
3127

3228
/**

0 commit comments

Comments
 (0)