| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function runLoadersBoot() |
||
| 28 | { |
||
| 29 | // the config files should be loaded first from all the directories in their own loop |
||
| 30 | $this->loadConfigsFromShip(); |
||
| 31 | $this->loadMigrationsFromShip(); |
||
| 32 | $this->loadViewsFromShip(); |
||
| 33 | |||
| 34 | // > iterate over all the containers folders and autoload most of the components |
||
| 35 | foreach (ShipButler::getContainersNames() as $containerName) { |
||
| 36 | $this->loadConfigsFromContainers($containerName); |
||
| 37 | $this->loadLocalsFromContainers($containerName); |
||
| 38 | $this->loadOnlyMainProvidersFromContainers($containerName); |
||
| 39 | $this->loadMigrationsFromContainers($containerName); |
||
| 40 | $this->loadConsolesFromContainers($containerName); |
||
| 41 | $this->loadViewsFromContainers($containerName); |
||
| 42 | } |
||
| 43 | |||
| 44 | $this->loadFactoriesFromContainers(); |
||
|
|
|||
| 45 | } |
||
| 46 | |||
| 48 |
This check looks for methods that are used by a trait but not required by it.
To illustrate, let’s look at the following code example
The trait
Idableprovides a methodequalsIdthat in turn relies on the methodgetId(). If this method does not exist on a class mixing in this trait, the method will fail.Adding the
getId()as an abstract method to the trait will make sure it is available.