Skip to content

Commit a714348

Browse files
Cleanup psalm-type AutogenerateMode
1 parent 81ddeb4 commit a714348

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

lib/Doctrine/ORM/Configuration.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@
6262
* It combines all configuration options from DBAL & ORM.
6363
*
6464
* Internal note: When adding a new configuration option just write a getter/setter pair.
65-
*
66-
* @psalm-import-type AutogenerateMode from ProxyFactory
6765
*/
6866
class Configuration extends \Doctrine\DBAL\Configuration
6967
{
@@ -95,8 +93,7 @@ public function getProxyDir()
9593
/**
9694
* Gets the strategy for automatically generating proxy classes.
9795
*
98-
* @return int Possible values are constants of Doctrine\ORM\Proxy\ProxyFactory.
99-
* @psalm-return AutogenerateMode
96+
* @return ProxyFactory::AUTOGENERATE_*
10097
*/
10198
public function getAutoGenerateProxyClasses()
10299
{
@@ -106,9 +103,7 @@ public function getAutoGenerateProxyClasses()
106103
/**
107104
* Sets the strategy for automatically generating proxy classes.
108105
*
109-
* @param bool|int $autoGenerate Possible values are constants of Doctrine\ORM\Proxy\ProxyFactory.
110-
* @psalm-param bool|AutogenerateMode $autoGenerate
111-
* True is converted to AUTOGENERATE_ALWAYS, false to AUTOGENERATE_NEVER.
106+
* @param bool|ProxyFactory::AUTOGENERATE_* $autoGenerate True is converted to AUTOGENERATE_ALWAYS, false to AUTOGENERATE_NEVER.
112107
*
113108
* @return void
114109
*/

lib/Doctrine/ORM/Proxy/ProxyFactory.php

+4-8
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131

3232
/**
3333
* This factory is used to create proxy objects for entities at runtime.
34-
*
35-
* @psalm-type AutogenerateMode = ProxyFactory::AUTOGENERATE_NEVER|ProxyFactory::AUTOGENERATE_ALWAYS|ProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS|ProxyFactory::AUTOGENERATE_EVAL|ProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS_OR_CHANGED
3634
*/
3735
class ProxyFactory extends AbstractProxyFactory
3836
{
@@ -93,12 +91,10 @@ public function __serialize(): array
9391
* Initializes a new instance of the <tt>ProxyFactory</tt> class that is
9492
* connected to the given <tt>EntityManager</tt>.
9593
*
96-
* @param EntityManagerInterface $em The EntityManager the new factory works for.
97-
* @param string $proxyDir The directory to use for the proxy classes. It must exist.
98-
* @param string $proxyNs The namespace to use for the proxy classes.
99-
* @param bool|int $autoGenerate The strategy for automatically generating proxy classes. Possible
100-
* values are constants of {@see ProxyFactory::AUTOGENERATE_*}.
101-
* @psalm-param bool|AutogenerateMode $autoGenerate
94+
* @param EntityManagerInterface $em The EntityManager the new factory works for.
95+
* @param string $proxyDir The directory to use for the proxy classes. It must exist.
96+
* @param string $proxyNs The namespace to use for the proxy classes.
97+
* @param bool|self::AUTOGENERATE_* $autoGenerate The strategy for automatically generating proxy classes.
10298
*/
10399
public function __construct(EntityManagerInterface $em, $proxyDir, $proxyNs, $autoGenerate = self::AUTOGENERATE_NEVER)
104100
{

0 commit comments

Comments
 (0)