Skip to content

Commit 1892e89

Browse files
committed
Merge branch 'dev'
2 parents 27aaaed + dada8d9 commit 1892e89

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ root = true
22

33
[*]
44
charset = utf-8
5-
indent_style = tab
5+
indent_style = space
66
trim_trailing_whitespace = false
77
end_of_line = lf
88
insert_final_newline = true

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
![license](https://img.shields.io/github/license/pattern-lab/plugin-php-faker.svg?maxAge=2592000)
2-
[![Packagist](https://img.shields.io/packagist/v/pattern-lab/plugin-faker.svg?maxAge=2592000)](https://packagist.org/packages/pattern-lab/plugin-faker) [![Gitter](https://img.shields.io/gitter/room/pattern-lab/php.svg?maxAge=2592000)](https://gitter.im/pattern-lab/php)
1+
![license](https://img.shields.io/github/license/pattern-lab/plugin-php-faker.svg)
2+
[![Packagist](https://img.shields.io/packagist/v/pattern-lab/plugin-faker.svg)](https://packagist.org/packages/pattern-lab/plugin-faker) [![Gitter](https://img.shields.io/gitter/room/pattern-lab/php.svg)](https://gitter.im/pattern-lab/php)
33

44
# Faker Plugin for Pattern Lab
55

@@ -39,17 +39,17 @@ To specify a gender you would use:
3939

4040
The Faker Plugin supports the following content formatters:
4141

42-
* Faker\Provider\en_US\Person
43-
* Faker\Provider\en_US\Address
44-
* Faker\Provider\en_US\PhoneNumber
45-
* Faker\Provider\en_US\Company
46-
* Faker\Provider\Lorem
47-
* Faker\Provider\Internet
48-
* Faker\Provider\Color
49-
* Faker\Provider\Payment
50-
* Faker\Provider\DateTime
51-
* Faker\Provider\Image
52-
* Faker\Provider\Miscellaneous
42+
* `Faker\Provider\en_US\Person`
43+
* `Faker\Provider\en_US\Address`
44+
* `Faker\Provider\en_US\PhoneNumber`
45+
* `Faker\Provider\en_US\Company`
46+
* `Faker\Provider\Lorem`
47+
* `Faker\Provider\Internet`
48+
* `Faker\Provider\Color`
49+
* `Faker\Provider\Payment`
50+
* `Faker\Provider\DateTime`
51+
* `Faker\Provider\Image`
52+
* `Faker\Provider\Miscellaneous`
5353

5454
See the official repository for a [list of options available to each formatter](https://github.com/fzaninotto/Faker#formatters).
5555

@@ -59,14 +59,14 @@ The content produced by Faker can be localized based on a Faker locale. If the F
5959

6060
To update your Faker locale you can either directly edit `./config/config.yml` or use the command line option:
6161

62-
php core/console --config --set faker.locale=[locale]
62+
php core/console --config --set plugins.faker.locale=[locale]
6363

6464
For example:
6565

66-
php core/console --config --set faker.locale=fr_FR
66+
php core/console --config --set plugins.faker.locale=fr_FR
6767

6868
## Disabling the Plugin
6969

7070
To disable the Faker plugin you can either directly edit `./config/config.yml` or use the command line option:
7171

72-
php core/console --config --set faker.on=false
72+
php core/console --config --set plugins.faker.enabled=false

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
"extra": {
3232
"patternlab": {
3333
"config": {
34-
"faker": {
35-
"on": true,
36-
"locale": "en_US"
34+
"plugins": {
35+
"faker": {
36+
"enabled": true,
37+
"locale": "en_US"
38+
}
3739
}
3840
}
3941
}

src/PatternLab/Faker/PatternLabListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct() {
3131
$this->addListener("patternData.dataLoaded","fakeContent");
3232

3333
// set-up locale
34-
$locale = Config::getOption("faker.locale");
34+
$locale = Config::getOption("plugins.faker.locale");
3535
$locale = ($locale) ? $locale : "en_US";
3636
$this->locale = $locale;
3737

@@ -88,7 +88,7 @@ private function compareReplaceFaker($value) {
8888
*/
8989
public function fakeContent() {
9090

91-
if ((bool)Config::getOption("faker.on")) {
91+
if ((bool)Config::getOption("plugins.faker.enabled")) {
9292
$fakedContent = $this->recursiveWalk(Data::get());
9393
Data::replaceStore($fakedContent);
9494
}

0 commit comments

Comments
 (0)