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
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Resources/Gen/GoalsBase.php
src/Asana/Resources/Gen/GoalsBase.php
<?php namespace Asana\Resources\Gen; class GoalsBase { /** * @param Asana/Client client The client instance */ public function __construct($client) { $this->client = $client; } /** Add a collaborator to a goal * * @param string $goal_gid (required) Globally unique i...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Resources/Gen/ProjectsBase.php
src/Asana/Resources/Gen/ProjectsBase.php
<?php namespace Asana\Resources\Gen; class ProjectsBase { /** * @param Asana/Client client The client instance */ public function __construct($client) { $this->client = $client; } /** Add a custom field to a project * * @param string $project_gid (required) Globally...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Resources/Gen/AuditLogAPIBase.php
src/Asana/Resources/Gen/AuditLogAPIBase.php
<?php namespace Asana\Resources\Gen; class AuditLogAPIBase { /** * @param Asana/Client client The client instance */ public function __construct($client) { $this->client = $client; } /** Get audit log events * * @param string $workspace_gid (required) Globally uniqu...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Resources/Gen/GoalRelationshipsBase.php
src/Asana/Resources/Gen/GoalRelationshipsBase.php
<?php namespace Asana\Resources\Gen; class GoalRelationshipsBase { /** * @param Asana/Client client The client instance */ public function __construct($client) { $this->client = $client; } /** Add a supporting goal relationship * * @param string $goal_gid (required)...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/RateLimitEnforcedError.php
src/Asana/Errors/RateLimitEnforcedError.php
<?php namespace Asana\Errors; use Asana\Errors\RetryableAsanaError; class RateLimitEnforcedError extends RetryableAsanaError { const MESSAGE = 'Rate Limit Enforced'; const STATUS = 429; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/ServerError.php
src/Asana/Errors/ServerError.php
<?php namespace Asana\Errors; use Asana\Errors\RetryableAsanaError; class ServerError extends RetryableAsanaError { const MESSAGE = 'Server Error'; const STATUS = 500; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/AsanaError.php
src/Asana/Errors/AsanaError.php
<?php namespace Asana\Errors; use Asana\Errors\ForbiddenError; use Asana\Errors\InvalidRequestError; use Asana\Errors\InvalidTokenError; use Asana\Errors\NoAuthorizationError; use Asana\Errors\NotFoundError; use Asana\Errors\RateLimitEnforcedError; use Asana\Errors\ServerError; class AsanaError extends \Exception { ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/RetryableAsanaError.php
src/Asana/Errors/RetryableAsanaError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class RetryableAsanaError extends AsanaError { }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/PremiumOnlyError.php
src/Asana/Errors/PremiumOnlyError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class PremiumOnlyError extends AsanaError { const MESSAGE = 'Payment Required'; const STATUS = 402; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/ForbiddenError.php
src/Asana/Errors/ForbiddenError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class ForbiddenError extends AsanaError { const MESSAGE = 'Forbidden'; const STATUS = 403; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/NotFoundError.php
src/Asana/Errors/NotFoundError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class NotFoundError extends AsanaError { const MESSAGE = 'Not Found'; const STATUS = 404; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/InvalidRequestError.php
src/Asana/Errors/InvalidRequestError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class InvalidRequestError extends AsanaError { const MESSAGE = 'Invalid Request'; const STATUS = 400; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/InvalidTokenError.php
src/Asana/Errors/InvalidTokenError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class InvalidTokenError extends AsanaError { const MESSAGE = 'Sync token invalid or too old'; const STATUS = 412; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); $this->sy...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/src/Asana/Errors/NoAuthorizationError.php
src/Asana/Errors/NoAuthorizationError.php
<?php namespace Asana\Errors; use Asana\Errors\AsanaError; class NoAuthorizationError extends AsanaError { const MESSAGE = 'No Authorization'; const STATUS = 401; public function __construct($response) { parent::__construct(self::MESSAGE, self::STATUS, $response); } }
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Bootstrap.php
tests/Bootstrap.php
<?php // Setup autoloading require dirname(__FILE__) . '/../vendor/autoload.php';
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/ClientTest.php
tests/Asana/ClientTest.php
<?php namespace Asana; use Asana\Test\AsanaTest; use Asana\Errors\Error; use Asana\Errors\ServerError; use PHPUnit\Framework\Error\Warning; class ClientTest extends Test\AsanaTest { var $errors = array(); public function testClientGet() { $this->dispatcher->registerResponse('/users/me', 200, nul...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/ResourcesTest.php
tests/Asana/ResourcesTest.php
<?php namespace Asana; use Asana\Test\AsanaTest; class ResourcesTest extends Test\AsanaTest { private static $RESOURCES = array( 'attachments', 'events', 'projects', 'stories', 'tags', 'tasks', 'teams', 'users', 'workspaces', 'webhoo...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/OAuthDispatcherTest.php
tests/Asana/OAuthDispatcherTest.php
<?php namespace Asana; use Asana\Test\AsanaTest; use Asana\Test\MockRequest; use Asana\Dispatcher\OAuthDispatcher; // Extend dispatcher to expose protected methods for testing. class FakeOauthDispatcher extends OAuthDispatcher { public function authenticate($request) { return parent::authenticate($r...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/Resources/AttachmentsTest.php
tests/Asana/Resources/AttachmentsTest.php
<?php namespace Asana; use Asana\Test\AsanaTest; class AttachmentsTest extends Test\AsanaTest { public function testAttachmentsCreateOnTask() { $res = '{ "data": { "id": 5678, "name": "file.txt" } }'; $this->dispatcher->registerResponse('/tasks/1337/attachments', 200, null, $res); $r...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/Resources/EventsTest.php
tests/Asana/Resources/EventsTest.php
<?php namespace Asana; use Asana\Errors; use Asana\Test\AsanaTest; class EventsTest extends Test\AsanaTest { public function testEventsGet() { $res = '{ "data": ["a", "b"], "sync": "b" }'; $this->dispatcher->registerResponse('/events?resource=14321&sync=a', 200, null, $res); $result ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/tests/Asana/Resources/WebhooksTest.php
tests/Asana/Resources/WebhooksTest.php
<?php namespace Asana; use Asana\Test\AsanaTest; class WebhooksTest extends Test\AsanaTest { private $data = array( 'id' => 222, 'resource' => array( 'id' => 111, 'name' => 'the resource' ), 'target' => 'https://foo/123', 'active' => true ); private function...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/examples/example-create-project-and-stream-events.php
examples/example-create-project-and-stream-events.php
<?php require dirname(__FILE__) . '/../vendor/autoload.php'; use Asana\Client; $ASANA_ACCESS_TOKEN = getenv('ASANA_ACCESS_TOKEN'); // Access Token Instructions: // 1. set your ASANA_ACCESS_TOKEN environment variable to a Personal Access Token found in Asana Account Settings if ($ASANA_ACCESS_TOKEN === false) { ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/examples/example-accesstoken.php
examples/example-accesstoken.php
<?php require dirname(__FILE__) . '/../vendor/autoload.php'; use Asana\Client; $ASANA_ACCESS_TOKEN = getenv('ASANA_ACCESS_TOKEN'); // Access Token Instructions: // 1. set your ASANA_ACCESS_TOKEN environment variable to a Personal Access Token found in Asana Account Settings if ($ASANA_ACCESS_TOKEN === false) { ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/examples/example-server.php
examples/example-server.php
<?php require dirname(__FILE__) . '/../vendor/autoload.php'; use Asana\Client; function client($token=null) { return Asana\Client::oauth(array( 'client_id' => getenv('ASANA_CLIENT_ID'), 'client_secret' => getenv('ASANA_CLIENT_SECRET'), 'redirect_uri' => 'http://localhost:5000/auth/asana/c...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/examples/example-create-task-and-upload.php
examples/example-create-task-and-upload.php
<?php require dirname(__FILE__) . '/../vendor/autoload.php'; use Asana\Client; $ASANA_ACCESS_TOKEN = getenv('ASANA_ACCESS_TOKEN'); // Access Token Instructions: // 1. set your ASANA_ACCESS_TOKEN environment variable to a Personal Access Token found in Asana Account Settings if ($ASANA_ACCESS_TOKEN === false) { ...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
Asana/php-asana
https://github.com/Asana/php-asana/blob/88868108be00da49fbf0c101d0c078edebc0bf3f/examples/example-oauth.php
examples/example-oauth.php
<?php require dirname(__FILE__) . '/../vendor/autoload.php'; $ASANA_CLIENT_ID = getenv('ASANA_CLIENT_ID'); $ASANA_CLIENT_SECRET = getenv('ASANA_CLIENT_SECRET'); // OAuth Instructions: // 1. create a new application in your Asana Account Settings ("App" panel) // 2. set the redirect URL to "urn:ietf:wg:oauth:2.0:oob...
php
MIT
88868108be00da49fbf0c101d0c078edebc0bf3f
2026-01-05T04:58:34.842652Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/rector.php
rector.php
<?php declare(strict_types=1); use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\Config\RectorConfig; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Php81\Rector\Array_\FirstClassCallableRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArg...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/src/Autoload.php
src/Autoload.php
<?php declare(strict_types=1); namespace Spatie\RouteTesting; use Pest\Plugin; Plugin::uses(RouteTestable::class); if (! function_exists('routeTesting')) { function routeTesting(string $description) { return new RouteTestingTestCall(test($description)); } }
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/src/RouteResolver.php
src/RouteResolver.php
<?php namespace Spatie\RouteTesting; use Exception; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Process; use Illuminate\Support\Str; use Symfony\Component\Process\Process as SymfonyProcess; class RouteResolver { /** @var array<int, string>|null */ protected ?array $paths = null; /*...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/src/RouteTest.php
src/RouteTest.php
<?php namespace Spatie\RouteTesting; use Closure; use Illuminate\Routing\Exceptions\UrlGenerationException; use Illuminate\Routing\Route; use Illuminate\Support\Facades\Route as RouteFacade; use Illuminate\Testing\TestResponse; use Pest\PendingCalls\BeforeEachCall; use Pest\PendingCalls\TestCall; use Pest\Support\Bac...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/src/RouteTestable.php
src/RouteTestable.php
<?php declare(strict_types=1); namespace Spatie\RouteTesting; /** * @internal */ trait RouteTestable { public function bind(string $binding, mixed $value): self { $this->parameters[$binding] = $value; return $this; } }
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/src/RouteTestingTestCall.php
src/RouteTestingTestCall.php
<?php namespace Spatie\RouteTesting; use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Traits\ForwardsCalls; use Illuminate\Testing\TestResponse; use Pest\PendingCalls\TestCall; /** @mixin TestResponse|TestCall */ class RouteTestingTestCall { use ForwardsCalls; protected TestCall $testCall; ...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/tests/RouteTestingTestCallTest.php
tests/RouteTestingTestCallTest.php
<?php use Pest\PendingCalls\TestCall; use Pest\TestSuite; use Spatie\RouteTesting\RouteTestingTestCall; it('can use any assertion', function (string $assertion, array $expectedAssertions) { $routeTestingTestCall = createRouteTestingTestCall(); $routeTestingTestCall->$assertion(); expect($routeTestingTest...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/tests/Pest.php
tests/Pest.php
<?php use Pest\Matchers\Any; use PHPUnit\Framework\Assert; use Tests\TestCase; uses(TestCase::class)->in(__DIR__); expect()->extend('toContainRoutes', function (array $expectedRoutes) { $routesNames = collect($this->value)->map(fn ($route) => $route[1])->values()->toArray(); Assert::assertEqualsCanonicalizi...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/tests/TestCase.php
tests/TestCase.php
<?php namespace Tests; use Orchestra\Testbench\TestCase as BaseTestCase; class TestCase extends BaseTestCase {}
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/tests/RouteResolverTest.php
tests/RouteResolverTest.php
<?php use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Route; use Spatie\RouteTesting\RouteResolver; it('can get a routes', function () { setUpRoutes([ 'one', 'two', 'three', ]); $routes = (new RouteResolver)->getFilter...
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
spatie/pest-plugin-route-testing
https://github.com/spatie/pest-plugin-route-testing/blob/aafb6ca72216d7f00589cb7ae5cdc167de4402bc/tests/ArchTest.php
tests/ArchTest.php
<?php arch('it will not use debugging functions') ->expect(['dd', 'dump', 'ray']) ->each->not->toBeUsed();
php
MIT
aafb6ca72216d7f00589cb7ae5cdc167de4402bc
2026-01-05T04:58:46.751633Z
false
davidearl/webauthn
https://github.com/davidearl/webauthn/blob/91d2011226193eadd383ff407b41d7e8261d43f4/tests/units/WebAuthn.php
tests/units/WebAuthn.php
<?php namespace test\units\Davidearl\WebAuthn; use atoum; class WebAuthn extends atoum { public function testPublicKeyOptions() { $this ->given($this->newTestedInstance('app.com')) ->then ->string($this->testedInstance->prepareChallengeForRegistration('test', 1...
php
MIT
91d2011226193eadd383ff407b41d7e8261d43f4
2026-01-05T04:58:53.807707Z
false
davidearl/webauthn
https://github.com/davidearl/webauthn/blob/91d2011226193eadd383ff407b41d7e8261d43f4/example/index.php
example/index.php
<?php /* If you put the whole webauthn directory in the www document root and put an index.php in there which just includes this file, it should then work. Alternatively set it as a link to this file. */ require_once(dirname(__DIR__).'/vendor/autoload.php'); /* In this example, the user database is simply a director...
php
MIT
91d2011226193eadd383ff407b41d7e8261d43f4
2026-01-05T04:58:53.807707Z
false
davidearl/webauthn
https://github.com/davidearl/webauthn/blob/91d2011226193eadd383ff407b41d7e8261d43f4/WebAuthn/WebAuthn.php
WebAuthn/WebAuthn.php
<?php namespace Davidearl\WebAuthn; //use phpseclib\Crypt\RSA; use phpseclib3\Crypt\PublicKeyLoader; use phpseclib3\Math\BigInteger; /** * @package davidearl\webauthn * * * A class to help manage keys via the webauthn protocol. * * Webauthn allows for browser logins using a physical key (such as a * Yubikey 2) or, i...
php
MIT
91d2011226193eadd383ff407b41d7e8261d43f4
2026-01-05T04:58:53.807707Z
false
wotzebra/unique-codes
https://github.com/wotzebra/unique-codes/blob/ec9ee4c994bfea4922a13dae98e8388c4e0f34d7/.php-cs-fixer.php
.php-cs-fixer.php
<?php use AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer; use PhpCsFixer\Config; use PhpCsFixer\Finder; $rules = [ '@PSR2' => true, // Each line of multi-line DocComments must have an asterisk [PSR-5] and must be aligned with the first one. // 'align_multiline_comment' => true, // Each...
php
MIT
ec9ee4c994bfea4922a13dae98e8388c4e0f34d7
2026-01-05T04:59:19.140159Z
false
wotzebra/unique-codes
https://github.com/wotzebra/unique-codes/blob/ec9ee4c994bfea4922a13dae98e8388c4e0f34d7/src/UniqueCodes.php
src/UniqueCodes.php
<?php namespace Wotz\UniqueCodes; use RuntimeException; class UniqueCodes { /** * The prime number that is used to convert a number to a unique other number within the maximum range. * * @var int */ protected $obfuscatingPrime; /** * The prime number that is one larger than the ...
php
MIT
ec9ee4c994bfea4922a13dae98e8388c4e0f34d7
2026-01-05T04:59:19.140159Z
false
wotzebra/unique-codes
https://github.com/wotzebra/unique-codes/blob/ec9ee4c994bfea4922a13dae98e8388c4e0f34d7/tests/UniqueCodesTest.php
tests/UniqueCodesTest.php
<?php namespace Wotz\UniqueCodes\Tests; use Generator; use PHPUnit\Framework\TestCase; use ReflectionClass; use RuntimeException; use Wotz\UniqueCodes\UniqueCodes; class UniqueCodesTest extends TestCase { /** * @test * * @dataProvider uniqueCodesProvider */ public function it_generates_un...
php
MIT
ec9ee4c994bfea4922a13dae98e8388c4e0f34d7
2026-01-05T04:59:19.140159Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/rector.php
rector.php
<?php declare(strict_types=1); use Rector\Config\RectorConfig; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ __DIR__.'/src', ]); $rectorConfig->sets([ LevelSetList::UP_TO_PHP...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/TailwindMerge.php
src/TailwindMerge.php
<?php namespace TailwindMerge; use Psr\SimpleCache\CacheInterface; use TailwindMerge\Contracts\TailwindMergeContract; use TailwindMerge\Support\Collection; use TailwindMerge\Support\Config; use TailwindMerge\Support\Str; use TailwindMerge\Support\TailwindClassParser; use TailwindMerge\ValueObjects\ParsedClass; class...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Factory.php
src/Factory.php
<?php namespace TailwindMerge; use Psr\SimpleCache\CacheInterface; use TailwindMerge\Support\Config; final class Factory { /** * @var array<string, mixed> */ private array $additionalConfiguration = []; private ?CacheInterface $cache = null; /** * Override the default configuration. ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/Collection.php
src/Support/Collection.php
<?php namespace TailwindMerge\Support; /** * @template TKey of array-key * @template TValue * * @internal */ class Collection { /** * @var array<TKey, TValue> */ protected array $items = []; /** * @param self<array-key, TValue>|array<array-key, TValue> $items * @return void ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/ClassMap.php
src/Support/ClassMap.php
<?php namespace TailwindMerge\Support; use TailwindMerge\ValueObjects\ClassPartObject; use TailwindMerge\ValueObjects\ClassValidatorObject; use TailwindMerge\ValueObjects\ThemeGetter; class ClassMap { final public const CLASS_PART_SEPARATOR = '-'; /** * @param array{cacheSize: int, prefix: ?string, th...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/Arr.php
src/Support/Arr.php
<?php namespace TailwindMerge\Support; class Arr { /** * @param array<array-key, mixed> $array * @return array<int, mixed> */ public static function flatten(array $array, int $depth = PHP_INT_MAX): array { $result = []; foreach ($array as $item) { $item = $ite...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/TailwindClassParser.php
src/Support/TailwindClassParser.php
<?php namespace TailwindMerge\Support; use TailwindMerge\ValueObjects\ClassPartObject; use TailwindMerge\ValueObjects\ClassValidatorObject; use TailwindMerge\ValueObjects\ParsedClass; class TailwindClassParser { final public const CLASS_PART_SEPARATOR = '-'; final public const ARBITRARY_PROPERTY_REGEX = '/^...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/Config.php
src/Support/Config.php
<?php namespace TailwindMerge\Support; use TailwindMerge\Validators\AnyValueValidator; use TailwindMerge\Validators\ArbitraryImageValidator; use TailwindMerge\Validators\ArbitraryLengthValidator; use TailwindMerge\Validators\ArbitraryNumberValidator; use TailwindMerge\Validators\ArbitraryPositionValidator; use Tailwi...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
true
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/Str.php
src/Support/Str.php
<?php namespace TailwindMerge\Support; class Str { public static function hasMatch(string $pattern, string $value): bool { return preg_match($pattern, $value) === 1; } public static function of(string $string): Stringable { return new Stringable($string); } public static ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Support/Stringable.php
src/Support/Stringable.php
<?php namespace TailwindMerge\Support; class Stringable { public function __construct(protected string $value) { } public function trim(string $characters = ' '): self { return new self(trim($this->value, $characters)); } /** * @return Collection<int, string> */ pub...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Contracts/TailwindMergeContract.php
src/Contracts/TailwindMergeContract.php
<?php namespace TailwindMerge\Contracts; interface TailwindMergeContract { /** * @param string|array<array-key, string|array<array-key, string>> ...$args */ public function merge(...$args): string; }
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Contracts/ValidatorContract.php
src/Contracts/ValidatorContract.php
<?php namespace TailwindMerge\Contracts; /** * @internal */ interface ValidatorContract { public static function validate(string $value): bool; }
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/ValueObjects/ParsedClass.php
src/ValueObjects/ParsedClass.php
<?php namespace TailwindMerge\ValueObjects; class ParsedClass { /** * @param array<array-key, string> $modifiers */ public function __construct( public array $modifiers, public bool $hasImportantModifier, public bool $hasPostfixModifier, public string $modifierId, ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/ValueObjects/ClassValidatorObject.php
src/ValueObjects/ClassValidatorObject.php
<?php namespace TailwindMerge\ValueObjects; use Closure; class ClassValidatorObject { public function __construct( public string $classGroupId, public Closure $validator, ) { } }
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/ValueObjects/ThemeGetter.php
src/ValueObjects/ThemeGetter.php
<?php namespace TailwindMerge\ValueObjects; class ThemeGetter { public function __construct( public string $key ) { } /** * @param array<string, array<string, mixed>> $theme * @return array<string, mixed> */ public function get(array $theme): array { return $t...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/ValueObjects/ClassPartObject.php
src/ValueObjects/ClassPartObject.php
<?php namespace TailwindMerge\ValueObjects; class ClassPartObject { /** * @param array<array-key, ClassPartObject> $nextPart * @param array<array-key, ClassValidatorObject> $validators */ public function __construct( public array $nextPart = [], public array $validators = []...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryShadowValidator.php
src/Validators/ArbitraryShadowValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitraryShadowValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; final public const SHADOW_REGEX = '...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/PercentValidator.php
src/Validators/PercentValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; /** * @internal */ class PercentValidator implements \TailwindMerge\Contracts\ValidatorContract { public static function validate(string $value): bool { if (! Str::endsWith($value, '%')) { return false; } ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/AnyValueValidator.php
src/Validators/AnyValueValidator.php
<?php namespace TailwindMerge\Validators; /** * @internal */ class AnyValueValidator implements \TailwindMerge\Contracts\ValidatorContract { public static function validate(string $value): bool { return true; } }
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryLengthValidator.php
src/Validators/ArbitraryLengthValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitraryLengthValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; final public const LENGTH_UNIT_REGE...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/LengthValidator.php
src/Validators/LengthValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Collection; use TailwindMerge\Support\Str; /** * @internal */ class LengthValidator implements \TailwindMerge\Contracts\ValidatorContract { final public const FRACTION_REGEX = '/^\d+\/\d+$/'; public static function validate(string $value)...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryNumberValidator.php
src/Validators/ArbitraryNumberValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitraryNumberValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; public static function validate(string $value): bool { ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/TshirtSizeValidator.php
src/Validators/TshirtSizeValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; /** * @internal */ class TshirtSizeValidator implements \TailwindMerge\Contracts\ValidatorContract { final public const T_SHIRT_UNIT_REGEX = '/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/'; public static function validate(string $value): bool ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryPositionValidator.php
src/Validators/ArbitraryPositionValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitraryPositionValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; public static function validate(string $value): bool { ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/NumberValidator.php
src/Validators/NumberValidator.php
<?php namespace TailwindMerge\Validators; /** * @internal */ class NumberValidator implements \TailwindMerge\Contracts\ValidatorContract { public static function validate(string $value): bool { return is_numeric($value); } }
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryValueValidator.php
src/Validators/ArbitraryValueValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; /** * @internal */ class ArbitraryValueValidator implements \TailwindMerge\Contracts\ValidatorContract { final public const ARBITRARY_VALUE_REGEX = '/^\[(?:([a-z-]+):)?(.+)\]$/i'; public static function validate(string $value): bool ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitrarySizeValidator.php
src/Validators/ArbitrarySizeValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitrarySizeValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; public static function validate(string $value): bool { r...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/ArbitraryImageValidator.php
src/Validators/ArbitraryImageValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Support\Str; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class ArbitraryImageValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; final public const IMAGE_REGEX = '/^...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/IntegerValidator.php
src/Validators/IntegerValidator.php
<?php namespace TailwindMerge\Validators; use TailwindMerge\Validators\Concerns\ValidatesArbitraryValue; /** * @internal */ class IntegerValidator implements \TailwindMerge\Contracts\ValidatorContract { use ValidatesArbitraryValue; public static function validate(string $value): bool { return ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/src/Validators/Concerns/ValidatesArbitraryValue.php
src/Validators/Concerns/ValidatesArbitraryValue.php
<?php namespace TailwindMerge\Validators\Concerns; /** * @internal */ trait ValidatesArbitraryValue { /** * @param string|array<array-key, string> $labels */ protected static function getIsArbitraryValue(string $value, string|array $labels, callable $isLengthOnly): bool { $labels = i...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Pest.php
tests/Pest.php
<?php
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ClassGroupConflictsTest.php
tests/Feature/ClassGroupConflictsTest.php
<?php use TailwindMerge\TailwindMerge; it('merges classes from same group correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['overflow-x-auto overflow-x-hidden', 'overflow-x-hidden'], ['w-full w-fit', 'w-fit'], [...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ColorsTest.php
tests/Feature/ColorsTest.php
<?php use TailwindMerge\TailwindMerge; it('handles color conflicts properly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['bg-grey-5 bg-hotpink', 'bg-hotpink'], ['hover:bg-grey-5 hover:bg-hotpink', 'hover:bg-hotpink'], ])...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/TailwindCssVersionsTest.php
tests/Feature/TailwindCssVersionsTest.php
<?php use TailwindMerge\TailwindMerge; it('supports Tailwind CSS v3.3 features', function (string|array $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['text-red text-lg/7 text-lg/8', 'text-red text-lg/8'], [[ 'start-0 start-1', ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/CacheTest.php
tests/Feature/CacheTest.php
<?php use Psr\SimpleCache\CacheInterface; use TailwindMerge\TailwindMerge; it('does cache the result', function () { $cache = new FakeCache(); $twMerge = TailwindMerge::factory()->withCache($cache)->make(); expect($twMerge->merge('text-red-500 text-green-500')) ->toBe('text-green-500'); exp...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/MergeConfigsTest.php
tests/Feature/MergeConfigsTest.php
<?php it('merge the config correctly', function () { $config = \TailwindMerge\Support\Config::getMergedConfig(); })->todo();
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/NegativeValuesTest.php
tests/Feature/NegativeValuesTest.php
<?php use TailwindMerge\TailwindMerge; it('handles negative value conflicts correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['-m-2 -m-5', '-m-5'], ['-top-12 -top-2000', '-top-2000'], ]); it('handles conflicts betw...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ArbitraryValuesTest.php
tests/Feature/ArbitraryValuesTest.php
<?php use TailwindMerge\TailwindMerge; it('handles simple conflicts with arbitrary values correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['m-[2px] m-[10px]', 'm-[10px]'], ['m-[2px] m-[11svmin] m-[12in] m-[13lvi] m...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ArbitraryVariantsTest.php
tests/Feature/ArbitraryVariantsTest.php
<?php use TailwindMerge\TailwindMerge; it('basic arbitrary variants', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['[&>*]:underline [&>*]:line-through', '[&>*]:line-through'], ['[&>*]:underline [&>*]:line-through [&_div]:l...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/StandaloneClassesTest.php
tests/Feature/StandaloneClassesTest.php
<?php use TailwindMerge\TailwindMerge; it('merges standalone classes from same group correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['inline block', 'block'], ['hover:block hover:inline', 'hover:inline'], ['ho...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ConflictsAcrossClassGroupsTest.php
tests/Feature/ConflictsAcrossClassGroupsTest.php
<?php use TailwindMerge\TailwindMerge; it('handles conflicts across class groups correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['inset-1 inset-x-1', 'inset-1 inset-x-1'], ['inset-x-1 inset-1', 'inset-1'], ['i...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/PerSideBorderColorsTest.php
tests/Feature/PerSideBorderColorsTest.php
<?php use TailwindMerge\TailwindMerge; it('merges classes with per-side border colors correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['border-t-some-blue border-t-other-blue', 'border-t-other-blue'], ['border-t-so...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ArbitraryPropertiesTest.php
tests/Feature/ArbitraryPropertiesTest.php
<?php use TailwindMerge\TailwindMerge; it('handles arbitrary property conflicts correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['[paint-order:markers] [paint-order:normal]', '[paint-order:normal]'], ['[paint-order...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/NonTailwindClasses.php
tests/Feature/NonTailwindClasses.php
<?php use TailwindMerge\TailwindMerge; it('does not alter non-tailwind classes', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['non-tailwind-class inline block', 'non-tailwind-class block'], ['inline block inline-1', 'block...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/PrefixesTest.php
tests/Feature/PrefixesTest.php
<?php use TailwindMerge\TailwindMerge; it('works with a prefix correctly', function (string $input, string $output) { $instance = TailwindMerge::factory() ->withConfiguration([ 'prefix' => 'tw-', ])->make(); expect($instance->merge($input)) ->toBe($output); })->with([ ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ImportantModifierTest.php
tests/Feature/ImportantModifierTest.php
<?php use TailwindMerge\TailwindMerge; it('merges tailwind classes with important modifier correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['!font-medium !font-bold', '!font-bold'], ['!font-medium !font-bold font-t...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/TailwindMergeTest.php
tests/Feature/TailwindMergeTest.php
<?php use TailwindMerge\TailwindMerge; it('does basic merges', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['h-10 w-10', 'h-10 w-10'], ['mix-blend-normal mix-blend-multiply', 'mix-blend-multiply'], ['h-10 h-min', 'h-mi...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/PseudoVariants.php
tests/Feature/PseudoVariants.php
<?php use TailwindMerge\TailwindMerge; it('handles pseudo variants conflicts properly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['empty:p-2 empty:p-3', 'empty:p-3'], ['hover:empty:p-2 hover:empty:p-3', 'hover:empty:p-3...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/PublicApiTest.php
tests/Feature/PublicApiTest.php
<?php // TODO: not sure if this we need this at all
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/DefaultConfigTest.php
tests/Feature/DefaultConfigTest.php
<?php test('default config has correct types', function () { $defaultConfig = \TailwindMerge\Support\Config::getDefaultConfig(); expect($defaultConfig) ->not->toHaveKey('nonExistent') ->cacheSize->toBe(500) ->classGroups->display->{0}->toBe('block') ->classGroups->overflow->{0}...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/SeparatorsTest.php
tests/Feature/SeparatorsTest.php
<?php use TailwindMerge\TailwindMerge; test('single character separator working correctly', function ($input, $output) { $instance = TailwindMerge::factory() ->withConfiguration([ 'separator' => '_', ]) ->make(); expect($instance->merge($input))->toBe($output); })->with([ ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/CreateTailwindMergeTest.php
tests/Feature/CreateTailwindMergeTest.php
<?php use TailwindMerge\TailwindMerge; test('createTailwindMerge works with single config function', function ($input, $output) { $instance = TailwindMerge::factory() ->withConfiguration([ 'cacheSize' => 20, 'theme' => [], 'classGroups' => [ 'fooKey' => ...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ContentUtilitiesTest.php
tests/Feature/ContentUtilitiesTest.php
<?php use TailwindMerge\TailwindMerge; test('merges content utilities correctly', function () { expect(TailwindMerge::instance()->merge("content-['hello'] content-[attr(data-content)]"))->toBe( 'content-[attr(data-content)]', ); });
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ThemeTest.php
tests/Feature/ThemeTest.php
<?php use TailwindMerge\Support\Config; use TailwindMerge\TailwindMerge; test('theme scale can be extended', function ($input, $output) { $instance = TailwindMerge::factory() ->withConfiguration([ 'theme' => [ 'spacing' => ['my-space'], 'margin' => ['my-margin']...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/ModifiersTest.php
tests/Feature/ModifiersTest.php
<?php use TailwindMerge\TailwindMerge; it('conflicts across prefix modifiers', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['hover:block hover:inline', 'hover:inline'], ['hover:block hover:focus:inline', 'hover:block hover...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Feature/NonConflictingClassses.php
tests/Feature/NonConflictingClassses.php
<?php use TailwindMerge\TailwindMerge; it('merges non-conflicting classes correctly', function (string $input, string $output) { expect(TailwindMerge::instance()->merge($input)) ->toBe($output); })->with([ ['border-t border-white/10', 'border-t border-white/10'], ['border-t border-white', 'border-...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false
gehrisandro/tailwind-merge-php
https://github.com/gehrisandro/tailwind-merge-php/blob/dc11b9d4a625dd5be885900e5ef14c3efa260277/tests/Unit/ClassMapTest.php
tests/Unit/ClassMapTest.php
<?php use TailwindMerge\Support\ClassMap; use TailwindMerge\Support\Collection; use TailwindMerge\Support\Config; use TailwindMerge\ValueObjects\ClassPartObject; test('class map has correct class groups at first part', function () { $classMap = ClassMap::create(Config::getDefaultConfig()); $classGroupsByFirs...
php
MIT
dc11b9d4a625dd5be885900e5ef14c3efa260277
2026-01-05T04:59:39.669817Z
false