@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $addresses = collect($addresses) |
65 | 65 | ->flatten() |
66 | 66 | ->map( |
67 | - function ($address) { |
|
67 | + function($address) { |
|
68 | 68 | if (true === empty($address)) { |
69 | 69 | return false; |
70 | 70 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } |
74 | 74 | ) |
75 | 75 | ->filter( |
76 | - function ($address) { |
|
76 | + function($address) { |
|
77 | 77 | return $address instanceof Address; |
78 | 78 | } |
79 | 79 | ) |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $class = \get_class($model); |
90 | 90 | |
91 | 91 | $class::saved( |
92 | - function ($object) use ($addresses, $model) { |
|
92 | + function($object) use ($addresses, $model) { |
|
93 | 93 | static $modelLastFiredOn; |
94 | 94 | if (null !== $modelLastFiredOn && $modelLastFiredOn === $model) { |
95 | 95 | return; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | $this->app->singleton( |
108 | 108 | LocalisationRegistrar::class, |
109 | - function ($app) use ($localisationLoader) { |
|
109 | + function($app) use ($localisationLoader) { |
|
110 | 110 | return $localisationLoader; |
111 | 111 | } |
112 | 112 | ); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR) |
144 | 144 | ->flatMap( |
145 | - function ($path) use ($filesystem) { |
|
145 | + function($path) use ($filesystem) { |
|
146 | 146 | return $filesystem->glob($path.'*_create_localisation_tables.php'); |
147 | 147 | } |
148 | 148 | )->push($this->app->databasePath()."/migrations/{$timestamp}_create_localisation_tables.php") |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $this->addresses = $this->cache->remember( |
227 | 227 | self::$cacheKey.'.addresses', |
228 | 228 | self::$cacheExpirationTime, |
229 | - function () { |
|
229 | + function() { |
|
230 | 230 | return $this->getAddressModel() |
231 | 231 | ->with('type') |
232 | 232 | ->get(); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $this->languages = $this->cache->remember( |
258 | 258 | self::$cacheKey, |
259 | 259 | self::$cacheExpirationTime, |
260 | - function () { |
|
260 | + function() { |
|
261 | 261 | return $this->getLanguageClass() |
262 | 262 | //->with('countries') |
263 | 263 | ->get(); |
@@ -4,39 +4,39 @@ |
||
4 | 4 | |
5 | 5 | use PWWEB\Localisation\Models\Country; |
6 | 6 | |
7 | - /** |
|
8 | - * The database factory for Country. |
|
9 | - * Class AppBaseController. |
|
10 | - * |
|
11 | - * @author Frank Pillukeit <[email protected]> |
|
12 | - * @author Richard Browne <[email protected] |
|
13 | - * @copyright 2020 pw-websolutions.com |
|
14 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | - * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | - */ |
|
17 | - class CountryFactory extends Factory |
|
18 | - { |
|
19 | - /** |
|
20 | - * The name of the factory's corresponding model. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $model = Country::class; |
|
7 | + /** |
|
8 | + * The database factory for Country. |
|
9 | + * Class AppBaseController. |
|
10 | + * |
|
11 | + * @author Frank Pillukeit <[email protected]> |
|
12 | + * @author Richard Browne <[email protected] |
|
13 | + * @copyright 2020 pw-websolutions.com |
|
14 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | + * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | + */ |
|
17 | + class CountryFactory extends Factory |
|
18 | + { |
|
19 | + /** |
|
20 | + * The name of the factory's corresponding model. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $model = Country::class; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Define the model's default state. |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function definition() |
|
32 | - { |
|
33 | - return [ |
|
34 | - 'name' => $this->faker->word, |
|
35 | - 'iso' => $this->faker->word, |
|
36 | - 'ioc' => $this->faker->word, |
|
37 | - 'active' => $this->faker->word, |
|
38 | - 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
39 | - 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
40 | - ]; |
|
41 | - } |
|
42 | - } |
|
26 | + /** |
|
27 | + * Define the model's default state. |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function definition() |
|
32 | + { |
|
33 | + return [ |
|
34 | + 'name' => $this->faker->word, |
|
35 | + 'iso' => $this->faker->word, |
|
36 | + 'ioc' => $this->faker->word, |
|
37 | + 'active' => $this->faker->word, |
|
38 | + 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
39 | + 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
40 | + ]; |
|
41 | + } |
|
42 | + } |
@@ -4,41 +4,41 @@ |
||
4 | 4 | |
5 | 5 | use PWWEB\Localisation\Models\Language; |
6 | 6 | |
7 | - /** |
|
8 | - * The database factory for Language. |
|
9 | - * Class AppBaseController. |
|
10 | - * |
|
11 | - * @author Frank Pillukeit <[email protected]> |
|
12 | - * @author Richard Browne <[email protected] |
|
13 | - * @copyright 2020 pw-websolutions.com |
|
14 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | - * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | - */ |
|
17 | - class LanguageFactory extends Factory |
|
18 | - { |
|
19 | - /** |
|
20 | - * The name of the factory's corresponding model. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $model = Language::class; |
|
7 | + /** |
|
8 | + * The database factory for Language. |
|
9 | + * Class AppBaseController. |
|
10 | + * |
|
11 | + * @author Frank Pillukeit <[email protected]> |
|
12 | + * @author Richard Browne <[email protected] |
|
13 | + * @copyright 2020 pw-websolutions.com |
|
14 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | + * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | + */ |
|
17 | + class LanguageFactory extends Factory |
|
18 | + { |
|
19 | + /** |
|
20 | + * The name of the factory's corresponding model. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $model = Language::class; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Define the model's default state. |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function definition() |
|
32 | - { |
|
33 | - return [ |
|
34 | - 'name' => $this->faker->word, |
|
35 | - 'locale' => $this->faker->word, |
|
36 | - 'abbreviation' => $this->faker->word, |
|
37 | - 'installed' => $this->faker->word, |
|
38 | - 'active' => $this->faker->word, |
|
39 | - 'standard' => $this->faker->word, |
|
40 | - 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
41 | - 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
42 | - ]; |
|
43 | - } |
|
44 | - } |
|
26 | + /** |
|
27 | + * Define the model's default state. |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function definition() |
|
32 | + { |
|
33 | + return [ |
|
34 | + 'name' => $this->faker->word, |
|
35 | + 'locale' => $this->faker->word, |
|
36 | + 'abbreviation' => $this->faker->word, |
|
37 | + 'installed' => $this->faker->word, |
|
38 | + 'active' => $this->faker->word, |
|
39 | + 'standard' => $this->faker->word, |
|
40 | + 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
41 | + 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
42 | + ]; |
|
43 | + } |
|
44 | + } |
@@ -4,45 +4,45 @@ |
||
4 | 4 | |
5 | 5 | use PWWEB\Localisation\Models\Address\Type; |
6 | 6 | |
7 | - /** |
|
8 | - * The database factory for Type. |
|
9 | - * Class AppBaseController. |
|
10 | - * |
|
11 | - * @author Frank Pillukeit <[email protected]> |
|
12 | - * @author Richard Browne <[email protected] |
|
13 | - * @copyright 2020 pw-websolutions.com |
|
14 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | - * @var \Illuminate\Database\Eloquent\Factory $factoryv |
|
16 | - */ |
|
17 | - class TypeFactory extends Factory |
|
18 | - { |
|
19 | - /** |
|
20 | - * The name of the factory's corresponding model. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $model = Type::class; |
|
7 | + /** |
|
8 | + * The database factory for Type. |
|
9 | + * Class AppBaseController. |
|
10 | + * |
|
11 | + * @author Frank Pillukeit <[email protected]> |
|
12 | + * @author Richard Browne <[email protected] |
|
13 | + * @copyright 2020 pw-websolutions.com |
|
14 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | + * @var \Illuminate\Database\Eloquent\Factory $factoryv |
|
16 | + */ |
|
17 | + class TypeFactory extends Factory |
|
18 | + { |
|
19 | + /** |
|
20 | + * The name of the factory's corresponding model. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $model = Type::class; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Define the model's default state. |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function definition() |
|
32 | - { |
|
33 | - return [ |
|
34 | - 'country_id' => $this->faker->word, |
|
35 | - 'type_id' => $this->faker->word, |
|
36 | - 'street' => $this->faker->word, |
|
37 | - 'street2' => $this->faker->word, |
|
38 | - 'city' => $this->faker->word, |
|
39 | - 'state' => $this->faker->word, |
|
40 | - 'postcode' => $this->faker->word, |
|
41 | - 'lat' => $this->faker->randomDigitNotNull, |
|
42 | - 'lng' => $this->faker->randomDigitNotNull, |
|
43 | - 'primary' => $this->faker->word, |
|
44 | - 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
45 | - 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
46 | - ]; |
|
47 | - } |
|
48 | - } |
|
26 | + /** |
|
27 | + * Define the model's default state. |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function definition() |
|
32 | + { |
|
33 | + return [ |
|
34 | + 'country_id' => $this->faker->word, |
|
35 | + 'type_id' => $this->faker->word, |
|
36 | + 'street' => $this->faker->word, |
|
37 | + 'street2' => $this->faker->word, |
|
38 | + 'city' => $this->faker->word, |
|
39 | + 'state' => $this->faker->word, |
|
40 | + 'postcode' => $this->faker->word, |
|
41 | + 'lat' => $this->faker->randomDigitNotNull, |
|
42 | + 'lng' => $this->faker->randomDigitNotNull, |
|
43 | + 'primary' => $this->faker->word, |
|
44 | + 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
45 | + 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
46 | + ]; |
|
47 | + } |
|
48 | + } |
@@ -4,45 +4,45 @@ |
||
4 | 4 | |
5 | 5 | use PWWEB\Localisation\Models\Address; |
6 | 6 | |
7 | - /** |
|
8 | - * The database factory for Address. |
|
9 | - * Class AppBaseController. |
|
10 | - * |
|
11 | - * @author Frank Pillukeit <[email protected]> |
|
12 | - * @author Richard Browne <[email protected] |
|
13 | - * @copyright 2020 pw-websolutions.com |
|
14 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | - * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | - */ |
|
17 | - class AddressFactory extends Factory |
|
18 | - { |
|
19 | - /** |
|
20 | - * The name of the factory's corresponding model. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $model = Address::class; |
|
7 | + /** |
|
8 | + * The database factory for Address. |
|
9 | + * Class AppBaseController. |
|
10 | + * |
|
11 | + * @author Frank Pillukeit <[email protected]> |
|
12 | + * @author Richard Browne <[email protected] |
|
13 | + * @copyright 2020 pw-websolutions.com |
|
14 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | + * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | + */ |
|
17 | + class AddressFactory extends Factory |
|
18 | + { |
|
19 | + /** |
|
20 | + * The name of the factory's corresponding model. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $model = Address::class; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Define the model's default state. |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function definition() |
|
32 | - { |
|
33 | - return [ |
|
34 | - 'country_id' => $this->faker->word, |
|
35 | - 'type_id' => $this->faker->word, |
|
36 | - 'street' => $this->faker->word, |
|
37 | - 'street2' => $this->faker->word, |
|
38 | - 'city' => $this->faker->word, |
|
39 | - 'state' => $this->faker->word, |
|
40 | - 'postcode' => $this->faker->word, |
|
41 | - 'lat' => $this->faker->randomDigitNotNull, |
|
42 | - 'lng' => $this->faker->randomDigitNotNull, |
|
43 | - 'primary' => $this->faker->word, |
|
44 | - 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
45 | - 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
46 | - ]; |
|
47 | - } |
|
48 | - } |
|
26 | + /** |
|
27 | + * Define the model's default state. |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function definition() |
|
32 | + { |
|
33 | + return [ |
|
34 | + 'country_id' => $this->faker->word, |
|
35 | + 'type_id' => $this->faker->word, |
|
36 | + 'street' => $this->faker->word, |
|
37 | + 'street2' => $this->faker->word, |
|
38 | + 'city' => $this->faker->word, |
|
39 | + 'state' => $this->faker->word, |
|
40 | + 'postcode' => $this->faker->word, |
|
41 | + 'lat' => $this->faker->randomDigitNotNull, |
|
42 | + 'lng' => $this->faker->randomDigitNotNull, |
|
43 | + 'primary' => $this->faker->word, |
|
44 | + 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
45 | + 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
46 | + ]; |
|
47 | + } |
|
48 | + } |
@@ -4,41 +4,41 @@ |
||
4 | 4 | |
5 | 5 | use PWWEB\Localisation\Models\Currency; |
6 | 6 | |
7 | - /** |
|
8 | - * The database factory for Currency. |
|
9 | - * Class AppBaseController. |
|
10 | - * |
|
11 | - * @author Frank Pillukeit <[email protected]> |
|
12 | - * @author Richard Browne <[email protected] |
|
13 | - * @copyright 2020 pw-websolutions.com |
|
14 | - * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | - * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | - */ |
|
17 | - class CurrencyFactory extends Factory |
|
18 | - { |
|
19 | - /** |
|
20 | - * The name of the factory's corresponding model. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $model = Currency::class; |
|
7 | + /** |
|
8 | + * The database factory for Currency. |
|
9 | + * Class AppBaseController. |
|
10 | + * |
|
11 | + * @author Frank Pillukeit <[email protected]> |
|
12 | + * @author Richard Browne <[email protected] |
|
13 | + * @copyright 2020 pw-websolutions.com |
|
14 | + * @license http://www.opensource.org/licenses/mit-license.html MIT License |
|
15 | + * @var \Illuminate\Database\Eloquent\Factory $factory |
|
16 | + */ |
|
17 | + class CurrencyFactory extends Factory |
|
18 | + { |
|
19 | + /** |
|
20 | + * The name of the factory's corresponding model. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $model = Currency::class; |
|
25 | 25 | |
26 | - /** |
|
27 | - * Define the model's default state. |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function definition() |
|
32 | - { |
|
33 | - return [ |
|
34 | - 'name' => $this->faker->word, |
|
35 | - 'iso' => $this->faker->word, |
|
36 | - 'numeric_code' => $this->faker->randomDigitNotNull, |
|
37 | - 'entity_code' => $this->faker->word, |
|
38 | - 'active' => $this->faker->word, |
|
39 | - 'standard' => $this->faker->word, |
|
40 | - 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
41 | - 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
42 | - ]; |
|
43 | - } |
|
44 | - } |
|
26 | + /** |
|
27 | + * Define the model's default state. |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function definition() |
|
32 | + { |
|
33 | + return [ |
|
34 | + 'name' => $this->faker->word, |
|
35 | + 'iso' => $this->faker->word, |
|
36 | + 'numeric_code' => $this->faker->randomDigitNotNull, |
|
37 | + 'entity_code' => $this->faker->word, |
|
38 | + 'active' => $this->faker->word, |
|
39 | + 'standard' => $this->faker->word, |
|
40 | + 'created_at' => $this->faker->date('Y-m-d H:i:s'), |
|
41 | + 'updated_at' => $this->faker->date('Y-m-d H:i:s'), |
|
42 | + ]; |
|
43 | + } |
|
44 | + } |