Lggr
Static Public Member Functions | Public Attributes | List of all members
Faker\Calculator\Ean Class Reference
Collaboration diagram for Faker\Calculator\Ean:
Collaboration graph
[legend]

Static Public Member Functions

static checksum ($digits)
 
static isValid ($ean)
 

Public Attributes

const PATTERN = '/^(?:\d{8}|\d{13})$/'
 

Member Function Documentation

◆ checksum()

static Faker\Calculator\Ean::checksum (   $digits)
static

Computes the checksum of an EAN number.

See also
https://en.wikipedia.org/wiki/International_Article_Number
Parameters
string$digits
Returns
int

◆ isValid()

static Faker\Calculator\Ean::isValid (   $ean)
static

Checks whether the provided number is an EAN compliant number and that the checksum is correct.

Parameters
string$eanAn EAN number
Returns
boolean

The documentation for this class was generated from the following file: