| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | private static function buildConnector($type) |
||
| 24 | { |
||
| 25 | $type = strtolower($type); |
||
| 26 | if ( ! isset(self::$types[$type])) { |
||
| 27 | throw new \Exception('错误的通知类型:'.$type); |
||
| 28 | } |
||
| 29 | |||
| 30 | $class = false !== strpos($type, '\\') ? $type : '\\Dongdavid\\Notify\\sender\\'.self::$types[$type]; |
||
| 31 | |||
| 32 | return new $class(); |
||
| 33 | } |
||
| 47 |