Skip to content

Commit

Permalink
Merge pull request #8 from roukmoute/php7.2
Browse files Browse the repository at this point in the history
Add support for PHP 7.2
  • Loading branch information
gnugat authored Feb 6, 2018
2 parents 67a57e5 + 0e8dd58 commit 8ec7855
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@
"memio/memio": "^2.0",
"memio/linter": "^2.0",
"memio/validator": "^2.0",
"memio/model": "^2.0",
"memio/model": "^2.0.1",
"memio/pretty-printer": "^2.0",
"memio/twig-template-engine": "^2.0",
"memio/twig-template-engine": "^2.0.1",
"php": "^7.0",
"phpspec/phpspec": "^4.0",
"symfony/event-dispatcher": "^2.7 || ^3.0 || ^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0",
"phpunit/phpunit": "^6.0"
},
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Memio\Model\File as FileModel;
use Memio\Model\FullyQualifiedName as FullyQualifiedNameModel;
use Memio\Model\Method as MethodModel;
use Memio\Model\Object as ObjectModel;
use Memio\Model\Objekt as ObjectModel;
use Memio\Model\Property as PropertyModel;
use Memio\SpecGen\CodeEditor\CodeEditor;
use Memio\SpecGen\CodeEditor\InsertConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Memio\Model\File;
use Memio\Model\Method;
use Memio\Model\Object;
use Memio\Model\Objekt;
use Memio\Model\Property;
use Memio\SpecGen\GenerateConstructor\GeneratedConstructor;
use PhpSpec\Console\ConsoleIO;
Expand All @@ -30,7 +30,7 @@ function let(ConsoleIO $io)
$this->beConstructedWith($io);
}

function it_logs_the_generated_constructor(File $file, ConsoleIO $io, Method $method, Object $object, Property $property)
function it_logs_the_generated_constructor(File $file, ConsoleIO $io, Method $method, Objekt $object, Property $property)
{
$generatedConstructor = new GeneratedConstructor($file->getWrappedObject());
$file->getStructure()->willReturn($object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Memio\Model\File as FileModel;
use Memio\Model\FullyQualifiedName as FullyQualifiedNameModel;
use Memio\Model\Method as MethodModel;
use Memio\Model\Object as ObjectModel;
use Memio\Model\Objekt as ObjectModel;
use Memio\SpecGen\CodeEditor\CodeEditor;
use Memio\SpecGen\CodeEditor\InsertMethod;
use Memio\SpecGen\CodeEditor\InsertUseStatements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Memio\Model\File;
use Memio\Model\Method;
use Memio\Model\Object;
use Memio\Model\Objekt;
use Memio\SpecGen\GenerateMethod\GeneratedMethod;
use PhpSpec\Console\ConsoleIO;
use PhpSpec\ObjectBehavior;
Expand All @@ -28,7 +28,7 @@ function let(ConsoleIO $io)
$this->beConstructedWith($io);
}

function it_logs_the_generated_method(File $file, ConsoleIO $io, Method $method, Object $object)
function it_logs_the_generated_method(File $file, ConsoleIO $io, Method $method, Objekt $object)
{
$generatedMethod = new GeneratedMethod($file->getWrappedObject());
$file->getStructure()->willReturn($object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Memio\Model\File;
use Memio\Model\FullyQualifiedName;
use Memio\Model\Method;
use Memio\Model\Object;
use Memio\Model\Objekt;
use Memio\Model\Property;
use Memio\SpecGen\CommandBus\Command;
use Memio\SpecGen\CommandBus\CommandHandler;
Expand Down Expand Up @@ -54,7 +54,7 @@ public function supports(Command $command): bool
public function handle(Command $command)
{
$method = new Method($command->methodName);
$object = Object::make($command->fullyQualifiedName)->addMethod($method);
$object = Objekt::make($command->fullyQualifiedName)->addMethod($method);
$file = File::make($command->fileName)->setStructure($object);
$arguments = $this->variableArgumentMarshaller->marshal($command->arguments);
foreach ($arguments as $argument) {
Expand Down
4 changes: 2 additions & 2 deletions src/Memio/SpecGen/GenerateMethod/GenerateMethodHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Memio\Model\File;
use Memio\Model\FullyQualifiedName;
use Memio\Model\Method;
use Memio\Model\Object;
use Memio\Model\Objekt;
use Memio\SpecGen\CommandBus\Command;
use Memio\SpecGen\CommandBus\CommandHandler;
use Memio\SpecGen\Marshaller\VariableArgumentMarshaller;
Expand Down Expand Up @@ -55,7 +55,7 @@ public function handle(Command $command)
{
$method = new Method($command->methodName);
$file = File::make($command->fileName)
->setStructure(Object::make($command->fullyQualifiedName)
->setStructure(Objekt::make($command->fullyQualifiedName)
->addMethod($method)
)
;
Expand Down

0 comments on commit 8ec7855

Please sign in to comment.