Cherry-Pie /
LogEnvelope
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Yaro\LogEnvelope; |
||||||
| 4 | |||||||
| 5 | class ServiceProvider extends \Illuminate\Support\ServiceProvider |
||||||
| 6 | { |
||||||
| 7 | |||||||
| 8 | protected $defer = false; |
||||||
| 9 | |||||||
| 10 | /** |
||||||
| 11 | * Bootstrap the application events. |
||||||
| 12 | */ |
||||||
| 13 | public function boot() |
||||||
| 14 | { |
||||||
| 15 | /* |
||||||
| 16 | * Publish configuration file |
||||||
| 17 | */ |
||||||
| 18 | $this->publishes([ |
||||||
| 19 | __DIR__ . '/../config/log-envelope.php' => config_path('yaro.log-envelope.php'), |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 20 | ]); |
||||||
| 21 | |||||||
| 22 | /* |
||||||
| 23 | * Publish migration if not published yet |
||||||
| 24 | */ |
||||||
| 25 | if (!$this->migrationHasAlreadyBeenPublished()) { |
||||||
| 26 | $timestamp = date('Y_m_d_His', time()); |
||||||
| 27 | $this->publishes([ |
||||||
| 28 | __DIR__ . '/../resources/migrations/create_exceptions_table.php.stub' => database_path('migrations/' . $timestamp . '_create_exceptions_table.php'), |
||||||
|
0 ignored issues
–
show
The function
database_path was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 29 | ], 'migrations'); |
||||||
| 30 | } |
||||||
| 31 | |||||||
| 32 | $this->app['view']->addNamespace('log-envelope', __DIR__ . '/../resources/views'); |
||||||
| 33 | |||||||
| 34 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
||||||
|
0 ignored issues
–
show
The type
Illuminate\Foundation\AliasLoader was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||||||
| 35 | $loader->alias('LogEnvelope', 'Yaro\LogEnvelope\Facade'); |
||||||
| 36 | } |
||||||
| 37 | |||||||
| 38 | /** |
||||||
| 39 | * Register the service provider. |
||||||
| 40 | */ |
||||||
| 41 | public function register() |
||||||
| 42 | { |
||||||
| 43 | config([ |
||||||
|
0 ignored issues
–
show
The function
config was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 44 | 'config/yaro.log-envelope.php', |
||||||
| 45 | ]); |
||||||
| 46 | |||||||
| 47 | $this->app->singleton('yaro.log-envelope', function($app) { |
||||||
| 48 | return new LogEnvelope(); |
||||||
| 49 | }); |
||||||
| 50 | } |
||||||
| 51 | |||||||
| 52 | /** |
||||||
| 53 | * @return bool |
||||||
| 54 | */ |
||||||
| 55 | protected function migrationHasAlreadyBeenPublished() |
||||||
| 56 | { |
||||||
| 57 | $files = glob(database_path('/migrations/*_create_exceptions_table.php')); |
||||||
|
0 ignored issues
–
show
The function
database_path was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 58 | return count($files) > 0; |
||||||
| 59 | } |
||||||
| 60 | |||||||
| 61 | } |
||||||
| 62 |