Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit 8d4b3c7

Browse files
committed
up
1 parent f361c65 commit 8d4b3c7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/DI/Container.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
namespace Inhere\Library\DI;
1414

15-
use Inhere\Exceptions\DependencyResolutionException;
1615
use Inhere\Exceptions\NotFoundException;
1716
use Inhere\Library\Helpers\Obj;
1817
use Inhere\Library\Traits\NameAliasTrait;
@@ -207,9 +206,7 @@ public function set($id, $definition, array $opts = [])
207206
* 'service3 id' => ...
208207
* ]
209208
* @return $this
210-
* @throws NotFoundException
211209
* @throws \InvalidArgumentException
212-
* @throws DependencyResolutionException
213210
*/
214211
public function sets(array $services)
215212
{
@@ -326,7 +323,7 @@ public function createCallback($target, array $arguments = [], array $props = []
326323

327324
try {
328325
$reflection = new \ReflectionClass($class);
329-
} catch (\ReflectionException $e) {
326+
} catch (\Exception $e) {
330327
throw new \RuntimeException($e->getMessage());
331328
}
332329

@@ -371,7 +368,6 @@ public function createCallback($target, array $arguments = [], array $props = []
371368
* - 其他的则总是返回新的实例
372369
* @param string $id 要获取的服务组件id
373370
* @return mixed
374-
* @throws NotFoundException
375371
*/
376372
public function get($id)
377373
{

0 commit comments

Comments
 (0)