Skip to content

Commit 6346e06

Browse files
committed
Unused variables
1 parent fedc4a5 commit 6346e06

6 files changed

+6
-11
lines changed

classes/font_binary_stream.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public function w($type, $data) {
350350
* Converts a Uint32 value to string
351351
*
352352
* @param int $uint32
353-
* @param string The string
353+
* @return string The string
354354
*/
355355
public function convertUInt32ToStr($uint32) {
356356
return chr(($uint32 >> 24) & 0xFF).chr(($uint32 >> 16) & 0xFF).chr(($uint32 >> 8) & 0xFF).chr($uint32 & 0xFF);

classes/font_table_kern.cls.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ class Font_Table_kern extends Font_Table {
1616
protected function _parse(){
1717
$font = $this->getFont();
1818

19-
$tableOffset = $font->pos();
20-
2119
$data = $font->unpack(array(
2220
"version" => self::uint16,
2321
"nTables" => self::uint16,

classes/font_table_name.cls.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class Font_Table_name extends Font_Table {
2323

2424
protected function _parse(){
2525
$font = $this->getFont();
26-
$data = array();
2726

2827
$tableOffset = $font->pos();
2928

@@ -60,12 +59,8 @@ protected function _encode(){
6059
$this->data["count"] = $count_records;
6160
$this->data["stringOffset"] = 6 + $count_records * 12; // 6 => uint16 * 3, 12 => sizeof self::$record_format
6261

63-
$tableOffset = $font->pos();
64-
6562
$length = $font->pack(self::$header_format, $this->data);
6663

67-
$recordsOffset = $font->pos();
68-
6964
$offset = 0;
7065
foreach($records as $record) {
7166
$record->length = mb_strlen($record->getUTF16(), "8bit");

classes/font_truetype.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ function encode($tags = array()){
406406
$this->seek($offset);
407407

408408
$i = 0;
409-
foreach($entries as $tag => $entry) {
409+
foreach($entries as $entry) {
410410
$entry->encode($directory_offset + $i * $n);
411411
$i++;
412412
}

classes/font_truetype_collection.cls.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ function parse(){
3333
return;
3434
}
3535

36-
$tag = $this->read(4);
36+
$this->read(4); // tag name
3737

3838
$this->version = $this->readFixed();
3939
$this->numFonts = $this->readUInt32();
4040

41-
for($i = 0; $i < $this->numFonts; $i++) {
41+
for ($i = 0; $i < $this->numFonts; $i++) {
4242
$this->collectionOffsets[] = $this->readUInt32();
4343
}
4444
}

classes/font_woff_table_directory_entry.cls.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* @package php-font-lib
1616
*/
1717
class Font_WOFF_Table_Directory_Entry extends Font_Table_Directory_Entry {
18+
protected $origLength;
19+
1820
function __construct(Font_WOFF $font) {
1921
parent::__construct($font);
2022
}

0 commit comments

Comments
 (0)