PHPackages                             recycledbeans/the-office-faker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. recycledbeans/the-office-faker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

recycledbeans/the-office-faker
==============================

Faker Generator themed around one of the best TV shows ever, The Office.

v1.0.11(5y ago)48962MITPHPPHP &gt;=7.0CI failing

Since Mar 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/recycledbeans/the-office-faker-generator)[ Packagist](https://packagist.org/packages/recycledbeans/the-office-faker)[ RSS](/packages/recycledbeans-the-office-faker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

The Office Faker
================

[](#the-office-faker)

[![Latest Stable Version](https://camo.githubusercontent.com/a6a8b28d9ea88f6c70128960fcc955c5482a817b4d9b9cb05852a89b5042ad54/68747470733a2f2f706f7365722e707567782e6f72672f72656379636c65646265616e732f7468652d6f66666963652d66616b65722f76657273696f6e)](https://packagist.org/packages/recycledbeans/the-office-faker) [![Build Status](https://camo.githubusercontent.com/4f854ae20155c58a6b17715f43c31d18f9c146a036f2292527cc431e76dd0ab9/68747470733a2f2f7472617669732d63692e6f72672f72656379636c65646265616e732f7468652d6f66666963652d66616b65722d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/recycledbeans/the-office-faker-generator)

Bears. Beets. Battlestar Galactica.
-----------------------------------

[](#bears-beets-battlestar-galactica)

With this package, you can extend the extremely useful Faker ([fzaninotto/faker](https://github.com/fzaninotto/Faker)) Library to seed your PHP application with fake data using characters and companies from the hit TV series, The Office (US).

This is vital for when we launch Dunder Mifflin Infinity ✌️-point-👌!

Installation
------------

[](#installation)

Install this package using Composer.

```
composer require recycledbeans/the-office-faker
```

Usage
-----

[](#usage)

Start using characters and company names immediately using the Faker methods you are already familiar with by adding the provider to your Faker instance.

The example below is using a Laravel Factory as an example, but Faker (and this provider) can be used in any PHP project.

```
$faker = Faker\Factory::create();
$faker->addProvider(new \TheOfficeFaker\Provider\TheOffice($faker));

// Example usage (more details below)
$name = $faker->character()->name; // Dwight Schrute
$company = $faker->company; // Poor Richard's Pub
```

### 🔥 Laravel

[](#-laravel)

If you are using this package in a Laravel application, you can also make this functionality available to all of your factories and tests globally by adding the `TheOfficeFaker\Laravel\TheOfficeServiceProvider::class` to the `providers` section of `config/app.php` as detailed in the [Laravel Docs](https://laravel.com/docs/8.x/providers#registering-providers).

Characters
----------

[](#characters)

The default usage above creates truly randomized first and last names, so you will end up with names like "Roy Kapoor" or "Jim Schrute". If you would like the have the first and last names be consistent with the characters on the show (which is probably what most people would enjoy), you can use the character() method to return an object of a character's details.

```
$character = $faker->character();

return [
    'given_name' => $character->firstName,
    'family_name' => $character->lastName,
    'email' => $character->safeEmail,
];
```

Companies
---------

[](#companies)

There is a small, but growing, list of fictional (and some Scranton-area) company names taken from episodes of The Office. You can use these the same way you would use the normal company attribute.

```
// Michael Scott Paper Company, for instance
$company = $faker->company;
```

Contributing
------------

[](#contributing)

### Running unit tests

[](#running-unit-tests)

This project uses PHPUnit. You can run tests with or without code coverage.

With no code coverage

```
./vendor/bin/phpunit
```

With code coverage (you must have Xdebug installed to run code coverage)

```
./vendor/bin/phpunit --coverage-html tests/coverage
```

To view the code coverage report open `tests/coverage/index.html` in your browser.

### Ideas

[](#ideas)

Do you have ideas for other bits of data that you would like to see in this package? Create an issue with your suggestion!

### TODO (I would love your help!)

[](#todo-i-would-love-your-help)

There is a short list of things I would like to improve or add in the near future to make this provider even better. If you would like to help in this endeavor, please feel free to create a pull request. Even if you don't feel like coding, if you see someone major that is missing from the characters list or a company that hasn't been added, please create a PR!

- Add more company names: there are plenty of references to fictional companies and Scranton-area places that could be added for even more variability.
- Cities and localities: I don't know if there will be enough cities mentioned in the office (mostly from the PA area), but I think it's worth looking into whether the provider can *provide* enough cities to have them added.
- Lines from the episodes? Maybe a text provider that returns a random sentence from an actual line of dialog?

---

Follow me on [Twitter](https://twitter.com/recycledbeans)!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~34 days

Total

13

Last Release

1987d ago

Major Versions

v0.1.0 → v1.0.02020-03-13

PHP version history (2 changes)v0.1.0PHP &gt;=5.6

v1.0.5PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0926351e2591f49957020beab17d49a12007e05c6e5ce3f9c9d08ca01861fa8b?d=identicon)[recycledbeans](/maintainers/recycledbeans)

---

Top Contributors

[![recycledbeans](https://avatars.githubusercontent.com/u/13002230?v=4)](https://github.com/recycledbeans "recycledbeans (159 commits)")[![doug7410](https://avatars.githubusercontent.com/u/7120584?v=4)](https://github.com/doug7410 "doug7410 (8 commits)")[![danfair](https://avatars.githubusercontent.com/u/4053286?v=4)](https://github.com/danfair "danfair (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/recycledbeans-the-office-faker/health.svg)

```
[![Health](https://phpackages.com/badges/recycledbeans-the-office-faker/health.svg)](https://phpackages.com/packages/recycledbeans-the-office-faker)
```

###  Alternatives

[digilist/snakedumper

5045.5k](/packages/digilist-snakedumper)[cinghie/yii2-traits

Yii2 Traits

116.9k8](/packages/cinghie-yii2-traits)[emanueleminotto/faker-service-provider

Faker Service Provider for Silex

162.9k](/packages/emanueleminotto-faker-service-provider)[flowpack/nodegenerator

Random nodes generator for Neos CMS

122.1k](/packages/flowpack-nodegenerator)[prewk/xml-faker

Create random XML with the help of fzaniotto/Faker.

101.8k3](/packages/prewk-xml-faker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
