Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
VersionServiceProvider
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 register
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Engelsystem\Helpers;
6
7use Engelsystem\Container\ServiceProvider;
8
9class VersionServiceProvider extends ServiceProvider
10{
11    public function register(): void
12    {
13        $this->app->when(Version::class)
14            ->needs('$storage')
15            ->give($this->app->get('path.storage.app'));
16        $this->app->when(Version::class)
17            ->needs('$gitRoot')
18            ->give($this->app->get('path') . DIRECTORY_SEPARATOR . '.git');
19    }
20}