Skip to content

Commit 62c74fa

Browse files
committed
!fixup Methods for getting specific definitions
- getServiceDefinition - getAccessorDefinition - getFactoryDefinition - getLocatorDefinition - getImportedDefinition
1 parent ce0937b commit 62c74fa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/DI/ContainerBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function getDefinition(string $name): Definition
140140
public function getServiceDefinition(string $name): Nette\DI\Definitions\ServiceDefinition
141141
{
142142
$service = $this->getDefinition($name);
143-
if ( ! $service instanceof Nette\DI\Definitions\ServiceDefinition) {
143+
if (!$service instanceof Nette\DI\Definitions\ServiceDefinition) {
144144
throw new MissingServiceException("ServiceDefinition with name '$name' not found.");
145145
}
146146

@@ -151,7 +151,7 @@ public function getServiceDefinition(string $name): Nette\DI\Definitions\Service
151151
public function getAccessorDefinition(string $name): Nette\DI\Definitions\AccessorDefinition
152152
{
153153
$service = $this->getDefinition($name);
154-
if ( ! $service instanceof Nette\DI\Definitions\AccessorDefinition) {
154+
if (!$service instanceof Nette\DI\Definitions\AccessorDefinition) {
155155
throw new MissingServiceException("AccessorDefinition with name '$name' not found.");
156156
}
157157

@@ -162,7 +162,7 @@ public function getAccessorDefinition(string $name): Nette\DI\Definitions\Access
162162
public function getFactoryDefinition(string $name): Nette\DI\Definitions\FactoryDefinition
163163
{
164164
$service = $this->getDefinition($name);
165-
if ( ! $service instanceof Nette\DI\Definitions\FactoryDefinition) {
165+
if (!$service instanceof Nette\DI\Definitions\FactoryDefinition) {
166166
throw new MissingServiceException("FactoryDefinition with name '$name' not found.");
167167
}
168168

@@ -173,7 +173,7 @@ public function getFactoryDefinition(string $name): Nette\DI\Definitions\Factory
173173
public function getLocatorDefinition(string $name): Nette\DI\Definitions\LocatorDefinition
174174
{
175175
$service = $this->getDefinition($name);
176-
if ( ! $service instanceof Nette\DI\Definitions\LocatorDefinition) {
176+
if (!$service instanceof Nette\DI\Definitions\LocatorDefinition) {
177177
throw new MissingServiceException("LocatorDefinition with name '$name' not found.");
178178
}
179179

@@ -184,7 +184,7 @@ public function getLocatorDefinition(string $name): Nette\DI\Definitions\Locator
184184
public function getImportedDefinition(string $name): Nette\DI\Definitions\ImportedDefinition
185185
{
186186
$service = $this->getDefinition($name);
187-
if ( ! $service instanceof Nette\DI\Definitions\ImportedDefinition) {
187+
if (!$service instanceof Nette\DI\Definitions\ImportedDefinition) {
188188
throw new MissingServiceException("ImportedDefinition with name '$name' not found.");
189189
}
190190

0 commit comments

Comments
 (0)