Skip to content

Commit e5db652

Browse files
chore: code style fixes
1 parent 760f14b commit e5db652

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

examples/tokenization_overview.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
* Run with:
1717
* php examples/tokenization_overview.php
1818
*/
19-
2019
$models = [
2120
'BERT (uncased)' => 'google-bert/bert-base-uncased',
22-
'GPT-2' => 'openai-community/gpt2',
23-
'Qwen3 Embedding' => 'Qwen/Qwen3-Embedding-0.6B',
21+
'GPT-2' => 'openai-community/gpt2',
22+
'Qwen3 Embedding' => 'Qwen/Qwen3-Embedding-0.6B',
2423
];
2524

2625
$samples = [
2726
'Short sentence' => 'Hello, how are you doing today?',
28-
'Code snippet' => 'function sum(int $a, int $b): int { return $a + $b; }',
29-
'Mixed content' => 'Paris is the capital of France. 42 🧠',
27+
'Code snippet' => 'function sum(int $a, int $b): int { return $a + $b; }',
28+
'Mixed content' => 'Paris is the capital of France. 42 🧠',
3029
];
3130

3231
echo "=== Tokenizers PHP - Tokenization Overview ===\n\n";
@@ -43,7 +42,7 @@
4342
$ids = $encoding->ids;
4443
$tokens = $encoding->tokens;
4544

46-
$count = \count($ids);
45+
$count = count($ids);
4746
$idsPreview = implode(', ', array_slice($ids, 0, 10));
4847
$tokensPreview = implode(' ', array_slice($tokens, 0, 10));
4948

@@ -56,4 +55,3 @@
5655

5756
echo str_repeat('-', 60)."\n\n";
5857
}
59-

src/Loaders/HubLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function load(string ...$source): array
4242

4343
$repo = $hf->hub()
4444
->repo($modelId)
45-
->revision($this->revision);
45+
->revision($this->revision)
46+
;
4647

4748
$repo->snapshot(
4849
allowPatterns: self::TOKENIZER_FILES,

0 commit comments

Comments
 (0)