repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ThrowsTest.php | tests/ThrowsTest.php | <?php
namespace Tests;
use DarkGhostHunter\Laratraits\Throws;
use Exception;
use PHPUnit\Framework\TestCase;
class ThrowsTest extends TestCase
{
public function test_throwable_when_true(): void
{
$this->expectException(TestThrowable::class);
$this->expectExceptionMessage('foo');
Test... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/SavesToSessionTest.php | tests/SavesToSessionTest.php | <?php
namespace DarkGhostHunter\Laratraits\Tests;
use DarkGhostHunter\Laratraits\SavesToSession;
use Illuminate\Contracts\Session\Session as SessionContract;
use Illuminate\Support\Facades\Session;
use LogicException;
use Orchestra\Testbench\TestCase;
class SavesToSessionTest extends TestCase
{
public function t... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/SendsToHttpTest.php | tests/SendsToHttpTest.php | <?php
namespace Tests;
use LogicException;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Http;
use DarkGhostHunter\Laratraits\SendsToHttp;
class SendsToHttpTest extends TestCase
{
public function test_sends_to_http()
{
Http::fake([
'go.com' => Http::response([''], 200, ... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ThrottlesMethodsTest.php | tests/ThrottlesMethodsTest.php | <?php
namespace Tests;
use Orchestra\Testbench\TestCase;
use DarkGhostHunter\Laratraits\ThrottleMethods;
class ThrottlesMethodsTest extends TestCase
{
public function test_throttles_class_method()
{
$class = new class {
use ThrottleMethods;
public static $executed = [];
... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/FiresItselfTest.php | tests/FiresItselfTest.php | <?php
namespace Tests;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Event;
use DarkGhostHunter\Laratraits\FiresItself;
class FiresItselfTest extends TestCase
{
public function test_fires_itself()
{
$event = Event::fake();
$class = new class ('notfired') {
use ... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/SavesToCacheTest.php | tests/SavesToCacheTest.php | <?php
namespace Tests;
use DarkGhostHunter\Laratraits\SavesToCache;
use Illuminate\Cache\Repository;
use Illuminate\Contracts\Cache\Repository as RepositoryContract;
use Illuminate\Support\Facades\Cache;
use LogicException;
use Mockery;
use Orchestra\Testbench\TestCase;
class SavesToCacheTest extends TestCase
{
... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ValidatesItselfTest.php | tests/ValidatesItselfTest.php | <?php
namespace DarkGhostHunter\Laratraits\Tests;
use Orchestra\Testbench\TestCase;
use Illuminate\Validation\ValidationException;
use Illuminate\Contracts\Validation\Validator;
use DarkGhostHunter\Laratraits\ValidatesItself;
class ValidatesItselfTest extends TestCase
{
public function test_validates_from_extern... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/MultitapsTest.php | tests/MultitapsTest.php | <?php
namespace Tests;
use Orchestra\Testbench\TestCase;
use DarkGhostHunter\Laratraits\Multitaps;
class MultitapsTest extends TestCase
{
public function test_multitaps()
{
$multitapable = new class() {
use Multitaps;
public $foo;
public function bar()
... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ConditionFillTest.php | tests/ConditionFillTest.php | <?php
namespace Tests;
use Orchestra\Testbench\TestCase;
use Illuminate\Database\Eloquent\Model;
use DarkGhostHunter\Laratraits\Eloquent\ConditionFill;
class ConditionFillTest extends TestCase
{
public function test_fills_when_true()
{
$class = new class extends Model {
use ConditionFill;... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/SavesToStorageTest.php | tests/SavesToStorageTest.php | <?php
namespace DarkGhostHunter\Laratraits\Tests;
use Mockery;
use LogicException;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Storage;
use Illuminate\Filesystem\FilesystemAdapter;
use DarkGhostHunter\Laratraits\SavesToStorage;
use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract;... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/PipesThroughTest.php | tests/PipesThroughTest.php | <?php
namespace Tests;
use Illuminate\Pipeline\Pipeline;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Bus;
use DarkGhostHunter\Laratraits\PipesThrough;
use Illuminate\Contracts\Container\Container;
use DarkGhostHunter\Laratraits\Jobs\DispatchablePipeline;
class PipesThroughTest extends TestCase
{... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/EnumerableStatesTest.php | tests/EnumerableStatesTest.php | <?php
namespace Tests;
use LogicException;
use Orchestra\Testbench\TestCase;
use DarkGhostHunter\Laratraits\EnumerableStates;
class EnumerableStatesTest extends TestCase
{
public function test_has_states_with_const()
{
$class = new class {
use EnumerableStates;
protected cons... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/EnumerableTest.php | tests/EnumerableTest.php | <?php
namespace Tests;
use ArrayIterator;
use LogicException;
use IteratorAggregate;
use BadMethodCallException;
use Orchestra\Testbench\TestCase;
use DarkGhostHunter\Laratraits\Enumerable;
class EnumerableTest extends TestCase
{
public function test_creates_enumerable_from_list()
{
$list = ['foo', '... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ShadowCallTest.php | tests/ShadowCallTest.php | <?php
namespace Tests;
use DarkGhostHunter\Laratraits\ShadowCall;
use Illuminate\Support\Fluent;
use PHPUnit\Framework\TestCase;
class ShadowCallTest extends TestCase
{
public function test_when_true(): void
{
$object = new TestFluent(['foo' => 'bar']);
$object->callWhen(true)->offsetSet('fo... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ConditionCallTest.php | tests/ConditionCallTest.php | <?php
namespace Tests;
use Illuminate\Support\Fluent;
use Orchestra\Testbench\TestCase;
use DarkGhostHunter\Laratraits\ConditionCalls;
class ConditionCallTest extends TestCase
{
/**
* @var \stdClass & \DarkGhostHunter\Laratraits\ConditionCalls
*/
protected $object;
protected function setUp() :... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Blade/test_blade_directive.php | tests/Blade/test_blade_directive.php | <?php
return strtolower($expression);
| php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Blade/foo_directive.php | tests/Blade/foo_directive.php | <?php
return strtolower($expression); | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Blade/quz_directive.php | tests/Blade/quz_directive.php | <?php
return 'sample'; | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Blade/RegistersFileDirectiveTest.php | tests/Blade/RegistersFileDirectiveTest.php | <?php
namespace Tests\Blade;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Blade;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use DarkGhostHunter\Laratraits\Blade\RegistersFileDirective;
use const DIRECTORY_SEPARATOR as DS;
class RegistersFileDirectiveTest extends TestCase
{
pub... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Blade/bar_directive.php | tests/Blade/bar_directive.php | <?php
return strtolower($expression); | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ServiceProviders/RegisterObserversTest.php | tests/ServiceProviders/RegisterObserversTest.php | <?php
namespace Tests\ServiceProviders;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Events\Dispatcher;
use DarkGhostHunter\Laratraits\ServiceProviders\RegisterObservers;
class RegisterObserversTest extends TestCase
{
p... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ServiceProviders/PublishesMigrationsTest.php | tests/ServiceProviders/PublishesMigrationsTest.php | <?php
namespace Tests\ServiceProviders;
use DarkGhostHunter\Laratraits\ServiceProviders\PublishesMigrations;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Carbon;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Orchestra\Testbench\TestCase;
use SplFileInfo;
class PublishesMigra... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ServiceProviders/RegisterBladeExtensionsTest.php | tests/ServiceProviders/RegisterBladeExtensionsTest.php | <?php
namespace Tests\ServiceProviders;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
use DarkGhostHunter\Laratraits\ServiceProviders\RegisterBladeExtensions;
class RegisterBladeExtensionsTest extends TestCase
{
public function test_registers_blad... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/ServiceProviders/RegisterGatesTest.php | tests/ServiceProviders/RegisterGatesTest.php | <?php
namespace Tests\ServiceProviders;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use DarkGhostHunter\Laratraits\ServiceProviders\RegisterGates;
class RegisterGatesTest extends TestCase
{
public function test_register_gates()
{
$cla... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Middleware/CacheStaticResponseTest.php | tests/Middleware/CacheStaticResponseTest.php | <?php
namespace Tests\Middleware;
use Mockery;
use Illuminate\Http\Request;
use Illuminate\Cache\Repository;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\HtmlString;
use Illuminate\Cache\CacheManager;
use Illuminate\Support\Facades\Route;
use Illuminate\Contracts\Cache\Factory;
use DarkGhostHunter\Laratra... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Middleware/ShareAuthenticatedUserTest.php | tests/Middleware/ShareAuthenticatedUserTest.php | <?php
namespace Tests\Middleware;
use Orchestra\Testbench\TestCase;
use Illuminate\Foundation\Auth\User;
use Illuminate\Support\Facades\Route;
use Illuminate\Contracts\View\Factory;
use DarkGhostHunter\Laratraits\Middleware\ShareAuthenticatedUser;
class ShareAuthenticatedUserTest extends TestCase
{
public functi... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Middleware/ValidateConsumableSignatureTest.php | tests/Middleware/ValidateConsumableSignatureTest.php | <?php
namespace Tests\Middleware;
use Mockery;
use Illuminate\Support\Carbon;
use Illuminate\Cache\Repository;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Route;
use Illuminate\Contracts\Cache\Repository as RepositoryContract;
use DarkGhostHunter\Laratraits\Mid... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/FillsAttributesTest.php | tests/Eloquent/FillsAttributesTest.php | <?php
namespace Tests\Eloquent;
use BadMethodCallException;
use Orchestra\Testbench\TestCase;
use Illuminate\Database\Eloquent\Model;
use DarkGhostHunter\Laratraits\Eloquent\FillsAttributes;
class FillsAttributesTest extends TestCase
{
public function test_autofill_model()
{
$model = new class extend... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/ModelTypeTest.php | tests/Eloquent/ModelTypeTest.php | <?php
namespace Tests\Eloquent;
use LogicException;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\ModelType;
class ModelTypeTest extends TestCase
{
protected functi... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/HasSlugTest.php | tests/Eloquent/HasSlugTest.php | <?php
namespace Tests\Eloquent;
use Illuminate\Support\Str;
use Illuminate\Support\Carbon;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\HasSlug;
class HasSlugTest exte... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/DefaultColumnsTest.php | tests/Eloquent/DefaultColumnsTest.php | <?php
namespace Tests\Eloquent;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\DefaultColumns;
class DefaultColumnsTest extends TestCa... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/FromRequestTest.php | tests/Eloquent/FromRequestTest.php | <?php
namespace Tests\Eloquent;
use DarkGhostHunter\Laratraits\Eloquent\FromRequest;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Schema;
use Illuminate\Validation\ValidationException;
use Orchestra\Testbench\TestCase;
c... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/UsesUuidTest.php | tests/Eloquent/UsesUuidTest.php | <?php
namespace Tests\Eloquent;
use DarkGhostHunter\Laratraits\Eloquent\UsesUuid;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Su... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/NeighbourRecordsTest.php | tests/Eloquent/NeighbourRecordsTest.php | <?php
namespace Tests\Eloquent;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\NeighbourRecords;
class NeighbourRecordsTes... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/Casts/CastRepositoryTest.php | tests/Eloquent/Casts/CastRepositoryTest.php | <?php
namespace Tests\Eloquent\Casts;
use Orchestra\Testbench\TestCase;
use Illuminate\Config\Repository;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\Casts\CastRepository;
class CastRepositoryTest ext... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/Casts/CastEnumerableTest.php | tests/Eloquent/Casts/CastEnumerableTest.php | <?php
namespace Tests\Eloquent\Casts;
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use DarkGhostHunter\Laratraits\Eloquent\Casts\CastEnumerable;
class CastEnumerableTest extends TestCase
{
protected $mod... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
DarkGhostHunter/Laratraits | https://github.com/DarkGhostHunter/Laratraits/blob/d25fa64c80cc04b73ffcbc8b960c74a284875aea/tests/Eloquent/Casts/CastsBase64Test.php | tests/Eloquent/Casts/CastsBase64Test.php | <?php
namespace Tests\Eloquent\Casts;
use DarkGhostHunter\Laratraits\Eloquent\Casts\CastsBase64;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Orchestra\Testbench\TestCase;
use RuntimeException;
class Ca... | php | MIT | d25fa64c80cc04b73ffcbc8b960c74a284875aea | 2026-01-05T04:04:34.119053Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/wp-hammer.php | wp-hammer.php | <?php
/**
* Plugin Name: wp hammer
* Plugin URI: https://github.com/10up/wp-hammer
* Description: This plugin adds a wp-cli ha command to clean your environment and prepare it for staging / development by removing Personally Identifiable Information.
* Version: 1.0.2
* Author: Ivan Kruchkoff
* License: MIT
* Lic... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/tests/test-settings.php | tests/test-settings.php | <?php
class SettingsTest extends WP_HammerTestCase {
protected $settings;
/**
* Check Dry Run
*/
public function testDryRun() {
$this->settings->parse_arguments( array(), array( 'dry-run' => true ) );
$this->assertTrue( $this->settings->dry_run );
}
/**
* Check Form... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/tests/bootstrap.php | tests/bootstrap.php | <?php
$_tests_dir = getenv( 'WP_TESTS_DIR' );
if ( ! $_tests_dir ) {
$_tests_dir = '/tmp/wordpress-tests-lib';
}
require_once $_tests_dir . '/includes/functions.php';
function _manually_load_plugin() {
require_once getcwd() . '/vendor/autoload.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' )... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/tests/wp-hammer-testcase.php | tests/wp-hammer-testcase.php | <?php
/**
* Base unit test class for Co-Authors Plus
*/
class WP_HammerTestCase extends WP_UnitTestCase {
protected $suppress = false;
public function setUp() {
global $wpdb;
parent::setUp();
$this->suppress = $wpdb->suppress_errors();
$_SERVER['REMOTE_ADDR'] = '';
$this->author1 = $this->factory->u... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/tests/test-prune.php | tests/test-prune.php | <?php
class PruneTest extends WP_HammerTestCase {
protected $prune;
public function setUp() {
parent::setUp();
$this->prune = new WP_CLI\Hammer\Prune( $this->settings->limits, $this->settings->dry_run );
}
public function testParsePrunes() {
$this->assertTrue( true );
}
}
| php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/Command.php | includes/Command.php | <?php
namespace WP_CLI\Hammer;
use WP_CLI;
use WP_CLI\CommandWithDBObject;
use WP_CLI\Hammer\Prune;
use WP_CLI\Hammer\ContentFormatter;
/**
* wp hammer is a command to clean your environment of personally identifiable information, remove extra content and prepare it for a staging / development environment.
*
*/
c... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/Prune.php | includes/Prune.php | <?php
namespace WP_CLI\Hammer;
use WP_CLI;
class Prune {
protected $dry_run;
protected $prunes;
function __construct( $prunes, $dry_run ) {
$this->dry_run = $dry_run;
$this->parse_prunes( $prunes );
}
function get_prunes() {
return $this->prunes;
}
function parse_prunes( $prunes ) {
$this->prunes =... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/Sanitize.php | includes/Sanitize.php | <?php
namespace WP_CLI\Hammer;
use WP_CLI;
class Sanitize {
protected $dry_run;
protected $sanitizers;
function __construct( $sanitizers, $dry_run ) {
$this->dry_run = $dry_run;
$this->parse_sanitizers( $sanitizers );
}
function get_sanitizers() {
return $this->sanitizers;
}
function parse_sanitizers... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/Settings.php | includes/Settings.php | <?php
namespace WP_CLI\Hammer;
use WP_CLI;
class Settings {
/**
* @var array of tables and columns which should have their content modified, and HOW it should be modified.
* Specified via -f parameter and comma-separated.
* e.g. array(
* "posts.post_author=random", // randomly assign post author to each p... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/ContentFormatter.php | includes/ContentFormatter.php | <?php
namespace WP_CLI\Hammer;
use WP_CLI;
class ContentFormatter {
protected $dry_run;
protected $formatters;
function __construct( $formatters, $dry_run ) {
$this->dry_run = $dry_run;
$this->parse_formatters( $formatters );
}
/**
* @param $formatters Formatters as supplied on command line, parsed and ... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/pruners/users.php | includes/pruners/users.php | <?php
namespace WP_CLI\Hammer\Pruners\Users;
/**
* @param $limit How many users to keep
* @param bool|false $sort_type How to determine which users to keep
*/
function pruner( $limit, $sort_type = false ) {
$limit = absint( $limit );
\WP_CLI::line( "Fetching all users for removing all but $limit... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/pruners/posts.php | includes/pruners/posts.php | <?php
namespace WP_CLI\Hammer\Pruners\Posts;
use WP_CLI\Iterators\Query;
/**
* @param $prune How many posts to keep
* @param bool|false $sort_type How to determine which posts to keep
* @param $post_type_to_prune Post type to prune
*/
function pruner( $limit, $sort_t... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/sanitizers/options.php | includes/sanitizers/options.php | <?php
namespace WP_CLI\Hammer\Sanitizers\Options;
use WP_CLI;
/**
* Sanitize sensitive data from the `wp_options` table.
*
* Note that some rows -- like `nonce_key` -- will be automatically regenerated by Core during each execution.
* That's ok, though, because they'll get new values each time, which don't match ... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/sanitizers/usermeta.php | includes/sanitizers/usermeta.php | <?php
namespace WP_CLI\Hammer\Sanitizers\Usermeta;
use WP_CLI;
/**
* Sanitize sensitive data from the `wp_usermeta` table.
*/
function sanitizer() {
global $wpdb;
$safe_usermeta = get_safe_usermeta_names();
$exact_names = "'" . implode( "','", $safe_usermeta['exact_names'] ) . "'";
foreach ( $safe_usermeta[... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/generators/generic.php | includes/generators/generic.php | <?php
namespace WP_CLI\Hammer\Generators\Generic;
use WP_CLI\Iterators\Query;
use joshtronic\LoremIpsum;
use PWGen\PWGen;
use MarkovPHP\WordChain;
/**
* Lorem Ipsum content generator
* @param $length number of words
*
* @return string of ipsum text of specified length
*/
function ipsum( $length ) {
$lipsum = ne... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/formatters/users.php | includes/formatters/users.php | <?php
namespace WP_CLI\Hammer\Formatters\Users;
use WP_CLI\Iterators\Query;
/**
* Action to be run for manipulating users table, all formatters are passed as a parameter.
* @param $formatters All formatters for all tables
*/
function users( $formatters ) {
global $wpdb;
$users_query = "SELECT * FROM $wpdb->users... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
10up/wp-hammer | https://github.com/10up/wp-hammer/blob/8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0/includes/formatters/posts.php | includes/formatters/posts.php | <?php
namespace WP_CLI\Hammer\Formatters\Posts;
use WP_CLI\Iterators\Query;
/**
* Action to be run for manipulating posts table, all formatters are passed as a parameter.
* @param $formatters All formatters for all tables
*/
function posts( $formatters ) {
global $wpdb;
$posts_query = "SELECT * FROM $wpdb->posts... | php | MIT | 8741e70fb6a41fd4f8a8caf4b3f339d2b26b15d0 | 2026-01-05T04:04:42.440101Z | false |
kielabokkie/blueman | https://github.com/kielabokkie/blueman/blob/33c5f58e6573cc11a4a55af2c61005e9f0c694b4/src/Blueman/Console/Command/ConvertCommand.php | src/Blueman/Console/Command/ConvertCommand.php | <?php
namespace Blueman\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Rhumsaa\Uuid\Uuid;
c... | php | MIT | 33c5f58e6573cc11a4a55af2c61005e9f0c694b4 | 2026-01-05T04:04:55.704287Z | false |
kielabokkie/blueman | https://github.com/kielabokkie/blueman/blob/33c5f58e6573cc11a4a55af2c61005e9f0c694b4/test/Blueman/ConvertCommandTest.php | test/Blueman/ConvertCommandTest.php | <?php
use Blueman\Console\Command\ConvertCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
class ConvertCommandTest extends \PHPUnit_Framework_TestCase
{
protected $command = null;
protected $commandTester = null;
public function setUp()
{
... | php | MIT | 33c5f58e6573cc11a4a55af2c61005e9f0c694b4 | 2026-01-05T04:04:55.704287Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/FakerServiceProvider.php | src/FakerServiceProvider.php | <?php
namespace Xefi\Faker;
use Xefi\Faker\Extensions\ArrayExtension;
use Xefi\Faker\Extensions\BooleanExtension;
use Xefi\Faker\Extensions\ColorsExtension;
use Xefi\Faker\Extensions\DateTimeExtension;
use Xefi\Faker\Extensions\FinancialExtension;
use Xefi\Faker\Extensions\GeographicalExtension;
use Xefi\Faker\Extens... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Faker.php | src/Faker.php | <?php
namespace Xefi\Faker;
use Xefi\Faker\Container\Container;
/**
* @mixin Container
*/
class Faker
{
/**
* The current locale format (BCP 47 Code).
*
* @var ?string
*/
protected ?string $locale;
public function __construct(?string $locale = null)
{
$this->locale = $l... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Strategies/RegexStrategy.php | src/Strategies/RegexStrategy.php | <?php
namespace Xefi\Faker\Strategies;
class RegexStrategy extends Strategy
{
protected string $regex;
public function __construct(string $regex)
{
$this->regex = $regex;
}
/**
* Handle the given strategy.
*
* @param mixed $generatedValue
*
* @return bool
*/... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Strategies/UniqueStrategy.php | src/Strategies/UniqueStrategy.php | <?php
namespace Xefi\Faker\Strategies;
use Xefi\Faker\Seeds\HasSeeds;
class UniqueStrategy extends Strategy
{
use HasSeeds;
/**
* The element already tried.
*
* @var array
*/
protected array $tried = [];
/**
* Handle the given strategy.
*
* @param mixed $generated... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Strategies/ValidStrategy.php | src/Strategies/ValidStrategy.php | <?php
namespace Xefi\Faker\Strategies;
class ValidStrategy extends Strategy
{
protected $callable;
/**
* @throws \ReflectionException
* @throws \ErrorException
*/
public function __construct(callable $callable)
{
if (count((new \ReflectionFunction($callable))->getParameters()) ... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Strategies/Strategy.php | src/Strategies/Strategy.php | <?php
namespace Xefi\Faker\Strategies;
abstract class Strategy
{
/**
* Handle the given strategy.
*
* @param mixed $generatedValue
*
* @return bool
*/
abstract public function pass(mixed $generatedValue): bool;
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Exceptions/MaximumTriesReached.php | src/Exceptions/MaximumTriesReached.php | <?php
namespace Xefi\Faker\Exceptions;
class MaximumTriesReached extends \RuntimeException
{
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Exceptions/NoExtensionLocaleFound.php | src/Exceptions/NoExtensionLocaleFound.php | <?php
namespace Xefi\Faker\Exceptions;
class NoExtensionLocaleFound extends \RuntimeException
{
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Exceptions/BadParameterException.php | src/Exceptions/BadParameterException.php | <?php
namespace Xefi\Faker\Exceptions;
class BadParameterException extends \RuntimeException
{
public function __construct(string $message = '', int $code = 0, ?Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Manifests/ContainerMixinManifest.php | src/Manifests/ContainerMixinManifest.php | <?php
namespace Xefi\Faker\Manifests;
use Exception;
use phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Serializer;
use phpDocumentor\Reflection\DocBlock\Tags\Method;
use phpDocumentor\Reflection\TypeResolver;
use phpDocumentor\Reflection\Types\Compound;
use phpDocumentor\Reflection\Types\Mi... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Manifests/PackageManifest.php | src/Manifests/PackageManifest.php | <?php
namespace Xefi\Faker\Manifests;
use Exception;
class PackageManifest
{
/**
* The manifest path.
*
* @var ?string
*/
public ?string $manifestPath;
/**
* The base path.
*
* @var string
*/
public string $basePath;
/**
* The vendor path.
*
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Seeds/HasSeeds.php | src/Seeds/HasSeeds.php | <?php
namespace Xefi\Faker\Seeds;
trait HasSeeds
{
protected static array $seeds = [];
/**
* Get or create an instance for the given seed.
*
* @param string $seed
*
* @return static
*/
public static function forSeed(string $seed, ...$parameters): static
{
return ... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Container/Container.php | src/Container/Container.php | <?php
namespace Xefi\Faker\Container;
use Closure;
use Xefi\Faker\Container\Traits\HasExtensions;
use Xefi\Faker\Container\Traits\HasLocale;
use Xefi\Faker\Container\Traits\HasModifiers;
use Xefi\Faker\Container\Traits\HasStrategies;
use Xefi\Faker\Exceptions\MaximumTriesReached;
use Xefi\Faker\Manifests\ContainerMix... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Container/Traits/HasLocale.php | src/Container/Traits/HasLocale.php | <?php
namespace Xefi\Faker\Container\Traits;
trait HasLocale
{
/**
* The current locale format (BCP 47 Code).
*
* @var ?string
*/
protected ?string $locale;
/**
* Get the current locale.
*
* @return ?string
*/
public function getLocale(): ?string
{
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Container/Traits/HasExtensions.php | src/Container/Traits/HasExtensions.php | <?php
namespace Xefi\Faker\Container\Traits;
use Random\Randomizer;
use Xefi\Faker\Container\Container;
use Xefi\Faker\Exceptions\NoExtensionLocaleFound;
use Xefi\Faker\Extensions\Extension;
trait HasExtensions
{
/**
* The faker extensions.
*
* @var array
*/
protected static array $extens... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Container/Traits/HasStrategies.php | src/Container/Traits/HasStrategies.php | <?php
namespace Xefi\Faker\Container\Traits;
use Xefi\Faker\Strategies\RegexStrategy;
use Xefi\Faker\Strategies\Strategy;
use Xefi\Faker\Strategies\UniqueStrategy;
use Xefi\Faker\Strategies\ValidStrategy;
trait HasStrategies
{
/**
* The current instance strategies.
*
* @var Strategy[]
*/
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Container/Traits/HasModifiers.php | src/Container/Traits/HasModifiers.php | <?php
namespace Xefi\Faker\Container\Traits;
use Random\Randomizer;
use Xefi\Faker\Modifiers\LowercaseModifier;
use Xefi\Faker\Modifiers\Modifier;
use Xefi\Faker\Modifiers\NullableModifier;
use Xefi\Faker\Modifiers\UppercaseModifier;
trait HasModifiers
{
/**
* The current instance modifiers.
*
* @... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Modifiers/LowercaseModifier.php | src/Modifiers/LowercaseModifier.php | <?php
namespace Xefi\Faker\Modifiers;
class LowercaseModifier extends Modifier
{
/**
* Handle the given modifier.
*
* @param mixed $generatedValue
*
* @return mixed
*/
public function apply(mixed $generatedValue): mixed
{
if (is_string($generatedValue)) {
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Modifiers/NullableModifier.php | src/Modifiers/NullableModifier.php | <?php
namespace Xefi\Faker\Modifiers;
use Random\Randomizer;
class NullableModifier extends Modifier
{
/**
* The weight for null to be given (60 => 60% chance of null).
*
* @var int
*/
protected int $weight;
protected Randomizer $randomizer;
public function __construct(Randomize... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Modifiers/Modifier.php | src/Modifiers/Modifier.php | <?php
namespace Xefi\Faker\Modifiers;
abstract class Modifier
{
/**
* Handle the given modifier.
*
* @param mixed $generatedValue
*
* @return mixed
*/
abstract public function apply(mixed $generatedValue): mixed;
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Modifiers/UppercaseModifier.php | src/Modifiers/UppercaseModifier.php | <?php
namespace Xefi\Faker\Modifiers;
class UppercaseModifier extends Modifier
{
/**
* Handle the given modifier.
*
* @param mixed $generatedValue
*
* @return mixed
*/
public function apply(mixed $generatedValue): mixed
{
if (is_string($generatedValue)) {
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Calculators/Luhn.php | src/Calculators/Luhn.php | <?php
namespace Xefi\Faker\Calculators;
class Luhn
{
/**
* Luhn core algorithm.
*
* @param int $number
*
* @return int
*/
private static function algorithm(int $number): int
{
$sum = 0;
$parity = 1;
settype($number, 'string');
for ($i = strlen(... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Calculators/Iban.php | src/Calculators/Iban.php | <?php
namespace Xefi\Faker\Calculators;
class Iban
{
/**
* Generates IBAN Checksum.
*
* @return string Checksum (numeric string)
*/
public static function checksum(string $iban): string
{
// Move first four digits to end and set checksum to '00'
$checkString = substr($i... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Providers/Provider.php | src/Providers/Provider.php | <?php
namespace Xefi\Faker\Providers;
use Xefi\Faker\Container\Container;
class Provider
{
/**
* Register the package's custom Faker extensions.
*
* @param array $extensions
*
* @return void
*/
public function extensions(array $extensions)
{
Container::starting(funct... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Providers/ProviderRepository.php | src/Providers/ProviderRepository.php | <?php
namespace Xefi\Faker\Providers;
class ProviderRepository
{
/**
* Register the application service providers.
*
* @param array $providers
*
* @return void
*/
public function load(array $providers)
{
foreach ($providers as $provider) {
$instance = $thi... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/Extension.php | src/Extensions/Extension.php | <?php
namespace Xefi\Faker\Extensions;
use Random\Randomizer;
use ReflectionClass;
class Extension
{
protected Randomizer $randomizer;
public function __construct(Randomizer $randomizer)
{
$this->randomizer = $randomizer;
}
/**
* Returns the extension name.
*
* @return st... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/TextExtension.php | src/Extensions/TextExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Extensions\Traits\HasLocale;
class TextExtension extends Extension
{
use HasLocale;
/**
* Text in format => Paragraphs => Sentences => Words.
*
* @var array|array[]
*/
protected array $paragraphs = [
[
['Lorem'... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/DateTimeExtension.php | src/Extensions/DateTimeExtension.php | <?php
namespace Xefi\Faker\Extensions;
use DateTime;
class DateTimeExtension extends Extension
{
private array $timezones = [
'America/Chicago',
'Europe/Moscow',
'Asia/Kolkata',
'Pacific/Auckland',
'Europe/Paris',
'Africa/Nairobi',
'America/New-York',
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/GeographicalExtension.php | src/Extensions/GeographicalExtension.php | <?php
namespace Xefi\Faker\Extensions;
class GeographicalExtension extends Extension
{
public function geoLocation(): string
{
return sprintf(
'%s, %s',
$this->latitude(),
$this->longitude(),
);
}
public function latitude(): float
{
retu... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/BooleanExtension.php | src/Extensions/BooleanExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Exceptions\BadParameterException;
use Xefi\Faker\Extensions\Traits\HasLocale;
class BooleanExtension extends Extension
{
use HasLocale;
public function boolean(int $percentage = 50)
{
if ($percentage < 0 || $percentage > 100) {
th... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/ArrayExtension.php | src/Extensions/ArrayExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Extensions\Traits\HasLocale;
class ArrayExtension extends Extension
{
use HasLocale;
public function randomElement(array $array): mixed
{
return $this->pickArrayRandomElement($array);
}
public function randomKey(array $array): mixed
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/FinancialExtension.php | src/Extensions/FinancialExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Calculators\Iban;
use Xefi\Faker\Extensions\Traits\HasLocale;
class FinancialExtension extends Extension
{
use HasLocale;
/**
* @param ?string $countryCode
* @param ?string $format [{d} => digit, {l} => letter, {a} => any]
*
* @r... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/StringsExtension.php | src/Extensions/StringsExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Random\RandomException;
class StringsExtension extends Extension
{
protected $emojis = [
"\u{1F600}", "\u{1F601}", "\u{1F602}", "\u{1F603}",
"\u{1F604}", "\u{1F605}", "\u{1F606}", "\u{1F607}",
"\u{1F608}", "\u{1F609}", "\u{1F60A}", "\u{1F60B}",
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/ColorsExtension.php | src/Extensions/ColorsExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Extensions\Traits\HasLocale;
class ColorsExtension extends Extension
{
use HasLocale;
protected array $safeColorNames = [
'Niger', 'Castaneus', 'Viridis', 'Navalis', 'Oliva',
'Purpureus', 'CaeruleusMarinus', 'Lima', 'Caeruleus', 'Argenteu... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/InternetExtension.php | src/Extensions/InternetExtension.php | <?php
namespace Xefi\Faker\Extensions;
class InternetExtension extends Extension
{
protected $tld = ['com', 'biz', 'info', 'net', 'org', 'edu', 'gov', 'mil', 'co', 'io'];
public function sdl(): string
{
return $this->randomizer->getBytesFromString(
implode(range('a', 'z')),
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/NumbersExtension.php | src/Extensions/NumbersExtension.php | <?php
namespace Xefi\Faker\Extensions;
class NumbersExtension extends Extension
{
public function digit(): int
{
return $this->number(0, 9);
}
public function number(int $min, int $max): int
{
return $this->randomizer->getInt($min, $max);
}
public function float(float $mi... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/PersonExtension.php | src/Extensions/PersonExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Extensions\Traits\HasLocale;
class PersonExtension extends Extension
{
use HasLocale;
public const GENDER_MALE = 'M';
public const GENDER_FEMALE = 'F';
protected $firstNameMale = [
'Marcus',
'Lucius',
'Gaius',
'Ju... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/PhoneExtension.php | src/Extensions/PhoneExtension.php | <?php
namespace Xefi\Faker\Extensions;
use Xefi\Faker\Extensions\Traits\HasLocale;
class PhoneExtension extends Extension
{
use HasLocale;
public string $defaultPrefix = '';
public string $indicator = '00';
protected array $landlineFormats = [
'{d}{d}{separator}{d}{d}{separator}{d}{d}{sepa... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/HashExtension.php | src/Extensions/HashExtension.php | <?php
namespace Xefi\Faker\Extensions;
class HashExtension extends Extension
{
protected function hash(string $algo): string
{
return hash($algo, $this->randomizer->getBytes(16));
}
public function md5(): string
{
return $this->hash('md5');
}
public function sha1(): strin... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/src/Extensions/Traits/HasLocale.php | src/Extensions/Traits/HasLocale.php | <?php
namespace Xefi\Faker\Extensions\Traits;
trait HasLocale
{
/**
* The extension locale (BCP 47 Code).
*
* @return ?string
*/
public function getLocale(): ?string
{
return null;
}
}
| php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/tests/Support/TestServiceProvider.php | tests/Support/TestServiceProvider.php | <?php
namespace Xefi\Faker\Tests\Support;
use Xefi\Faker\Providers\Provider;
use Xefi\Faker\Tests\Support\Extensions\NumberTestExtension;
use Xefi\Faker\Tests\Support\Extensions\StringTestExtension;
class TestServiceProvider extends Provider
{
public function boot(): void
{
$this->extensions([
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/tests/Support/Extensions/EnEnExtensionTest.php | tests/Support/Extensions/EnEnExtensionTest.php | <?php
namespace Xefi\Faker\Tests\Support\Extensions;
use Xefi\Faker\Extensions\Extension;
use Xefi\Faker\Extensions\Traits\HasLocale;
class EnEnExtensionTest extends Extension
{
use HasLocale;
public function getName(): string
{
return 'locale-extension-test';
}
public function getLocal... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/tests/Support/Extensions/StringTestExtension.php | tests/Support/Extensions/StringTestExtension.php | <?php
namespace Xefi\Faker\Tests\Support\Extensions;
use Xefi\Faker\Extensions\Extension;
class StringTestExtension extends Extension
{
public function returnHello()
{
return 'hello';
}
public function returnHelloUppercase()
{
return 'HELLO';
}
public function returnAcce... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
xefi/faker-php | https://github.com/xefi/faker-php/blob/6e542ce699a98a1c4dcaea19f98119ed1941641c/tests/Support/Extensions/MixinTestExtension.php | tests/Support/Extensions/MixinTestExtension.php | <?php
namespace Xefi\Faker\Tests\Support\Extensions;
use Xefi\Faker\Extensions\Extension;
class MixinTestExtension extends Extension
{
public function withoutParameters()
{
}
public function withNoTypeParameters($one, $two)
{
}
public function withTypedParameters(int $one, string $two)
... | php | Apache-2.0 | 6e542ce699a98a1c4dcaea19f98119ed1941641c | 2026-01-05T04:04:59.157697Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.