Skip to content

Commit

Permalink
Merge pull request #7 from roukmoute/version-2
Browse files Browse the repository at this point in the history
Add support for PHP 7.2
  • Loading branch information
gnugat authored Jan 2, 2018
2 parents 8a8b95a + 104cf53 commit 5cdb20e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,10 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^1.6",
"phpspec/phpspec": "^3.0"
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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]);
Expand All @@ -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([]);
Expand All @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cdb20e

Please sign in to comment.