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 |
|---|---|---|---|---|---|---|---|---|
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-527.php | tests/src/Rules/data/bug-527.php | <?php
namespace Bug527;
use Drupal\Core\Security\Attribute\TrustedCallback;
class Foo {
#[TrustedCallback]
public static function someTrustedCallback() {
}
public static function someCallback() {
}
public function render(): array {
return [
'one' => [
'... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-396a1.php | tests/src/Rules/data/bug-396a1.php | <?php
namespace Bug396a;
function foo() {
$query = \Drupal::entityQuery('user')
->condition('status', 1)
->condition('uid', 1, '<>')
->condition('field_profile_visibility', 1)
->condition('field_account_type', '', '<>')
->condition('field_last_name.value', '', '<>');
if... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-475b.php | tests/src/Rules/data/bug-475b.php | <?php
namespace Bug475CacheKeyExample;
/**
* Cache key differs if in class so this tests that too
*
* @return void
*/
class TestClass
{
public function bug475Caching(): void
{
// Here condition() return type will be cached as one that has no access check
\Drupal::entityQuery('node')
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-547.php | tests/src/Rules/data/bug-547.php | <?php
namespace Bug547;
/**
* Tests moduleHandler::loadInclude where $name argument includes a variable.
*/
class TestClass {
/**
* Code snippet from core/modules/system/tests/modules/entity_test/entity_test.install.
*/
function bug547(): void
{
$module_handler = \Drupal::moduleHandle... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-515.php | tests/src/Rules/data/bug-515.php | <?php
namespace NightwatchSetup;
use Drupal\TestSite\TestSetupInterface;
final class TestSetup implements TestSetupInterface {
public function setup()
{
\Drupal::service('module_installer')->install(['node', 'block']);
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/plugin-manager-alter-info.php | tests/src/Rules/data/plugin-manager-alter-info.php | <?php
namespace PluginManagerAlterInfo;
use Drupal\Core\Plugin\Discovery\YamlDiscovery;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
class AnnotationsMissingAlterInfo extends DefaultPluginManager {
public function __construct(
\Traversable $namespaces,
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-580.php | tests/src/Rules/data/bug-580.php | <?php
namespace Bug580;
class Foo {
public function bar() {
function baz() {
\Drupal::a();
}
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-474.php | tests/src/Rules/data/bug-474.php | <?php
namespace Bug474;
class TestClass {
/**
* Tests entity queries using getAggregateQuery with access check.
*/
function bug474(): void
{
\Drupal::entityTypeManager()->getStorage('node')
->getAggregateQuery()
->accessCheck(FALSE)
->condition('field... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-479.php | tests/src/Rules/data/bug-479.php | <?php
namespace Bug479Example;
class TestClass {
/**
* Tests non-chained entity queries with access check.
*/
public function bug479(string $entity_type): void
{
$query = \Drupal::entityQuery('entity_form_display');
$query->execute();
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-543.php | tests/src/Rules/data/bug-543.php | <?php
namespace Bug543;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Security\TrustedCallbackInterface;
/**
* Code snippets from \Drupal\Tests\Core\Render\RendererTest.
*/
class TestClass {
/**
* Provides a list of both booleans.
*
* @return array
*/
public static function prov... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-396b.php | tests/src/Rules/data/bug-396b.php | <?php
namespace Bug396b;
use Drupal\Core\Entity\EntityTypeManagerInterface;
class Foo {
private EntityTypeManagerInterface $entityTypeManager;
private string $entityTypeId;
public function __construct(EntityTypeManagerInterface $entityTypeManager)
{
$this->entityTypeManager = $entityTypeManag... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-438.php | tests/src/Rules/data/bug-438.php | <?php
namespace EntityReferenceRevisionsExample;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
class Foo {
private EntityTypeManagerInterface $entityTypeManager;
public function __construct(EntityTypeManagerInterface $entityTypeManager)
{
$this-... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-586.php | tests/src/Rules/data/bug-586.php | <?php
namespace Bug586;
use Drupal\Core\Entity\ContentEntityStorageInterface;
$nodeStorage = \Drupal::entityTypeManager()->getStorage('node');
$nodeStorage->loadRevision(1);
$genericContentEntityStorage = \Drupal::entityTypeManager()->getStorage('foo');
assert($genericContentEntityStorage instanceof ContentEntitySt... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-475.php | tests/src/Rules/data/bug-475.php | <?php
/**
* Cache key differs outside of class so this is separate reproduction
*
* @return void
*/
function bug475Caching(): void
{
// Here condition() return type will be cached as one that has no access check
\Drupal::entityQuery('node')
->condition('field_test', 'foo', '=')
->accessChec... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/test-cases-test-classes-protected-property-modules-rule.php | tests/src/Rules/data/test-cases-test-classes-protected-property-modules-rule.php | <?php
namespace TestCasesTestClassesProtectedPropertyModulesRule;
use Drupal\node\Entity\Node;
use Drupal\Tests\node\Functional\NodeAccessFieldTest;
class ProtectedStaticPropertyModulesClass extends NodeAccessFieldTest {
/**
* Modules to install.
*
* @var array
*/
protected static $modul... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/cacheable-dependency.php | tests/src/Rules/data/cacheable-dependency.php | <?php
namespace Drupal\phpstan_fixtures;
use Drupal\Core\Cache\CacheableMetadata;
class UsesIncorrectCacheableDependency {
public function test() {
$element = [];
$cacheable_metadata = CacheableMetadata::createFromRenderArray($element);
$object = new \Stdclass;
$cacheable_metadat... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/dependency-serialization-trait.php | tests/src/Rules/data/dependency-serialization-trait.php | <?php
namespace DependencySerialization;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormBase;
class Foo {
private EntityTypeManagerInterface $entityTypeManager;
}
class Bar {
use DependencySerializationTrait;
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-530.php | tests/src/Rules/data/bug-530.php | <?php
namespace Bug530;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
/**
* Tests entity count queries with access check.
*/
class TestClass {
public ConfigEntityStorageInterface $storage;
public function setUp(): void
{
$this->storage = \Drupal::entityTypeManager()->getStorage(... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-496.php | tests/src/Rules/data/bug-496.php | <?php
namespace Bug496Example;
class TestClass {
/**
* Tests non-chained entity queries with access check.
*/
public function bug496(string $entity_type): void
{
$query = \Drupal::entityQuery('node');
$query->accessCheck(FALSE);
$query->condition('field_test', 'foo', '='... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/plugin-manager-cache-backend.php | tests/src/Rules/data/plugin-manager-cache-backend.php | <?php
namespace PluginManagerCacheBackend;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
class Foo extends DefaultPluginManager
{
public function __construct(
\Traversable $namespaces,
ModuleHandlerInte... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/test-cases-TestClassSuffixNameRule.php | tests/src/Rules/data/test-cases-TestClassSuffixNameRule.php | <?php
namespace TestCasesTestClassSuffixNameRule;
use Drupal\node\Entity\Node;
use Drupal\Tests\views\Functional\ViewTestBase;
use PHPUnit\Framework\TestCase;
class IgnoreNonExtendingClasses
{
}
abstract class IgnoreAbstractClasses extends TestCase
{
}
class IgnoreNonPHPUnitFrameworkTestCaseExtendingClasses exte... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-437.php | tests/src/Rules/data/bug-437.php | <?php
namespace Bug437;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\Query\QueryInterface;
final class Foo {
private QueryInterface $vocabularyQuery;
public function __construct(EntityTypeManagerInterface $entityTypeManager)
{
$this->vocabularyQuery = $entityTypeManag... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-500.php | tests/src/Rules/data/bug-500.php | <?php
namespace Bug500;
enum MyEnum {
case ONE;
case TWO;
public function getTitle(): string {
return match($this) {
self::ONE => (string) \Drupal::translation()->translate('One'),
self::TWO => (string) \Drupal::translation()->translate('Two'),
};
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-396a3.php | tests/src/Rules/data/bug-396a3.php | <?php
namespace Bug396a;
function baz() {
$query = \Drupal::entityQuery('user')
->condition('status', 1)
->condition('uid', 1, '<>')
->condition('field_profile_visibility', 1)
->condition('field_account_type', '', '<>')
->condition('field_last_name.value', '', '<>');
if... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/hook-form-alter-valid.php | tests/src/Rules/data/hook-form-alter-valid.php | <?php
namespace mglaman\PHPStanDrupal\Tests\Rules\data;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Valid form alter hook implementations.
*/
class ValidFormAlterHooks {
/**
* Implements hook_form_alter() - method with Hook attribute.
*/
#[Hook('form_alter')]
pu... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-424.php | tests/src/Rules/data/bug-424.php | <?php
namespace Bug424;
class Foo {
public function render(): array {
$build = [
'one' => [
'#lazy_builder' => [
static::class . '::contentLazyBuilder',
['foo'],
],
'#create_placeholder' => TRUE,
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/drupal-static.php | tests/src/Rules/data/drupal-static.php | <?php
namespace DrupalStatic;
$class = new class () extends \Drupal\Core\StreamWrapper\LocalStream {
public function getDirectoryPath()
{
return \Drupal::root();
}
public function getName()
{
}
public function getDescription()
{
}
public function getExternalUrl()
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-494.php | tests/src/Rules/data/bug-494.php | <?php
namespace Bug494Example;
class TestClass {
/**
* Tests entity queries with access check and unknown entity type.
*/
public function bug494(string $entity_type): void
{
\Drupal::entityQuery($entity_type)
->accessCheck(FALSE)
->condition('field_test', 'foo', ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-396a2.php | tests/src/Rules/data/bug-396a2.php | <?php
namespace Bug396a;
function bar() {
$query = \Drupal::entityQuery('user')
->accessCheck(FALSE)
->condition('status', 1)
->condition('uid', 1, '<>')
->condition('field_profile_visibility', 1)
->condition('field_account_type', '', '<>')
->condition('field_last_n... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-857.php | tests/src/Rules/data/bug-857.php | <?php
use Drupal\Component\Assertion\Inspector;
use Drupal\Core\Url;
function foo(array $images) {
// This call is crucial for the bug, because it narrows type to
// 'array<array>'.
Inspector::assertAllArrays($images);
Inspector::assertAll(fn (array $i): bool => $i['file'] instanceof Url, $images);
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-177.php | tests/src/Rules/data/bug-177.php | <?php
namespace Bug177;
function foo() {
\Drupal::moduleHandler()->loadInclude('locale', 'fetch.php');
$moduleHandler = \Drupal::moduleHandler();
$moduleHandler->loadInclude('locale', 'fetch.php');
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-396c.php | tests/src/Rules/data/bug-396c.php | <?php
namespace Bug396c;
use Drupal\Core\Entity\EntityStorageInterface;
class EntityQueryTest {
private EntityStorageInterface $storage;
public function setUp(): void {
$this->storage = \Drupal::entityTypeManager()->getStorage('entity_test_mulrev');
}
public function a(): int {
$query... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Rules/data/bug-545.php | tests/src/Rules/data/bug-545.php | <?php
namespace Bug545;
/**
* Code snippets from \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity.
*/
class TestClass {
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* The entity type defi... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/FormatterInterfaceGenericTest.php | tests/src/Generics/FormatterInterfaceGenericTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Generics;
use mglaman\PHPStanDrupal\Tests\AdditionalConfigFilesTrait;
use PHPStan\Testing\TypeInferenceTestCase;
final class FormatterInterfaceGenericTest extends TypeInferenceTestCase
{
use AdditionalConfigFilesTrait;
public static funct... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/FormatterBaseGenericTest.php | tests/src/Generics/FormatterBaseGenericTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Generics;
use mglaman\PHPStanDrupal\Tests\AdditionalConfigFilesTrait;
use PHPStan\Testing\TypeInferenceTestCase;
final class FormatterBaseGenericTest extends TypeInferenceTestCase
{
use AdditionalConfigFilesTrait;
public static function d... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/EntityReferenceItemGenericTest.php | tests/src/Generics/EntityReferenceItemGenericTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Generics;
use mglaman\PHPStanDrupal\Tests\AdditionalConfigFilesTrait;
use PHPStan\Testing\TypeInferenceTestCase;
final class EntityReferenceItemGenericTest extends TypeInferenceTestCase
{
use AdditionalConfigFilesTrait;
public static func... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/EntityReferenceFieldItemListGenericTest.php | tests/src/Generics/EntityReferenceFieldItemListGenericTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Generics;
use mglaman\PHPStanDrupal\Tests\AdditionalConfigFilesTrait;
use PHPStan\Testing\TypeInferenceTestCase;
final class EntityReferenceFieldItemListGenericTest extends TypeInferenceTestCase
{
use AdditionalConfigFilesTrait;
public st... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/EntityReferenceFormatterBaseGenericTest.php | tests/src/Generics/EntityReferenceFormatterBaseGenericTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Generics;
use mglaman\PHPStanDrupal\Tests\AdditionalConfigFilesTrait;
use PHPStan\Testing\TypeInferenceTestCase;
final class EntityReferenceFormatterBaseGenericTest extends TypeInferenceTestCase
{
use AdditionalConfigFilesTrait;
public st... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/formatter-interface.php | tests/src/Generics/data/formatter-interface.php | <?php
namespace DrupalFormatterInterfaceGeneric;
use Drupal\Core\Field\FieldItemList;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterInterface;
use Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem;
use Drupal\Core\Field\Plugin\Field\FieldType\StringItem;
use function PHPStan\Testing\... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/entity-reference-formatter-base.php | tests/src/Generics/data/entity-reference-formatter-base.php | <?php
namespace DrupalEntityReferenceFormatterBaseGeneric;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceFormatterBase;
use Drupal\node\NodeInterface;
use function PHPStan\Testing\assertType;
class InheritedEntityReferenceFormatterBase extends EntityRe... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/formatter-base.php | tests/src/Generics/data/formatter-base.php | <?php
namespace DrupalFormatterBaseGeneric;
use Drupal\Core\Field\FieldItemList;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem;
use Drupal\Core\Field\Plugin\Field\FieldType\StringItem;
use function PHPStan\Testing\assertType... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/entity-reference-field-item-list.php | tests/src/Generics/data/entity-reference-field-item-list.php | <?php
namespace DrupalEntityReferenceFieldItemListGeneric;
use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\node\NodeInterface;
use function PHPStan\Testing\assertType;
function defaultItemList(EntityReferenceFieldItemList $items): void {
assertType('Drupal\Core\Field\EntityReferenceFieldItemList',... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/bug-878.php | tests/src/Generics/data/bug-878.php | <?php
namespace Bug878;
use Drupal\Core\Field\EntityReferenceFieldItemList;
use Drupal\Core\Field\EntityReferenceFieldItemListInterface;
use Drupal\node\Entity\Node;
use function PHPStan\Testing\assertType;
class EntityReferenceRevisionsFieldItemList extends EntityReferenceFieldItemList implements EntityReferenceFie... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Generics/data/entity-reference-item.php | tests/src/Generics/data/entity-reference-item.php | <?php
namespace DrupalEntityReferenceItemGeneric;
use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem;
use Drupal\node\NodeInterface;
use function PHPStan\Testing\assertType;
function defaultItem(EntityReferenceItem $item): void {
assertType('Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceI... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/Drupal/ExtensionTest.php | tests/src/Drupal/ExtensionTest.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\Drupal;
use mglaman\PHPStanDrupal\Drupal\Extension;
use PHPUnit\Framework\TestCase;
final class ExtensionTest extends TestCase
{
/**
* @dataProvider dependenciesProvider
*/
public function testDependencies(array $dependencies, st... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/IgnoreDeprecationsScopeTest.php | tests/src/DeprecatedScope/IgnoreDeprecationsScopeTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\DeprecatedScope;
use mglaman\PHPStanDrupal\Tests\DrupalRuleTestCase;
use PHPStan\Rules\RestrictedUsage\RestrictedFunctionUsageRule;
use PHPStan\Rules\Rule;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
final class IgnoreDeprecationsScopeTes... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/DeprecationHelperScopeTest.php | tests/src/DeprecatedScope/DeprecationHelperScopeTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\DeprecatedScope;
use mglaman\PHPStanDrupal\Tests\DrupalRuleTestCase;
use PHPStan\Rules\RestrictedUsage\RestrictedFunctionUsageRule;
use PHPStan\Rules\Rule;
final class DeprecationHelperScopeTest extends DrupalRuleTestCase {
protected function... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/GlobalLegacyScopeTest.php | tests/src/DeprecatedScope/GlobalLegacyScopeTest.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Tests\DeprecatedScope;
use mglaman\PHPStanDrupal\Tests\DrupalRuleTestCase;
use PHPStan\Rules\RestrictedUsage\RestrictedFunctionUsageRule;
use PHPStan\Rules\Rule;
final class GlobalLegacyScopeTest extends DrupalRuleTestCase {
protected function getR... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/data/deprecation-helper-test.php | tests/src/DeprecatedScope/data/deprecation-helper-test.php | <?php
namespace GroupLegacy;
use Drupal\Component\Utility\DeprecationHelper;
use function Deprecated\deprecated_function;
final class FooTest {
public function methodCallingThings(): void {
\Drupal\Component\Utility\DeprecationHelper::backwardsCompatibleCall(
\Drupal::VERSION,
'... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/data/group-legacy.php | tests/src/DeprecatedScope/data/group-legacy.php | <?php
namespace GroupLegacy;
use function Deprecated\deprecated_function;
/**
* @group legacy
*/
final class FooTest {
public function foo(): void {
deprecated_function();
}
}
final class BarTest {
public function bar(): void {
deprecated_function();
}
/**
* @group leg... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/data/ignore-deprecations.php | tests/src/DeprecatedScope/data/ignore-deprecations.php | <?php
namespace IgnoreDeprecations;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
use function Deprecated\deprecated_function;
#[IgnoreDeprecations]
final class FooTest {
public function foo(): void {
deprecated_function();
}
}
final class BarTest {
public function bar(): void {
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/src/DeprecatedScope/data/deprecated-data-definition.php | tests/src/DeprecatedScope/data/deprecated-data-definition.php | <?php
namespace Deprecated;
/**
* @deprecated
*/
function deprecated_function(): void {
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/.phpstorm.meta.php | .phpstorm.meta.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPSTORM_META;
registerArgumentsSet(
'views',
'head... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/.php-cs-fixer.dist.php | .php-cs-fixer.dist.php | <?php declare(strict_types=1);
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Framework\CodingStandard\Config;
use Fram... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Pager.php | src/Pager.php | <?php declare(strict_types=1);
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Framework\Pagination;
use Framewor... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Languages/en/pagination.php | src/Languages/en/pagination.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [
'first' => 'First',
'last' => 'Last',
'next' => '... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Languages/es/pagination.php | src/Languages/es/pagination.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [
'first' => 'Primera',
'last' => 'Última',
'next' ... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Languages/pt-br/pagination.php | src/Languages/pt-br/pagination.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
return [
'first' => 'Primeira',
'last' => 'Última',
'next'... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/head.php | src/Views/head.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
?>
<?php if ($pager... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/semantic-ui-short.php | src/Views/semantic-ui-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/semantic-ui.php | src/Views/semantic-ui.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/bulma.php | src/Views/bulma.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/tailwind.php | src/Views/tailwind.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/primer-short.php | src/Views/primer-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/materialize-short.php | src/Views/materialize-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/foundation-short.php | src/Views/foundation-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/pagination.php | src/Views/pagination.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/foundation.php | src/Views/foundation.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/primer.php | src/Views/primer.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/tailwind-short.php | src/Views/tailwind-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/materialize.php | src/Views/materialize.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/pagination-short.php | src/Views/pagination-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/header.php | src/Views/header.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* HTTP Header Link.
*
* @see https://tools.ietf.org/html/rfc598... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/w3-short.php | src/Views/w3-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/bootstrap.php | src/Views/bootstrap.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/bulma-short.php | src/Views/bulma-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/bootstrap-short.php | src/Views/bootstrap-short.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/src/Views/w3.php | src/Views/w3.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* @var Framework\Pagination\Pager $pager
*/
$language = $pager->... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/tests/LanguagesTest.php | tests/LanguagesTest.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\Pagination;
use PHPUnit\Framework\TestCase;
final cl... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
aplus-framework/pagination | https://github.com/aplus-framework/pagination/blob/cd4706da09d8ba96067bb2522212f4a1cfe041ab/tests/PagerTest.php | tests/PagerTest.php | <?php
/*
* This file is part of Aplus Framework Pagination Library.
*
* (c) Natan Felles <natanfelles@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests\Pagination;
use Framework\HTTP\URL;
use Framework\Lan... | php | MIT | cd4706da09d8ba96067bb2522212f4a1cfe041ab | 2026-01-05T02:09:57.286616Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/tests/MongoTest.php | tests/MongoTest.php | <?php
require_once __DIR__ . '/../classes/json.php';
require_once __DIR__ . '/../classes/mongo/database.php';
require_once __DIR__ . '/../classes/mongo/collection.php';
require_once __DIR__ . '/../classes/mongo/document.php';
/* Row Data Gateway Pattern */
class Model_Test_Document_Collection extends Mongo_Collectio... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/tests/MongoSubdocumentTest.php | tests/MongoSubdocumentTest.php | <?php
require_once __DIR__ . '/MongoTest.php';
require_once __DIR__ . '/../classes/mongo/database.php';
require_once __DIR__ . '/../classes/mongo/collection.php';
require_once __DIR__ . '/../classes/mongo/subdocument.php';
class Mongo_Test_Subdocument extends Mongo_Subdocument {
public function increment()
{
... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/config/mongo.php | config/mongo.php | <?php defined('SYSPATH') or die('No direct script access.');
/*
* See http://www.php.net/manual/en/mongo.construct.php for configuration options.
*/
return array(
Kohana::DEVELOPMENT => array(
'database' => '40_db_v1',
'server' => 'mongodb://localhost:27017',
'options' => array(),
'pr... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/json.php | classes/json.php | <?php
/**
* This json wrapper is included to provide a lenient decode method.
*
* @author Colin Mollenhour
* @package Mongo_Database
*/
class JSON {
/**
* Decode a JSON string that is not strictly formed.
*
* @param string $json
* @param boolean $assoc
* @return array|object
*/
public s... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/controller/mongotest.php | classes/controller/mongotest.php | <?php
/* Row Data Gateway Pattern */
class Model_Document_Collection extends Mongo_Collection {
protected $name = 'mongotest';
protected $db = 'mongotest';
}
class Model_Document extends Mongo_Document {
protected $_references = array(
'other' => array('model' => 'other'),
'lots' => array('model' => 'o... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/database.php | classes/mongo/database.php | <?php
/**
* This class wraps the functionality of Mongo (connection) and MongoDB (database object) into one class.
* When used with Kohana it can be instantiated simply by:
*
* <code>
* $db = Mongo_Database::instance();
* </code>
*
* The above will assume the 'default' configuration from the APPPATH/config/mon... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/document.php | classes/mongo/document.php | <?php
/**
* This class objectifies a MongoDB document and can be used with one of the following design patterns:
*
* 1. Table Data Gateway pattern:
* <code>
* class Model_Post extends Mongo_Document {
* protected $name = 'posts';
* // All model-related code here
* }
*
* $post = Mongo_Document::factory('po... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | true |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/subdocument.php | classes/mongo/subdocument.php | <?php
/**
* Class for easy handling of subdocuments in Mongo_Document.
*
* It allows to create simple models for subdocuments. All field operations like set, inc, push etc. are
* delegated to the main document.
*
* To make it fast, reads are done though a cached reference.
*
* This code will store a document l... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | false |
colinmollenhour/mongodb-php-odm | https://github.com/colinmollenhour/mongodb-php-odm/blob/640ce82c0ab00765168addec1bf0b996bdb4e4d1/classes/mongo/collection.php | classes/mongo/collection.php | <?php
/**
* This class can be used in any of the following ways:
*
* 1. Directly as a wrapper for MongoCollection/MongoCursor:
* <code>
* $posts = new Mongo_Collection('posts');
* $posts->sort_desc('published')->limit(10)->as_array(); // array of arrays
* </code>
*
* 2. As part of the Table Data Gateway patter... | php | BSD-3-Clause | 640ce82c0ab00765168addec1bf0b996bdb4e4d1 | 2026-01-05T02:10:23.454560Z | true |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/phpSecTest.php | tests/phpSec/phpSecTest.php | <?php
class phpSecTest extends PHPUnit_Framework_TestCase {
public function setUp() {
}
public function testConstructorWithoutArgs() {
//$this->assertEquals(0, count($h));
}
}
| php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Http/UrlTest.php | tests/phpSec/Http/UrlTest.php | <?php
class UrlTest extends PHPUnit_Framework_TestCase {
public function testUrl() {
$psl = new \phpSec\Core();
$url = $psl['http/url'];
$uri = $url->create('http://example.com/test/file.png');
$this->assertTrue($url->verify($uri));
$this->assertFalse($url->verify('http://example.com/test/fi... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Common/CacheTest.php | tests/phpSec/Common/CacheTest.php | <?php
class CacheTest extends PHPUnit_Framework_TestCase {
public function testCache() {
$psl = new \phpSec\Core();
$psl['store'] = $psl->share(function($psl) {
return new \phpSec\Store\File(sys_get_temp_dir(), $psl);
});
$cache = $psl['cache'];
$this->assertTrue($cache->cacheSet('name'... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Common/ExecTest.php | tests/phpSec/Common/ExecTest.php | <?php
class ExecTest extends PHPUnit_Framework_TestCase {
public function testExec() {
$psl = new \phpSec\Core();
$exec = $psl['common/exec'];
$return = $exec->run('echo %s', array('%s' => 'Hello World'));
$this->assertEquals(trim($return['STDOUT']), 'Hello World');
$this->assertEquals($return... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Common/TokenTest.php | tests/phpSec/Common/TokenTest.php | <?php
class TokenTest extends PHPUnit_Framework_TestCase {
public function testToken() {
$psl = new \phpSec\Core();
$psl['store'] = $psl->share(function($psl) {
return new \phpSec\Store\File(sys_get_temp_dir(), $psl);
});
$token = $psl['common/token'];
$csrf = $token->set('test');
... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Auth/AuthyTest.php | tests/phpSec/Auth/AuthyTest.php | <?php
class AuthyTest extends PHPUnit_Framework_TestCase {
public function testAuthy() {
$psl = new \phpSec\Core();
$authy = $psl['auth/authy'];
$authy->_apiKey = 'bcdfb7ce5e6854dcfe65ce5dd0d568c7';
$authy->_sandbox = true;
$authyID = $authy->userNew('phpsec@example.com', '12345678', '47');
... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Auth/YubikeyTest.php | tests/phpSec/Auth/YubikeyTest.php | <?php
class YubikeyTest extends PHPUnit_Framework_TestCase {
public function testOtp() {
$psl = new \phpSec\Core();
$yubikey = $psl['auth/yubikey'];
$yubikey->clientId = '5118';
$yubikey->clientSecret = 'n7cIJF1IaL8WeTUsluWRSpRLOqs=';
$otp = 'cccccccbdfgkjubfnjvuiibnulrhrigjvrukbdbevibt'... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Auth/OtpTest.php | tests/phpSec/Auth/OtpTest.php | <?php
class OtpTest extends PHPUnit_Framework_TestCase {
public function testOtp() {
$psl = new \phpSec\Core();
$psl['store'] = $psl->share(function($psl) {
return new \phpSec\Store\File(sys_get_temp_dir(), $psl);
});
$otp = $psl['auth/otp'];
$pw = $otp->generate('f00');
$this->as... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Auth/GoogleTest.php | tests/phpSec/Auth/GoogleTest.php | <?php
class GoogleTest extends PHPUnit_Framework_TestCase {
public function testKeyGen() {
$psl = new \phpSec\Core();
$psl['store'] = $psl->share(function($psl) {
return new \phpSec\Store\File(sys_get_temp_dir(), $psl);
});
$google = $psl['auth/google'];
$key = $google->newKey();
$t... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/Text/FilterTest.php | tests/phpSec/Text/FilterTest.php | <?php
class FilterTest extends PHPUnit_Framework_TestCase {
public function testRandString() {
$psl = new \phpSec\Core();
$filter = $psl['text/filter'];
}
} | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
phpsec/phpSec | https://github.com/phpsec/phpSec/blob/e6b8eb4fdd5865a0036e0729b97f8a0e719721c0/tests/phpSec/String/CompareTest.php | tests/phpSec/String/CompareTest.php | <?php
class CompareTest extends PHPUnit_Framework_TestCase {
public function testTimingsafe() {
$psl = new \phpSec\Core();
$compare = $psl['string/compare'];
$this->assertTrue($compare->timingSafe('abcd', 'abcd'));
$this->assertTrue($compare->timingSafe('', ''));
$this->assertTrue($compare->t... | php | MIT | e6b8eb4fdd5865a0036e0729b97f8a0e719721c0 | 2026-01-05T02:10:37.085400Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.