Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container usage clean up #83

Merged
merged 2 commits into from
Oct 5, 2015
Merged

Conversation

samsonasik
Copy link
Member

No description provided.

@@ -46,11 +46,12 @@ public function __construct(ContainerInterface $container = null)
if ($container === null) {
$container = Container\PHPDiFactory::buildContainer(Loader::load());
}
$this->container = $container;

if ($container->has('router') == false) {
throw new Exception('Define router config');
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw early, assign later.

@@ -105,7 +104,6 @@ public function run($request = null, $response = null)

$event = new HttpFlowEvent('bootstrap', $request, $response);

$container = $this->getContainer();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getContainer() is only usable if called from outside/from App instance, as only return the container, use $this->container directly instead.

@samsonasik
Copy link
Member Author

rebased.

@samsonasik
Copy link
Member Author

Scrutinizer error seems not related.

@samsonasik
Copy link
Member Author

scrutinzer now green yay ;)

@samsonasik
Copy link
Member Author

merge-able ?

@gianarb
Copy link
Contributor

gianarb commented Oct 5, 2015

yes thanks! :)

gianarb pushed a commit that referenced this pull request Oct 5, 2015
@gianarb gianarb merged commit 414757b into pennyphp:master Oct 5, 2015
@samsonasik samsonasik deleted the container-clean-up branch October 5, 2015 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants