Skip to content

Commit 6e6ff7d

Browse files
authored
Merge pull request #21 from pug-php/refactor
Refactor
2 parents d50fcb4 + aefcf49 commit 6e6ff7d

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

.codeclimate.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,8 @@ engines:
1616
enabled: false
1717
Design/EvalExpression:
1818
enabled: false
19-
Controversial/CamelCaseMethodName:
20-
enabled: true
21-
exclude_paths:
22-
- "src/JsPhpize/Stream"
23-
exclude_fingerprints:
24-
# Allow 'is' method
25-
- ace61d689ad3cd8ba10c4f88c6d33768
26-
# Allow eval in unit tests
27-
- a766751f59d0dda7f074443addea8e6f
19+
exclude_paths:
20+
- "src/JsPhpize/Stream/"
2821
ratings:
2922
paths:
3023
- "**.php"

src/JsPhpize/Lexer/Pattern.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function __construct($priority, $type, $patterns, $notInsideAWord = false
2525
{
2626
$this->priority = $priority;
2727
$this->type = $type;
28-
$this->regex = is_array($patterns) ?
29-
implode('|', array_map(function ($pattern) {
28+
$this->regex = is_array($patterns)
29+
? implode('|', array_map(function ($pattern) {
3030
return preg_quote($pattern, '/');
31-
}, $patterns)) :
32-
$patterns;
31+
}, $patterns))
32+
: $patterns;
3333
$exception = false;
3434
if ($notInsideAWord !== false) {
3535
$exception = 'a-zA-Z0-9\\\\_\\x7f-\\xff';

0 commit comments

Comments
 (0)