• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 10903962632

17 Sep 2024 01:21PM UTC coverage: 7.683% (-0.001%) from 7.684%
10903962632

push

github

web-flow
fix(laravel): call authorize on delete but not validation (#6618)

0 of 15 new or added lines in 5 files covered. (0.0%)

3 existing lines in 1 file now uncovered.

12668 of 164877 relevant lines covered (7.68%)

22.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Laravel/workbench/app/Http/Requests/VaultFormRequest.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace Workbench\App\Http\Requests;
15

16
use Illuminate\Foundation\Http\FormRequest;
17
use Workbench\App\Models\Vault;
18

19
class VaultFormRequest extends FormRequest
20
{
21
    public function authorize(): bool
22
    {
NEW
23
        return $this->user()->can('delete', new Vault());
×
24
    }
25

26
    /**
27
     * Get the validation rules that apply to the request.
28
     *
29
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
30
     */
31
    public function rules(): array
32
    {
NEW
33
        return [
×
NEW
34
            'secret' => 'required',
×
NEW
35
        ];
×
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc