Add default value for locales in model/record constructors
This commit is contained in:
parent
bdb13d31f6
commit
6d21d5682a
|
@ -74,7 +74,7 @@ class City extends Country
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
public function __construct($raw, $locales)
|
public function __construct($raw, $locales = array('en'))
|
||||||
{
|
{
|
||||||
parent::__construct($raw, $locales);
|
parent::__construct($raw, $locales);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Country implements \JsonSerializable
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
public function __construct($raw, $locales)
|
public function __construct($raw, $locales = array('en'))
|
||||||
{
|
{
|
||||||
$this->raw = $raw;
|
$this->raw = $raw;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ abstract class AbstractPlaceRecord extends AbstractRecord
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
public function __construct($record, $locales)
|
public function __construct($record, $locales = array('en'))
|
||||||
{
|
{
|
||||||
$this->locales = $locales;
|
$this->locales = $locales;
|
||||||
parent::__construct($record);
|
parent::__construct($record);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user