REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.28 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/rector/rector-doctrine/src/NodeAnalyzer/DoctrineEntityDetector.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Doctrine\NodeAnalyzer; use PhpParser\Node\Name; use PhpParser\Node\Stmt\Class_; use PHPStan\Reflection\ReflectionProvider; use Rector\NodeAnalyzer\DoctrineEntityAnalyzer; final class DoctrineEntityDetector { /** * @readonly * @var \Rector\NodeAnalyzer\DoctrineEntityAnalyzer */ private $doctrineEntityAnalyzer; /** * @readonly * @var \PHPStan\Reflection\ReflectionProvider */ private $reflectionProvider; public function __construct(DoctrineEntityAnalyzer $doctrineEntityAnalyzer, ReflectionProvider $reflectionProvider) { $this->doctrineEntityAnalyzer = $doctrineEntityAnalyzer; $this->reflectionProvider = $reflectionProvider; } public function detect(Class_ $class) : bool { // A. check annotations if ($this->doctrineEntityAnalyzer->hasClassAnnotation($class)) { return \true; } if (!$class->namespacedName instanceof Name) { return \false; } $className = $class->namespacedName->toString(); // B. check attributes $classReflection = $this->reflectionProvider->getClass($className); return $this->doctrineEntityAnalyzer->hasClassReflectionAttribute($classReflection); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AttributeFinder.php
4.39 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AttrinationFinder.php
3.44 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ConstructorAssignPropertyAnalyzer.php
1.82 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
DoctrineEntityDetector.php
1.28 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MethodUniqueReturnedPropertyResolver.php
1.38 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TargetEntityResolver.php
2.15 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).