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/src/Type/EntityStorage/ConfigEntityStorageType.php | src/Type/EntityStorage/ConfigEntityStorageType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityStorage;
final class ConfigEntityStorageType extends EntityStorageType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityStorage/EntityStorageDynamicReturnTypeExtension.php | src/Type/EntityStorage/EntityStorageDynamicReturnTypeExtension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityStorage;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use mglaman\PHPStanDrupal\Drupal\EntityDataRepository;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPSt... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityStorage/GetQueryReturnTypeExtension.php | src/Type/EntityStorage/GetQueryReturnTypeExtension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityStorage;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use mglaman\PHPStanDrupal\Type\EntityQuery\ConfigEntityQueryType;
use mgla... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityStorage/EntityStorageType.php | src/Type/EntityStorage/EntityStorageType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityStorage;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
class EntityStorageType extends ObjectType
{
/**
* @var string
*/
private $entityTypeId;
public function __construct(
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityStorage/ContentEntityStorageType.php | src/Type/EntityStorage/ContentEntityStorageType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityStorage;
final class ContentEntityStorageType extends EntityStorageType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryExecuteWithoutAccessCheckCountType.php | src/Type/EntityQuery/EntityQueryExecuteWithoutAccessCheckCountType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use PHPStan\Type\IntegerRangeType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;
final class EntityQueryExecuteWithoutAccessCheckCountType extends IntegerType
{
private Type $rangeType;
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/ContentEntityQueryType.php | src/Type/EntityQuery/ContentEntityQueryType.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
/**
* Type used to represent an entity query instance for content entity query.
*/
final class ContentEntityQueryType extends EntityQueryType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryCountType.php | src/Type/EntityQuery/EntityQueryCountType.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
/**
* Type used to represent an entity query instance as count query.
*/
final class EntityQueryCountType extends EntityQueryType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryType.php | src/Type/EntityQuery/EntityQueryType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use PHPStan\Type\ObjectType;
use function implode;
class EntityQueryType extends ObjectType
{
private bool $hasAccessCheck = false;
private bool $isCount = false;
public function hasAccessCheck(): bool
{
retur... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryAccessCheckDynamicReturnTypeExtension.php | src/Type/EntityQuery/EntityQueryAccessCheckDynamicReturnTypeExtension.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use Drupal\Core\Entity\Query\QueryInterface;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\DynamicMethodRetur... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/AccessCheckTypeSpecifyingExtension.php | src/Type/EntityQuery/AccessCheckTypeSpecifyingExtension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use Drupal\Core\Entity\Query\QueryInterface;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Analyser\SpecifiedTypes;
use PHPStan\Analyser\TypeSpecifier;
use PHPStan\Analyser\TypeSpecifierAwareExtension;
use P... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryExecuteWithoutAccessCheckType.php | src/Type/EntityQuery/EntityQueryExecuteWithoutAccessCheckType.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use PHPStan\Type\ArrayType;
final class EntityQueryExecuteWithoutAccessCheckType extends ArrayType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/EntityQueryDynamicReturnTypeExtension.php | src/Type/EntityQuery/EntityQueryDynamicReturnTypeExtension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
use Drupal\Core\Entity\Query\QueryInterface;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptorSelector;
use PHPStan\Type\ArrayType;
use PHPS... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Type/EntityQuery/ConfigEntityQueryType.php | src/Type/EntityQuery/ConfigEntityQueryType.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Type\EntityQuery;
/**
* Type used to represent an entity query instance for config entity query.
*/
final class ConfigEntityQueryType extends EntityQueryType
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/GetDeprecatedServiceRule.php | src/Rules/Deprecations/GetDeprecatedServiceRule.php | <?php declare(strict_types = 1);
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use mglaman\PHPStanDrupal\Drupal\DrupalServiceDefinition;
use mglaman\PHPStanDrupal\Drupal\ServiceMap;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
* @implements Ru... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/ConfigEntityConfigExportRule.php | src/Rules/Deprecations/ConfigEntityConfigExportRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNo... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/DeprecatedAnnotationsRuleBase.php | src/Rules/Deprecations/DeprecatedAnnotationsRuleBase.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
/**
* @implements Rule<Node\Stmt\Class_>
*/
abstract class DeprecatedAnnotati... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/PluginAnnotationContextDefinitionsRule.php | src/Rules/Deprecations/PluginAnnotationContextDefinitionsRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use function preg_match;
final class PluginAnnotationContextDefinitionsR... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/StaticServiceDeprecatedServiceRule.php | src/Rules/Deprecations/StaticServiceDeprecatedServiceRule.php | <?php declare(strict_types = 1);
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use mglaman\PHPStanDrupal\Drupal\DrupalServiceDefinition;
use mglaman\PHPStanDrupal\Drupal\ServiceMap;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
* @implements Ru... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Deprecations/DeprecatedHookImplementation.php | src/Rules/Deprecations/DeprecatedHookImplementation.php | <?php
namespace mglaman\PHPStanDrupal\Rules\Deprecations;
use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function basename;
use function explode;
use ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Classes/ClassExtendsInternalClassRule.php | src/Rules/Classes/ClassExtendsInternalClassRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Classes;
use mglaman\PHPStanDrupal\Internal\NamespaceCheck;
use PhpParser\Node;
use PhpParser\Node\Stmt\Class_;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use fu... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Classes/PluginManagerInspectionRule.php | src/Rules/Classes/PluginManagerInspectionRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Classes;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use PhpParser\Node;
use PhpParser\NodeFinder;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Rules\Rule;
us... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/CacheableDependencyRule.php | src/Rules/Drupal/CacheableDependencyRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\Cache\CacheableDependencyInterface;
use Drupal\Core\Cache\CacheableResponseInterface;
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
use Drupal\Core\Plugin\Context\ContextInterface;
use Drupal\Core\Render\Rende... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/AccessResultConditionRule.php | src/Rules/Drupal/AccessResultConditionRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\Access\AccessResult;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\VerbosityLevel;
/**
* @implements Rule<Node\Expr\StaticCall>
*/
final class... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/HookFormAlterRule.php | src/Rules/Drupal/HookFormAlterRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Hook\Attribute\Hook;
use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\O... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/RenderCallbackRule.php | src/Rules/Drupal/RenderCallbackRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\Render\Element\RenderCallbackInterface;
use Drupal\Core\Render\PlaceholderGenerator;
use Drupal\Core\Render\Renderer;
use Drupal\Core\Security\Attribute\TrustedCallback;
use Drupal\Core\Security\TrustedCallbackInterface;
use ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/GlobalDrupalDependencyInjectionRule.php | src/Rules/Drupal/GlobalDrupalDependencyInjectionRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ExtendedMethodReflection;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
* @implements Rule<Node\Expr\StaticCall>
*/
class GlobalDrupalDependencyInjec... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/DependencySerializationTraitPropertyRule.php | src/Rules/Drupal/DependencySerializationTraitPropertyRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
/**
* @implements Rule<Class... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/ModuleLoadInclude.php | src/Rules/Drupal/ModuleLoadInclude.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use PhpParser\Node;
use PhpParser\Node\Name;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\RuleErrorBuilder;
use Throwable;
use function count;
use function is_file;
use function sprintf;
/**
* Handles module_load_include dynamic file load... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/TestClassesProtectedPropertyModulesRule.php | src/Rules/Drupal/TestClassesProtectedPropertyModulesRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPUnit\Framework\TestCase;
use function in_array;
use function sprintf;
/**
* @implements... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/LoadIncludeBase.php | src/Rules/Drupal/LoadIncludeBase.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use mglaman\PHPStanDrupal\Drupal\ExtensionMap;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use function count;
/**
* @template TNodeType of Node
* @implements Rule<TNodeType>
*/
abstract class LoadIncludeBase ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/LoadIncludes.php | src/Rules/Drupal/LoadIncludes.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal;
use Drupal\Core\Extension\ModuleHandlerInterface;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ObjectType;
use Throwable;
use function count;
use function is_file;
use function sprintf;... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/Coder/DiscouragedFunctionsRule.php | src/Rules/Drupal/Coder/DiscouragedFunctionsRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\Coder;
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use function in_array;
use function sprintf;
use function strtolower;
/**
* Based on Drupal... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/EntityQuery/EntityQueryHasAccessCheckRule.php | src/Rules/Drupal/EntityQuery/EntityQueryHasAccessCheckRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\EntityQuery;
use mglaman\PHPStanDrupal\Type\EntityQuery\ConfigEntityQueryType;
use mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryExecuteWithoutAccessCheckCountType;
use mglaman\PHPStanDrupal\Type\EntityQuery\EntityQueryExecuteWithoutAcce... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/Tests/BrowserTestBaseDefaultThemeRule.php | src/Rules/Drupal/Tests/BrowserTestBaseDefaultThemeRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\Tests;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ObjectType;
use PHPStan\Type\TypeCombinator;
use PHPUnit\Framework\Test;
use function count;
use function in_a... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/Tests/TestClassSuffixNameRule.php | src/Rules/Drupal/Tests/TestClassSuffixNameRule.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\Tests;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\Type\ObjectType;
use PHPUnit\Framework\TestCase;
/**
* Implements rule that all non-abstract test classes name s... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/PluginManager/PluginManagerSetsCacheBackendRule.php | src/Rules/Drupal/PluginManager/PluginManagerSetsCacheBackendRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\PluginManager;
use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\RuleErrorBuilder;
use PHPStan\ShouldNotHappenException;
use PHPStan\Type\Type;
use function array_map;
use function count;
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Rules/Drupal/PluginManager/AbstractPluginManagerRule.php | src/Rules/Drupal/PluginManager/AbstractPluginManagerRule.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Rules\Drupal\PluginManager;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Rules\Rule;
/**
* @template TNodeType of \PhpParser\Node
* @implements Rule<TNodeType>
*/
abstract class AbstractPluginManagerRule implements Rule
{
protected functio... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Internal/NamespaceCheck.php | src/Internal/NamespaceCheck.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Internal;
use PhpParser\Node\Stmt\Class_;
/**
* @internal
*/
final class NamespaceCheck
{
public static function isDrupalNamespace(Class_ $class): bool
{
if (!isset($class->namespacedName)) {
return false;
}
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Internal/DeprecatedScopeCheck.php | src/Internal/DeprecatedScopeCheck.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Internal;
use PHPStan\Analyser\Scope;
final class DeprecatedScopeCheck
{
public static function inDeprecatedScope(Scope $scope): bool
{
$class = $scope->getClassReflection();
if ($class !== null && $class->isDeprecated()) {
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/Extension.php | src/Drupal/Extension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use RuntimeException;
use Symfony\Component\Yaml\Yaml;
use function explode;
use function file_get_contents;
use function is_array;
use function sprintf;
use function strpos;
use function trim;
/**
* Defines an extension (file) object.
*
* Bun... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/EntityData.php | src/Drupal/EntityData.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Entity\EntityStor... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/DrupalAutoloader.php | src/Drupal/DrupalAutoloader.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use Composer\Autoload\ClassLoader;
use Drupal\Component\DependencyInjection\Container as DrupalContainer;
use Drupal\Core\DependencyInjection\ContainerNotInitializedException;
use Drupal\Core\DrupalKernelInterface;
use Drupal\TestTools\PhpUnitComp... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/ExtensionDiscovery.php | src/Drupal/ExtensionDiscovery.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use FilesystemIterator;
use mglaman\PHPStanDrupal\Drupal\Extension;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use function array_filter;
use function array_flip;
use function array_multisort;
use function dirname;
use function... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/ExtensionMap.php | src/Drupal/ExtensionMap.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use function array_combine;
use function array_map;
final class ExtensionMap
{
/** @var array<string, Extension> */
private static $modules = [];
/** @var array<string, Extension> */
private static $themes = [];
/** @var a... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/DrupalServiceDefinition.php | src/Drupal/DrupalServiceDefinition.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use PHPStan\Type\ObjectType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\TypeCombinator;
use function count;
use function str_replace;
class DrupalServiceDefinition
{
/**
* @var string
*/
private $id;
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/RecursiveExtensionFilterIterator.php | src/Drupal/RecursiveExtensionFilterIterator.php | <?php
namespace mglaman\PHPStanDrupal\Drupal;
use RecursiveFilterIterator;
use RecursiveIterator;
use function array_merge;
use function in_array;
use function substr;
/**
* Filters a RecursiveDirectoryIterator to discover extensions.
*
* Locally bundled version of \Drupal\Core\Extension\Discovery\RecursiveExtens... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/DrupalStubFilesExtension.php | src/Drupal/DrupalStubFilesExtension.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use PHPStan\PhpDoc\StubFilesExtension;
use Symfony\Component\Finder\Finder;
final class DrupalStubFilesExtension implements StubFilesExtension
{
public function getFiles(): array
{
$files = [];
$finder = Finder::create()->... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/EntityDataRepository.php | src/Drupal/EntityDataRepository.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
use Drupal\Core\Entity\ContentEntityStorageInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use PHPStan\Type\ObjectType;
final class EntityDataRepository
{
/**
* @var a... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/Drupal/ServiceMap.php | src/Drupal/ServiceMap.php | <?php declare(strict_types=1);
namespace mglaman\PHPStanDrupal\Drupal;
use function class_exists;
class ServiceMap
{
/** @var DrupalServiceDefinition[] */
private static $services = [];
public function getService(string $id): ?DrupalServiceDefinition
{
return self::$services[$id] ?? null;
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/DeprecatedScope/DeprecationHelperScope.php | src/DeprecatedScope/DeprecationHelperScope.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\DeprecatedScope;
use Drupal\Component\Utility\DeprecationHelper;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Rules\Deprecations\DeprecatedScopeResolver;
use function class_exists;
use function count;
final class Depr... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/DeprecatedScope/IgnoreDeprecationsScope.php | src/DeprecatedScope/IgnoreDeprecationsScope.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\DeprecatedScope;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Deprecations\DeprecatedScopeResolver;
use PHPUnit\Framework\Attributes\IgnoreDeprecations;
final class IgnoreDeprecationsScope implements DeprecatedScopeResolver
{
public function isSco... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/src/DeprecatedScope/GroupLegacyScope.php | src/DeprecatedScope/GroupLegacyScope.php | <?php
declare(strict_types=1);
namespace mglaman\PHPStanDrupal\DeprecatedScope;
use PHPStan\Analyser\Scope;
use PHPStan\Rules\Deprecations\DeprecatedScopeResolver;
use function strpos;
final class GroupLegacyScope implements DeprecatedScopeResolver
{
public function isScopeDeprecated(Scope $scope): bool
{
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/autoload.php | tests/fixtures/drupal/autoload.php | <?php
/**
* @file
* Includes the autoloader created by Composer.
*
* This file was generated by drupal-composer/drupal-scaffold.
* https://github.com/drupal-composer/drupal-scaffold
*
* @see composer.json
* @see index.php
* @see core/install.php
* @see core/rebuild.php
* @see core/modules/statistics/statist... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/index.php | tests/fixtures/drupal/index.php | <?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt files in the "core" directory.
*/
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
$autol... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/vendor/autoload.php | tests/fixtures/drupal/vendor/autoload.php | <?php
/**
* @file
* Includes the autoloader created by Composer.
*
* This file was generated by drupal-composer/drupal-scaffold.
* https://github.com/drupal-composer/drupal-scaffold
*
* @see composer.json
* @see index.php
* @see core/install.php
* @see core/rebuild.php
* @see core/modules/statistics/statist... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/contained_not_initialized/contained_not_initialized.post_update.php | tests/fixtures/drupal/modules/contained_not_initialized/contained_not_initialized.post_update.php | <?php
// drupal_get_path calls drupal_get_filename which invokes \Drupal::service("extension.list.$type");
// this will cause the bootstrap process to always die.
drupal_get_path('module', 'contained_not_initialized');
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Kernel/DrupalStaticCallTest.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Kernel/DrupalStaticCallTest.php | <?php
namespace Drupal\Tests\module_with_tests\Kernel;
use Drupal;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\module_with_tests\Traits\ModuleWithTestsTrait;
/**
* This is a dummy test class.
*
* @group module_with_tests
*/
class DrupalStaticCallTest extends KernelTestBase {
use ModuleWithTestsT... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Traits/ModuleWithTestsTrait.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Traits/ModuleWithTestsTrait.php | <?php
namespace Drupal\Tests\module_with_tests\Traits;
trait ModuleWithTestsTrait {
protected function dummyTrait() {
return TRUE;
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/MissingDefaultThemeTest.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/MissingDefaultThemeTest.php | <?php
namespace Drupal\Tests\module_with_tests\Functional;
use Drupal\Tests\BrowserTestBase;
class MissingDefaultThemeTest extends BrowserTestBase {
public function testFoo() {
$this->drupalGet('/');
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/ExtendsDefaultThemeTest.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/ExtendsDefaultThemeTest.php | <?php
namespace Drupal\Tests\module_with_tests\Functional;
class ExtendsDefaultThemeTest extends DefaultThemeTest {
public function testBar() {
$this->drupalGet('/');
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/DefaultThemeTest.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Functional/DefaultThemeTest.php | <?php
namespace Drupal\Tests\module_with_tests\Functional;
use Drupal\Tests\BrowserTestBase;
class DefaultThemeTest extends BrowserTestBase {
protected $defaultTheme = 'stark';
public function testFoo() {
$this->drupalGet('/');
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/Unit/ModuleWithTestsTest.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/Unit/ModuleWithTestsTest.php | <?php
namespace Drupal\Tests\module_with_tests\Unit;
use Drupal\Tests\module_with_tests\Traits\ModuleWithTestsTrait;
use Drupal\Tests\UnitTestCase;
/**
* This is a dummy test class.
*
* @group module_with_tests
*/
class ModuleWithTestsTest extends UnitTestCase {
use ModuleWithTestsTrait;
/**
* A dummy t... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_tests/tests/src/TestSite/ModuleWithTestsTestSite.php | tests/fixtures/drupal/modules/module_with_tests/tests/src/TestSite/ModuleWithTestsTestSite.php | <?php
namespace Drupal\Tests\module_with_tests\TestSite;
use Drupal\TestSite\TestSetupInterface;
class ModuleWithTestsTestSite implements TestSetupInterface {
protected $modules = [];
public function setup() {
$this->modules = ['module_with_tests', 'views'];
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_deprecated_hooks/module_with_deprecated_hooks.api.php | tests/fixtures/drupal/modules/module_with_deprecated_hooks/module_with_deprecated_hooks.api.php | <?php
/**
* A deprecated hook with a message.
*
* @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use hook_other_example instead.
*/
function hook_example() {}
/**
* A deprecated hook without a message.
*
* @deprecated
*/
function hook_example2() {}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_provider_test/src/ServiceProviderTestServiceProvider.php | tests/fixtures/drupal/modules/service_provider_test/src/ServiceProviderTestServiceProvider.php | <?php
namespace Drupal\service_provider_test;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
class ServiceProviderTestServiceProvider extends ServiceProviderBase {
public function alter(ContainerBuilder $container)
{
if (true) {
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/drush_command/src/Commands/TestDrushCommands.php | tests/fixtures/drupal/modules/drush_command/src/Commands/TestDrushCommands.php | <?php
namespace Drupal\drush_command\Commands;
use Drush\Commands\DrushCommands;
class TestDrushCommands extends DrushCommands {
/**
* Test
*
* @command phpstan:example
*/
public function batchProcess() {
drush_backend_batch_process();
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/pre_render_callback_rule/src/RenderArrayWithPreRenderCallback.php | tests/fixtures/drupal/modules/pre_render_callback_rule/src/RenderArrayWithPreRenderCallback.php | <?php declare(strict_types=1);
namespace Drupal\pre_render_callback_rule;
use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Url;
class RenderArrayWithPreRenderCallback implements TrustedCallbackInterface {
public function staticCallback(): array {
return [
'#type' => 'link',... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/pre_render_callback_rule/src/LazyBuilderWithConstant.php | tests/fixtures/drupal/modules/pre_render_callback_rule/src/LazyBuilderWithConstant.php | <?php declare(strict_types=1);
namespace Drupal\pre_render_callback_rule;
use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Url;
class LazyBuilderWithConstant implements TrustedCallbackInterface {
public function staticCallback(): array {
return [
'foo' => [
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/pre_render_callback_rule/src/NotTrustedCallback.php | tests/fixtures/drupal/modules/pre_render_callback_rule/src/NotTrustedCallback.php | <?php declare(strict_types=1);
namespace Drupal\pre_render_callback_rule;
final class NotTrustedCallback {
public static function unsafeCallback(array $element): array {
return $element;
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/pre_render_callback_rule/src/FormWithClosure.php | tests/fixtures/drupal/modules/pre_render_callback_rule/src/FormWithClosure.php | <?php declare(strict_types=1);
namespace Drupal\pre_render_callback_rule;
use Drupal\Core\Form\FormInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Url;
final class FormWithClosure implements FormInterface, TrustedCallbackInterface {
public s... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/pre_render_callback_rule/src/RenderCallbackInterfaceObject.php | tests/fixtures/drupal/modules/pre_render_callback_rule/src/RenderCallbackInterfaceObject.php | <?php declare(strict_types=1);
namespace Drupal\pre_render_callback_rule;
use Drupal\Core\Render\Element\RenderCallbackInterface;
use Drupal\Core\Url;
final class RenderCallbackInterfaceObject implements RenderCallbackInterface {
public function staticCallback(): array {
return [
'#type' => ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_internal_classes/src/Foo/ExternalClass.php | tests/fixtures/drupal/modules/module_with_internal_classes/src/Foo/ExternalClass.php | <?php declare(strict_types=1);
namespace Drupal\module_with_internal_classes\Foo;
class ExternalClass {
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/module_with_internal_classes/src/Foo/InternalClass.php | tests/fixtures/drupal/modules/module_with_internal_classes/src/Foo/InternalClass.php | <?php declare(strict_types=1);
namespace Drupal\module_with_internal_classes\Foo;
/**
* @internal
*/
class InternalClass {
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_map/src/Base.php | tests/fixtures/drupal/modules/service_map/src/Base.php | <?php
declare(strict_types=1);
namespace Drupal\service_map;
abstract class Base
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_map/src/Concrete.php | tests/fixtures/drupal/modules/service_map/src/Concrete.php | <?php
declare(strict_types=1);
namespace Drupal\service_map;
final class Concrete extends SecondBase
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_map/src/SecondBase.php | tests/fixtures/drupal/modules/service_map/src/SecondBase.php | <?php
declare(strict_types=1);
namespace Drupal\service_map;
abstract class SecondBase extends Base
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_map/src/Override.php | tests/fixtures/drupal/modules/service_map/src/Override.php | <?php
declare(strict_types=1);
namespace Drupal\service_map;
final class Override
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/service_map/src/MyService.php | tests/fixtures/drupal/modules/service_map/src/MyService.php | <?php
declare(strict_types=1);
namespace Drupal\service_map;
final class MyService
{
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryWithAccessRule.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryWithAccessRule.php | <?php
declare(strict_types=1);
namespace fixtures\drupal\modules\phpstan_fixtures\src;
final class EntityQueryWithAccessRule
{
public function foo(): void
{
\Drupal::entityTypeManager()->getStorage('node')
->getQuery()
->accessCheck(FALSE)
->condition('field_test',... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/AppRootParameter.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/AppRootParameter.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
final class AppRootParameter implements ContainerInjectionInterface {
private $appRoot;
/**
* {@inheritdoc}
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryWithoutAccessRule.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryWithoutAccessRule.php | <?php
declare(strict_types=1);
namespace fixtures\drupal\modules\phpstan_fixtures\src;
final class EntityQueryWithoutAccessRule
{
public function foo(): void
{
\Drupal::entityTypeManager()->getStorage('node')
->getQuery()
->condition('field_test', 'foo', '=')
->exe... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/UsesDeprecatedUrlFunction.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/UsesDeprecatedUrlFunction.php | <?php
namespace Drupal\phpstan_fixtures;
class UsesDeprecatedUrlFunction {
public function test() {
$url = \Drupal::url('fake_route');
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/TestServicesMappingExtension.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/TestServicesMappingExtension.php | <?php
namespace Drupal\phpstan_fixtures;
class TestServicesMappingExtension {
public function testEntityManager() {
$entity_manager = \Drupal::getContainer()->get('entity.manager');
$doesNotExist = $entity_manager->thisMethodDoesNotExist();
$definitions = $entity_manager->getDefinitions();... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/DeprecatedGlobalConstants.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/DeprecatedGlobalConstants.php | <?php
namespace Drupal\phpstan_fixtures;
class DeprecatedGlobalConstants {
public function test() {
$date = new \DateTime();
$date->setTimezone(new \DateTimeZone(DATETIME_STORAGE_TIMEZONE));
$formatted = $date->format(DATETIME_DATE_STORAGE_FORMAT);
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/ExamplePluginManager.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/ExamplePluginManager.php | <?php
declare(strict_types = 1);
namespace Drupal\phpstan_fixtures;
use Drupal\Component\Plugin\Exception\PluginException;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Extension\ThemeHandlerInterface;
use Drupal\Core\Plugin\DefaultPluginManager;
use D... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryHasAccessRule.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/EntityQueryHasAccessRule.php | <?php
declare(strict_types=1);
namespace fixtures\drupal\modules\phpstan_fixtures\src;
use function PHPStan\dumpType;
final class EntityQueryHasAccessRule
{
public function foo(): void
{
\Drupal::entityTypeManager()->getStorage('node')
->getQuery()
->accessCheck(FALSE)
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/DrupalTestInChildSiteContant.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/DrupalTestInChildSiteContant.php | <?php
namespace Drupal\phpstan_fixtures;
class DrupalTestInChildSiteContant {
public function test() {
$test = DRUPAL_TEST_IN_CHILD_SITE;
}
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/CustomConfigEntityStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/CustomConfigEntityStorage.php | <?php
declare(strict_types=1);
namespace Drupal\phpstan_fixtures;
use Drupal\Core\Config\Entity\ConfigEntityStorage;
final class CustomConfigEntityStorage extends ConfigEntityStorage {
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/CustomContentEntityStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/CustomContentEntityStorage.php | <?php
declare(strict_types=1);
namespace Drupal\phpstan_fixtures;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\ContentEntityStorageBase;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
final class CustomContentEntityStorage extends ContentEntityStorag... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/InternalClass.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/InternalClass.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures;
/**
* @internal
*/
class InternalClass {
}
| php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigWithoutExport.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigWithoutExport.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
/**
* Defines the ConfigTest configuration entity.
*
* @ConfigEntityType(
* id = "config_test",
* label = @Translation("Test configuration"),
* )
*/
final class ConfigWithoutExport exte... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigEntityUsingDefaultStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigEntityUsingDefaultStorage.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
/**
* Defines the ConfigEntityUsingDefaultStorage configuration entity.
*
* @ConfigEntityType(
* id = "config_entity_using_default_storage",
* label = @Translation("Config entity using de... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigWithExport.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigWithExport.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
/**
* Defines the ConfigTest configuration entity.
*
* @ConfigEntityType(
* id = "config_test",
* label = @Translation("Test configuration"),
* config_export = {
* "id",
* "l... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigEntityUsingCustomStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ConfigEntityUsingCustomStorage.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
/**
* Defines the ConfigEntityUsingCustomStorage configuration entity.
*
* @ConfigEntityType(
* id = "config_entity_using_custom_storage",
* label = @Translation("Config entity using cust... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ContentEntityUsingDefaultStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ContentEntityUsingDefaultStorage.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Entity\ContentEntityBase;
/**
* Defines ContentEntityUsingDefaultStorage entity.
*
* @ContentEntityType(
* id = "content_entity_using_default_storage",
* label = @Translation("Content entity using default storage"),
* ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ContentEntityUsingCustomStorage.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ContentEntityUsingCustomStorage.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Entity\ContentEntityBase;
/**
* Defines ContentEntityUsingCustomStorage entity.
*
* @ContentEntityType(
* id = "content_entity_using_custom_storage",
* label = @Translation("Content entity using custom storage"),
* b... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ReflectionEntityTest.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Entity/ReflectionEntityTest.php | <?php declare(strict_types=1);
namespace Drupal\phpstan_fixtures\Entity;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\user\UserInterface;
/**
* @property \Drupal\Core\Field\EntityReferenceFieldItemListInterface $user_id
... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Plugin/Block/BlockWithContext.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Plugin/Block/BlockWithContext.php | <?php
namespace Drupal\phpstan_fixtures\Plugin\Block;
use Drupal\Core\Block\BlockBase;
/**
* Provides a context-aware block.
*
* @Block(
* id = "test_context_aware",
* admin_label = @Translation("Test context-aware block"),
* context = {
* "user" = @ContextDefinition("entity:user", required = FALSE,... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
mglaman/phpstan-drupal | https://github.com/mglaman/phpstan-drupal/blob/5fe2128306061a04361e4818e306faa0e3d639c7/tests/fixtures/drupal/modules/phpstan_fixtures/src/Plugin/Action/ActionSample.php | tests/fixtures/drupal/modules/phpstan_fixtures/src/Plugin/Action/ActionSample.php | <?php
namespace Drupal\phpstan_fixtures\Plugin\Action;
use Drupal\Core\Action\ActionBase;
use Drupal\Core\Session\AccountInterface;
/**
* Sample action code to show `context` is ignored since the base class is not context aware.
*
* @Action(
* id = "action_sample",
* label = @Translation("Sample"),
* typ... | php | MIT | 5fe2128306061a04361e4818e306faa0e3d639c7 | 2026-01-05T02:09:52.644045Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.