diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index 6f27408cab..6c9bb423d0 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -21,35 +21,21 @@ final class PropertyAccess /** * Creates a property accessor with the default configuration. * - * @param bool $throwExceptionOnInvalidIndex - * * @return PropertyAccessor The new property accessor */ - public static function createPropertyAccessor($throwExceptionOnInvalidIndex = false, $magicCall = false) + public static function createPropertyAccessor() { - return self::createPropertyAccessorBuilder($throwExceptionOnInvalidIndex, $magicCall)->getPropertyAccessor(); + return self::createPropertyAccessorBuilder()->getPropertyAccessor(); } /** * Creates a property accessor builder. * - * @param bool $enableExceptionOnInvalidIndex - * * @return PropertyAccessorBuilder The new property accessor builder */ - public static function createPropertyAccessorBuilder($enableExceptionOnInvalidIndex = false, $enableMagicCall = false) + public static function createPropertyAccessorBuilder() { - $propertyAccessorBuilder = new PropertyAccessorBuilder(); - - if ($enableExceptionOnInvalidIndex) { - $propertyAccessorBuilder->enableExceptionOnInvalidIndex(); - } - - if ($enableMagicCall) { - $propertyAccessorBuilder->enableMagicCall(); - } - - return $propertyAccessorBuilder; + return new PropertyAccessorBuilder(); } /** diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php deleted file mode 100644 index a584dcb3bb..0000000000 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessTest.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\PropertyAccess\Tests; - -use Symfony\Component\PropertyAccess\PropertyAccess; -use Symfony\Component\PropertyAccess\PropertyAccessor; - -/** - * @author Robin Chalas assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor()); - } - - public function testCreatePropertyAccessorWithExceptionOnInvalidIndex() - { - $this->assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor(true)); - } - - public function testCreatePropertyAccessorWithMagicCallEnabled() - { - $this->assertInstanceOf(PropertyAccessor::class, PropertyAccess::createPropertyAccessor(false, true)); - } -}