|
@@ -1,4 +1,4 @@ discard block |
|
|
block discarded – undo |
|
1
|
|
-<?php declare(strict_types=1); |
|
|
1
|
+<?php declare(strict_types = 1); |
|
2
|
2
|
|
|
3
|
3
|
namespace Coderabbi\Phpumoji; |
|
4
|
4
|
|
|
@@ -17,8 +17,8 @@ discard block |
|
|
block discarded – undo |
|
17
|
17
|
|
|
18
|
18
|
$emojiset = $phpunit->hasAttribute('emojiset') ? $phpunit->getAttribute('emojiset') : 'phpumoji'; |
|
19
|
19
|
|
|
20
|
|
- $emojifile = array_merge(parse_ini_file(__DIR__ . '/../config/.emojifile', true), file_exists(substr($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], 0, strrpos($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], '/')) . '/.emojifile') ? |
|
21
|
|
- parse_ini_file(substr($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], 0, strrpos($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], '/')) . '/.emojifile', true) : []); |
|
|
20
|
+ $emojifile = array_merge(parse_ini_file(__DIR__.'/../config/.emojifile', true), file_exists(substr($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], 0, strrpos($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], '/')).'/.emojifile') ? |
|
|
21
|
+ parse_ini_file(substr($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], 0, strrpos($GLOBALS['__PHPUNIT_CONFIGURATION_FILE'], '/')).'/.emojifile', true) : []); |
|
22
|
22
|
|
|
23
|
23
|
$this->emojis = $emojifile[$emojiset] ?? $emojifile['phpumoji']; |
|
24
|
24
|
|
|
@@ -43,8 +43,8 @@ discard block |
|
|
block discarded – undo |
|
43
|
43
|
|
|
44
|
44
|
private function emojify(string $progress) :string |
|
45
|
45
|
{ |
|
46
|
|
- return LitEmoji::encodeUnicode(':' . (array_values(array_filter($this->emojis, function ($key) use ($progress) { |
|
|
46
|
+ return LitEmoji::encodeUnicode(':'.(array_values(array_filter($this->emojis, function($key) use ($progress) { |
|
47
|
47
|
return strrpos(strtoupper($key), $progress) === 0; |
|
48
|
|
- }, ARRAY_FILTER_USE_KEY))[0] ?? $this->emojis['pass']) . ': ') ; |
|
|
48
|
+ }, ARRAY_FILTER_USE_KEY))[0] ?? $this->emojis['pass']).': '); |
|
49
|
49
|
} |
|
50
|
50
|
} |