File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323 },
2424 "require-dev" : {
2525 "mediawiki/mediawiki-codesniffer" : " 41.0.0" ,
26- "mediawiki/mediawiki-phan-config" : " 0.12.1 " ,
26+ "mediawiki/mediawiki-phan-config" : " 0.14.0 " ,
2727 "mediawiki/minus-x" : " 1.1.1" ,
2828 "ockcyp/covers-validator" : " 1.6.0" ,
2929 "php-parallel-lint/php-console-highlighter" : " 1.0.0" ,
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ public function setWordSeparator( $wordSeparator ) {
163163 * @param string|array $dirs
164164 */
165165 public function __construct ( $ dirs = [] ) {
166- if ( empty ( $ dirs ) ) {
166+ if ( ! $ dirs ) {
167167 $ dirs = [ dirname ( __DIR__ ) . "/LM " ];
168168 }
169169 if ( !is_array ( $ dirs ) ) {
@@ -192,7 +192,7 @@ public function __construct( $dirs = [] ) {
192192 public function createLM ( $ text , $ maxNgrams ) {
193193 $ ngram = [];
194194 foreach ( preg_split ( "/[ {$ this ->wordSeparator }]+/u " , $ text ) as $ word ) {
195- if ( empty ( $ word ) ) {
195+ if ( ! $ word ) {
196196 continue ;
197197 }
198198 $ word = "_ " . $ word . "_ " ;
You can’t perform that action at this time.
0 commit comments