Tomas Votruba cc15e42d73 Updated Rector to commit a0f2ad97896e7b0afc830e0f51c89679948dd2be
a0f2ad9789 [Privatization] Skip ChangeGlobalVariablesToPropertiesRector on read only global variable (#442)
2021-07-16 09:16:38 +00:00

72 lines
1.5 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RectorPrefix20210716\Symfony\Component\Config\Builder;
/**
* Represents a property when building classes.
*
* @internal
*
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
*/
class Property
{
private $name;
private $originalName;
private $array = \false;
private $type = null;
private $content;
public function __construct(string $originalName, string $name)
{
$this->name = $name;
$this->originalName = $originalName;
}
public function getName() : string
{
return $this->name;
}
public function getOriginalName() : string
{
return $this->originalName;
}
/**
* @param string $type
*/
public function setType($type) : void
{
$this->array = \false;
$this->type = $type;
if ('[]' === \substr($type, -2)) {
$this->array = \true;
$this->type = \substr($type, 0, -2);
}
}
public function getType() : ?string
{
return $this->type;
}
public function getContent() : ?string
{
return $this->content;
}
/**
* @param string $content
*/
public function setContent($content) : void
{
$this->content = $content;
}
public function isArray() : bool
{
return $this->array;
}
}