Skip to content

Commit 76cb45d

Browse files
committed
#632 #645 #646 applied automated CS fixes via phpcbf (mostly docblock positioning, indentation)
1 parent 31196e5 commit 76cb45d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/ProxyManager/ProxyGenerator/Util/PublicScopeSimulator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class PublicScopeSimulator
3737
* the operation. Return directly if none provided
3838
* @param string|null $interfaceName name of the proxified interface if any
3939
*
40-
* @psalm-param $operationType self::OPERATION_*
41-
*
4240
* @throws InvalidArgumentException
41+
*
42+
* @psalm-param $operationType self::OPERATION_*
4343
*/
4444
public static function getPublicAccessSimulationCode(
4545
string $operationType,
@@ -61,8 +61,7 @@ public static function getPublicAccessSimulationCode(
6161
? 'new \\ReflectionClass(get_parent_class($this))'
6262
: 'new \\ReflectionClass(' . var_export($originalClass->getName(), true) . ')';
6363

64-
$returnPropertyName = $returnPropertyName
65-
?? ($operationType === self::OPERATION_UNSET ? 'unset' : $returnPropertyName);
64+
$returnPropertyName ??= ($operationType === self::OPERATION_UNSET ? 'unset' : $returnPropertyName);
6665

6766
return '$realInstanceReflection = ' . $originalClassReflection . ';' . "\n\n"
6867
. 'if (! $realInstanceReflection->hasProperty($' . $nameParameter . ')) {' . "\n"

tests/ProxyManagerTest/Functional/PublicScopeSimulatorFunctionalTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ public function testAccessingUndefinedPropertiesDoesNotLeadToInvalidByRefAccess(
2525
{
2626
/** @psalm-var ClassWithMixedProperties $sut */
2727
$sut = eval(sprintf(
28-
<<<'PHP'
28+
<<<'PHP'
2929
return new class() extends %s {
3030
public function doGet($prop) : string { %s }
3131
public function doSet($prop, $val) : string { %s }
3232
public function doIsset($prop) : bool { %s }
3333
public function doUnset($prop) : void { %s }
3434
};
3535
PHP
36-
,
36+
,
3737
ClassWithMixedProperties::class,
3838
PublicScopeSimulator::getPublicAccessSimulationCode(PublicScopeSimulator::OPERATION_GET, 'prop'),
3939
PublicScopeSimulator::getPublicAccessSimulationCode(PublicScopeSimulator::OPERATION_SET, 'prop', 'val'),

0 commit comments

Comments
 (0)