GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( ee75bb...4e2b38 )
by Carlos
11:23
created
src/Pinyin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
             ->noPunctuation()
56 56
             ->when($asName, fn ($c) => $c->asSurname())
57 57
             ->convert($string)
58
-            ->map(function ($pinyin) {
58
+            ->map(function($pinyin) {
59 59
                 // 常用于电影名称入库索引处理,例如:《晚娘2012》-> WN2012
60 60
                 return \is_numeric($pinyin) || preg_match('/\d{2,}/', $pinyin) ? $pinyin : \mb_substr($pinyin, 0, 1);
61 61
             });
Please login to merge, or discard this patch.
src/Converter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@  discard block
 block discarded – undo
5 5
 class Converter
6 6
 {
7 7
     private const SEGMENTS_COUNT = 10;
8
-    private const WORDS_PATH = __DIR__.'/../data/words-%s.php';
9
-    private const CHARS_PATH = __DIR__.'/../data/chars.php';
10
-    private const CHARS_WITH_POLYPHONES_PATH = __DIR__.'/../data/chars-with-polyphones.php';
11
-    private const SURNAMES_PATH = __DIR__.'/../data/surnames.php';
8
+    private const WORDS_PATH = __DIR__ . '/../data/words-%s.php';
9
+    private const CHARS_PATH = __DIR__ . '/../data/chars.php';
10
+    private const CHARS_WITH_POLYPHONES_PATH = __DIR__ . '/../data/chars-with-polyphones.php';
11
+    private const SURNAMES_PATH = __DIR__ . '/../data/surnames.php';
12 12
 
13 13
     public const TONE_STYLE_DEFAULT = 'default';
14 14
     public const TONE_STYLE_NUMBER = 'number';
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function convert(string $string, callable $beforeSplit = null): Collection
136 136
     {
137 137
         // 把原有的数字和汉字分离,避免拼音转换时被误作声调
138
-        $string = preg_replace_callback('~[a-z0-9_-]+~i', function ($matches) {
138
+        $string = preg_replace_callback('~[a-z0-9_-]+~i', function($matches) {
139 139
             return "\t" . $matches[0];
140 140
         }, $string);
141 141
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     protected function convertAsPolyphonic(string $string): Collection
163 163
     {
164 164
         // split string as chinese chars
165
-        $chars = \preg_split('~['.$this->regexps['hans'].']~u', $string);
165
+        $chars = \preg_split('~[' . $this->regexps['hans'] . ']~u', $string);
166 166
 
167 167
         $string = \strtr($string, require self::CHARS_WITH_POLYPHONES_PATH);
168 168
 
Please login to merge, or discard this patch.