| Conditions | 5 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | protected static function getBootstrapNamespace() |
||
| 24 | { |
||
| 25 | if (self::$_bootstrapNamespace === null) { |
||
| 26 | $checkNamespaces = ['\yii\bootstrap', '\yii\bootstrap4']; |
||
| 27 | foreach ($checkNamespaces as $namespace) { |
||
| 28 | if (class_exists("$namespace\\BootstrapAsset")) { |
||
| 29 | self::$_bootstrapNamespace = $namespace; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | if (self::$_bootstrapNamespace === null) { |
||
| 34 | throw new \RuntimeException("Unable to determine the bootstrap version"); |
||
| 35 | } |
||
| 36 | return self::$_bootstrapNamespace; |
||
| 37 | } |
||
| 38 | |||
| 44 | } |