Test Failed
Push — pr/257 ( 57d61f )
by Konrad
05:10 queued 13s
created

WinAnsiEncoding::getTranslations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 33
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 30
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 33
rs 9.44
1
<?php
2
3
/**
4
 * @file
5
 *          This file is part of the PdfParser library.
6
 *
7
 * @author  Sébastien MALOT <[email protected]>
8
 * @date    2017-01-03
9
 *
10
 * @license LGPLv3
11
 * @url     <https://github.com/smalot/pdfparser>
12
 *
13
 *  PdfParser is a pdf library written in PHP, extraction oriented.
14
 *  Copyright (C) 2017 - Sébastien MALOT <[email protected]>
15
 *
16
 *  This program is free software: you can redistribute it and/or modify
17
 *  it under the terms of the GNU Lesser General Public License as published by
18
 *  the Free Software Foundation, either version 3 of the License, or
19
 *  (at your option) any later version.
20
 *
21
 *  This program is distributed in the hope that it will be useful,
22
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
23
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
 *  GNU Lesser General Public License for more details.
25
 *
26
 *  You should have received a copy of the GNU Lesser General Public License
27
 *  along with this program.
28
 *  If not, see <http://www.pdfparser.org/sites/default/LICENSE.txt>.
29
 */
30
31
// Source : http://cpansearch.perl.org/src/JV/PostScript-Font-1.10.02/lib/PostScript/WinANSIEncoding.pm
32
33
namespace Smalot\PdfParser\Encoding;
34
35
/**
36
 * Class WinAnsiEncoding
37
 */
38
class WinAnsiEncoding
39
{
40
    public function getTranslations()
41
    {
42
        $encoding =
43
          '.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '.
44
          '.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '.
45
          '.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '.
46
          '.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef '.
47
          'space exclam quotedbl numbersign dollar percent ampersand quotesingle '.
48
          'parenleft parenright asterisk plus comma hyphen period slash zero one '.
49
          'two three four five six seven eight nine colon semicolon less equal '.
50
          'greater question at A B C D E F G H I J K L M N O P Q R S T U V W X '.
51
          'Y Z bracketleft backslash bracketright asciicircum underscore '.
52
          'grave a b c d e f g h i j k l m n o p q r s t u v w x y z '.
53
          'braceleft bar braceright asciitilde bullet Euro bullet quotesinglbase '.
54
          'florin quotedblbase ellipsis dagger daggerdbl circumflex perthousand '.
55
          'Scaron guilsinglleft OE bullet Zcaron bullet bullet quoteleft quoteright '.
56
          'quotedblleft quotedblright bullet endash emdash tilde trademark scaron '.
57
          'guilsinglright oe bullet zcaron Ydieresis space exclamdown cent '.
58
          'sterling currency yen brokenbar section dieresis copyright '.
59
          'ordfeminine guillemotleft logicalnot hyphen registered macron degree '.
60
          'plusminus twosuperior threesuperior acute mu paragraph '.
61
          'periodcentered cedilla onesuperior ordmasculine guillemotright '.
62
          'onequarter onehalf threequarters questiondown Agrave Aacute '.
63
          'Acircumflex Atilde Adieresis Aring AE Ccedilla Egrave Eacute '.
64
          'Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde '.
65
          'Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash Ugrave '.
66
          'Uacute Ucircumflex Udieresis Yacute Thorn germandbls agrave aacute '.
67
          'acircumflex atilde adieresis aring ae ccedilla egrave eacute '.
68
          'ecircumflex edieresis igrave iacute icircumflex idieresis eth ntilde '.
69
          'ograve oacute ocircumflex otilde odieresis divide oslash ugrave '.
70
          'uacute ucircumflex udieresis yacute thorn ydieresis';
71
72
        return explode(' ', $encoding);
73
    }
74
}
75