-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
@@ -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'); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw early, assign later.
167fca0
to
bc050e9
Compare
@@ -105,7 +104,6 @@ public function run($request = null, $response = null) | |||
|
|||
$event = new HttpFlowEvent('bootstrap', $request, $response); | |||
|
|||
$container = $this->getContainer(); |
There was a problem hiding this comment.
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.
2e904f5
to
bec4f80
Compare
rebased. |
Scrutinizer error seems not related. |
scrutinzer now green yay ;) |
merge-able ? |
yes thanks! :) |
No description provided.