src/ProxyManager/ProxyGenerator/Util/PublicScopeSimulator.php
private static function getUndefinedPropertyNotice(string $operationType, string $nameParameter) : string
    {
        if ($operationType !== self::OPERATION_GET) {
            return '';
        }

        return '    $backtrace = debug_backtrace(false);' . "\n"
            . '    trigger_error(' . "\n"
            . '        sprintf(' . "\n"
            . '            \'Undefined property: %s::$%s in %s on line %s\',' . "\n"
            . '            get_parent_class($this),' . "\n"
            . '            $' . $nameParameter . ',' . "\n"
            . '            $backtrace[0][\'file\'],' . "\n"
            . '            $backtrace[0][\'line\']' . "\n"
            . '        ),' . "\n"
            . '        \E_USER_NOTICE' . "\n"
            . '    );' . "\n";
    }
private static function getUndefinedPropertyNotice(string $operationType, string $nameParameter) : string
    {
        if ($operationType !== self::OPERATION_GET) {
            return '';
        }

        return '    $backtrace = debug_backtrace(false);' . "\n"
            . '    trigger_error(' . "\n"
            . '        sprintf(' . "\n"
            . '            \'Undefined property: %s::$%s in %s on line %s\',' . "\n"
            . '            get_parent_class($this),' . "\n"
            . '            $' . $nameParameter . ',' . "\n"
            . '            $backtrace[0][\'file\'],' . "\n"
            . '            $backtrace[0][\'line\']' . "\n"
            . '        ),' . "\n"
            . '        \E_USER_NOTICE' . "\n"
            . '    );' . "\n";
    }
private static function getUndefinedPropertyNotice ( string $ operationType , string $ nameParameter ) : string { if ( $ operationType !== self :: OPERATION_GET ) { return '' ; } return '    $backtrace = debug_backtrace(false);' . "\n" . '    trigger_error(' . "\n" . '        sprintf(' . "\n" . '            \'Undefined property: %s::$%s in %s on line %s\',' . "\n" . '            get_parent_class($this),' . "\n" . '            $' . $ nameParameter . ',' . "\n" . '            $backtrace[0][\'file\'],' . "\n" . '            $backtrace[0][\'line\']' . "\n" . '        ),' . "\n" . '        \E_USER_NOTICE' . "\n" . '    );' . "\n" ; }
This will generate code that triggers a notice if access is attempted on a non-existing property
This will generate code that triggers a notice if access is attempted on a non - existing property