From 6d7bbd7a209074f85531059fe8bdc11dc1f1dc34 Mon Sep 17 00:00:00 2001 From: Mathias STRASSER Date: Fri, 22 Dec 2017 21:09:26 +0100 Subject: [PATCH 1/2] Add support for PHP 7.2 --- .../TwigExtension/Line/ObjectLineStrategySpec.php | 10 +++++----- .../TwigExtension/Line/ObjectLineStrategy.php | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategySpec.php b/spec/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategySpec.php index 2ce6de7..9172669 100644 --- a/spec/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategySpec.php +++ b/spec/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategySpec.php @@ -11,7 +11,7 @@ namespace spec\Memio\TwigTemplateEngine\TwigExtension\Line; -use Memio\Model\Object; +use Memio\Model\Objekt; use Memio\TwigTemplateEngine\TwigExtension\Line\LineStrategy; use PhpSpec\ObjectBehavior; @@ -25,13 +25,13 @@ function it_is_a_line_strategy() $this->shouldImplement(LineStrategy::class); } - function it_supports_objects(Object $object) + function it_supports_objects(Objekt $object) { $this->supports($object)->shouldBe(true); } function it_needs_line_after_constants_if_object_has_both_constants_and_properties( - Object $object + Objekt $object ) { $object->allConstants()->willReturn([1]); $object->allProperties()->willReturn([2]); @@ -41,7 +41,7 @@ function it_needs_line_after_constants_if_object_has_both_constants_and_properti } function it_needs_line_after_constants_if_object_has_both_constants_and_methods( - Object $object + Objekt $object ) { $object->allConstants()->willReturn([1]); $object->allProperties()->willReturn([]); @@ -50,7 +50,7 @@ function it_needs_line_after_constants_if_object_has_both_constants_and_methods( $this->needsLineAfter($object, self::CONSTANT_BLOCK)->shouldBe(true); } - function it_needs_line_after_properties_if_object_has_both_properties_and_methods(Object $object) + function it_needs_line_after_properties_if_object_has_both_properties_and_methods(Objekt $object) { $object->allConstants()->willReturn([]); $object->allProperties()->willReturn([1]); diff --git a/src/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategy.php b/src/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategy.php index 550d6b4..16b8557 100644 --- a/src/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategy.php +++ b/src/Memio/TwigTemplateEngine/TwigExtension/Line/ObjectLineStrategy.php @@ -12,13 +12,13 @@ namespace Memio\TwigTemplateEngine\TwigExtension\Line; use Memio\PrettyPrinter\Exception\InvalidArgumentException; -use Memio\Model\Object; +use Memio\Model\Objekt; class ObjectLineStrategy implements LineStrategy { public function supports($model) : bool { - return $model instanceof Object; + return $model instanceof Objekt; } public function needsLineAfter($model, string $block) : bool From 104cf53788c3a226fe530025b683c537a491e4c1 Mon Sep 17 00:00:00 2001 From: Mathias STRASSER Date: Fri, 22 Dec 2017 21:09:55 +0100 Subject: [PATCH 2/2] Add branch alias --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 353607d..e837ea6 100644 --- a/composer.json +++ b/composer.json @@ -26,5 +26,10 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^1.6", "phpspec/phpspec": "^3.0" + }, + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } } }