| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 31 | function getBootstrap($path, $siteSelector = null) |
||
| 32 | { |
||
| 33 | if (!$this->isValid($path)) { |
||
| 34 | throw new \RuntimeException('Invalid path passed to getBootstrap().'); |
||
| 35 | } |
||
| 36 | $this->siteSelection = $siteSelector; |
||
| 37 | // Normally we would instantiate a new BootInterface and pass |
||
| 38 | // the $path to its constructor. |
||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | |||
| 83 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: