private function getConstructorBody(array $interceptedProperties): string
    {
        $assocProperties = [];
        $listProperties  = [];
        foreach ($interceptedProperties as $propertyName) {
            $assocProperties[] = "        '{$propertyName}' => &\$target->{$propertyName}";
            $listProperties[]  = "        \$target->{$propertyName}";
        }
        $lines = [
            '$accessor = function(array &$propertyStorage, object $target) {',
            '    $propertyStorage = [',
            implode(',' . PHP_EOL, $assocProperties),
            '    ];',
            '    unset(',
            implode(',' . PHP_EOL, $listProperties),
            '    );',
            '};',
            '($accessor->bindTo($this, parent::class))($this->__properties, $this);'
        ];

        return implode(PHP_EOL, $lines);
    }
private function getConstructorBody(array $interceptedProperties): string
    {
        $assocProperties = [];
        $listProperties  = [];
        foreach ($interceptedProperties as $propertyName) {
            $assocProperties[] = "        '{$propertyName}' => &\$target->{$propertyName}";
            $listProperties[]  = "        \$target->{$propertyName}";
        }
        $lines = [
            '$accessor = function(array &$propertyStorage, object $target) {',
            '    $propertyStorage = [',
            implode(',' . PHP_EOL, $assocProperties),
            '    ];',
            '    unset(',
            implode(',' . PHP_EOL, $listProperties),
            '    );',
            '};',
            '($accessor->bindTo($this, parent::class))($this->__properties, $this);'
        ];

        return implode(PHP_EOL, $lines);
    }
private function getConstructorBody ( array $ interceptedProperties ) : string { $ assocProperties = [ ] ; $ listProperties = [ ] ; foreach ( $ interceptedProperties as $ propertyName ) { $ assocProperties [ ] = "        '{$propertyName}' => &\$target->{$propertyName}" ; $ listProperties [ ] = "        \$target->{$propertyName}" ; } $ lines = [ '$accessor = function(array &$propertyStorage, object $target) {' , '    $propertyStorage = [' , implode ( ',' . PHP_EOL , $ assocProperties ) , '    ];' , '    unset(' , implode ( ',' . PHP_EOL , $ listProperties ) , '    );' , '};' , '($accessor->bindTo($this, parent::class))($this->__properties, $this);' ] ; return implode ( PHP_EOL , $ lines ) ; }
Returns constructor code

@param array $interceptedProperties List of properties to intercept
Returns constructor code