Skip to content

Commit

Permalink
Merge pull request #18 from basselch/master
Browse files Browse the repository at this point in the history
Apply pub.dev health suggestions to improve score
  • Loading branch information
drager authored Feb 9, 2020
2 parents 382c3ab + 556c556 commit 1c0a50d
Show file tree
Hide file tree
Showing 44 changed files with 4,212 additions and 4,206 deletions.
2 changes: 1 addition & 1 deletion example/faker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library faker.example;

import 'package:faker/faker.dart';

main() {
void main() {
// Generate some different types of data.
print(faker.address.country());
print(faker.company.name());
Expand Down
18 changes: 9 additions & 9 deletions lib/src/address.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import 'random_generator.dart';
import 'faker.dart';
import 'data/address/street_suffixes.dart';
import 'data/address/city_suffixes.dart';
import 'data/address/neighborhoods.dart';
import 'data/address/continents.dart';
import 'data/address/countries.dart';
import 'data/address/country_codes.dart';
import 'data/address/continents.dart';
import 'data/address/neighborhoods.dart';
import 'data/address/street_suffixes.dart';
import 'faker.dart';
import 'random_generator.dart';

class Address {
static const compassDirections = const ['North', 'East', 'West', 'South'];
static const cityPrefixes = const ['New', 'Lake', 'Port'];
static const compassDirections = ['North', 'East', 'West', 'South'];
static const cityPrefixes = ['New', 'Lake', 'Port'];

const Address();

Expand Down Expand Up @@ -68,8 +68,8 @@ class Address {
/// faker.address.streetName();
/// ```
String streetName() => random.integer(2) == 0
? '${new Faker().person.lastName()} ${streetSuffix()}'
: '${new Faker().person.firstName()} ${streetSuffix()}';
? '${Faker().person.lastName()} ${streetSuffix()}'
: '${Faker().person.firstName()} ${streetSuffix()}';

/// Generates a street address.
///
Expand Down
8 changes: 4 additions & 4 deletions lib/src/company.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ import 'faker.dart';
import 'random_generator.dart';

class Company {
static const _companySuffixes = const ['Inc', 'and Sons', 'LLC', 'Group'];
static const _positionPrefixes = const [
static const _companySuffixes = ['Inc', 'and Sons', 'LLC', 'Group'];
static const _positionPrefixes = [
'Executive',
'Assistant',
'General',
'Associate'
];
static const _positions = const [
static const _positions = [
'President',
'Manager',
'Director',
'Secretary',
'Consultant'
];
static const _positionAreas = const [
static const _positionAreas = [
'Finance',
'IT',
'Operations',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/conference.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'random_generator.dart';
import 'data/conference/conference_names.dart';
import 'random_generator.dart';

class Conference {
const Conference();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/currency.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'random_generator.dart';
import 'data/currency/currency_codes.dart';
import 'data/currency/currency_names.dart';
import 'random_generator.dart';

class Currency {
const Currency();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/data/address/city_suffixes.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const citySuffixes = const [
const citySuffixes = [
'town',
'ton',
'land',
Expand Down
4 changes: 2 additions & 2 deletions lib/src/data/address/continents.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const continents = const [
const continents = [
'Africa',
'Antarctica',
'Asia',
'Europe',
'North America',

// Some people use austrailia, whilst others use oceania.
'Oceania',

Expand Down
Loading

0 comments on commit 1c0a50d

Please sign in to comment.