| Total Complexity | 8 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class manager |
||
| 14 | { |
||
| 15 | /** @var array Array of tools from the service collection */ |
||
| 16 | protected $tools = array(); |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Constructor |
||
| 20 | * |
||
| 21 | * @param array $tools Array of tools from the service collection |
||
| 22 | */ |
||
| 23 | 43 | public function __construct($tools) |
|
| 24 | { |
||
| 25 | 43 | $this->tools = $tools; |
|
| 26 | 43 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Get all available tools |
||
| 30 | * |
||
| 31 | * @return array Array of available tools |
||
| 32 | */ |
||
| 33 | 38 | public function get_tools() |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get tool by name |
||
| 56 | * |
||
| 57 | * @param string $name Name of a trim tool service |
||
| 58 | * |
||
| 59 | * @return null|tools\tool_interface A trim tool object |
||
| 60 | */ |
||
| 61 | 5 | public function get_tool($name) |
|
| 75 |