Skip to content

Commit 6695b39

Browse files
committed
Update TypeTelepen.php
Minor corrections to construction, and comments
1 parent a98997e commit 6695b39

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/Types/TypeTelepen.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?php
22
/**
3-
* Adapated from Java implementation of Telepen
4-
* by <rstuart114@gmail.com> Robin Stuart by
5-
* Darren Stephens <darren.stephens@durham.ac.uk>
6-
* at https://github.com/woo-j/OkapiBarcode which used the
3+
* Adapted by Darren Stephens <darren.stephens@durham.ac.uk>
4+
* from Java implementation of Telepen by <rstuart114@gmail.com> Robin Stuart
5+
* at https://github.com/woo-j/OkapiBarcode which uses the
76
* Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0
87
*
98
* Implements Telepen (also known as Telepen Alpha), and Telepen Numeric.
@@ -22,7 +21,7 @@
2221

2322
define('TELEPEN_START_CHAR', '_');
2423
define('TELEPEN_STOP_CHAR', 'z');
25-
define('TELEPEN_ALPHA', '');
24+
define('TELEPEN_ALPHA', 'alpha');
2625
define('TELEPEN_NUMERIC', 'numeric');
2726

2827
class TypeTelepen implements TypeInterface
@@ -73,7 +72,7 @@ protected function encode($code) : string
7372
protected function encodeAlpha($code) : string
7473
{
7574

76-
if (!preg_match('/[ -~]+/', $code)) { // everything from ASCII0-ASCII127
75+
if (!preg_match('/[ -~]+/', $code)) { // everything from ASCII32-ASCII127
7776
throw new InvalidFormatException("Invalid characters in data");
7877
}
7978

0 commit comments

Comments
 (0)