| Conditions | 2 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 2.0009 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 58 | protected function setupStorageDriver(): void |
|
| 31 | 3 | { |
|
| 32 | Storage::extend( |
||
| 33 | 3 | 'local-encrypted', |
|
| 34 | function (Application $app, array $config) { |
||
| 35 | 3 | $permissions = $config['permissions'] ?? []; |
|
| 36 | |||
| 37 | 3 | $links = ($config['links'] ?? null) === 'skip' |
|
| 38 | 3 | ? LocalAdapter::SKIP_LINKS |
|
| 39 | 3 | : LocalAdapter::DISALLOW_LINKS; |
|
| 40 | 3 | ||
| 41 | 3 | return new Filesystem( |
|
| 42 | 1 | new EncryptedAdapter( |
|
| 43 | 1 | new LocalAdapter( |
|
| 44 | $config['root'], |
||
| 45 | 3 | $config['lock'] ?? LOCK_EX, |
|
| 46 | $links, |
||
| 47 | 3 | $permissions |
|
| 48 | ), |
||
| 49 | 87 | $app->make('encrypted-data.encrypter') |
|
| 50 | ), |
||
| 51 | 87 | Arr::only($config, ['visibility', 'disable_asserts', 'url']) |
|
| 52 | ); |
||
| 57 |