File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1010class DsnHelper
1111{
1212 /**
13- * extractDsn
14- *
15- * @param string $dsn
13+ * @param string $dsn
14+ * @param string|null $type
1615 *
1716 * @return array
1817 */
19- public static function extract (string $ dsn ): array
18+ public static function extract (string $ dsn, ? string & $ type = null ): array
2019 {
20+ if (str_contains ($ dsn , ': ' )) {
21+ [$ type , $ dsn ] = explode (': ' , $ dsn );
22+ }
23+
2124 // Parse DSN to array
2225 $ dsn = str_replace ('; ' , "\n" , $ dsn );
2326
Original file line number Diff line number Diff line change 1313abstract class AbstractMetaManager
1414{
1515 /**
16- * @var string
16+ * @var ? string
1717 */
1818 protected ?string $ name = null ;
1919
@@ -43,7 +43,7 @@ public function getDb(): DatabaseAdapter
4343 }
4444
4545 /**
46- * @return string
46+ * @return ? string
4747 */
4848 public function getName (): ?string
4949 {
You can’t perform that action at this time.
0 commit comments