This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
1 | <?php namespace Bantenprov\LaravelOpd\Http\Controllers; |
||||
2 | |||||
3 | use App\Http\Controllers\Controller; |
||||
0 ignored issues
–
show
|
|||||
4 | use Illuminate\Http\Request; |
||||
0 ignored issues
–
show
The type
Illuminate\Http\Request 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 ![]() |
|||||
5 | use Bantenprov\LaravelOpd\Facades\LaravelOpd; |
||||
6 | use Bantenprov\LaravelOpd\Models\LaravelOpdModel; |
||||
7 | |||||
8 | /** |
||||
9 | * The LaravelOpdController class. |
||||
10 | * |
||||
11 | * @package Bantenprov\LaravelOpd |
||||
12 | * @author bantenprov <[email protected]> |
||||
13 | */ |
||||
14 | class LaravelOpdController extends Controller |
||||
15 | { |
||||
16 | public function demo() |
||||
17 | { |
||||
18 | return LaravelOpd::welcome(); |
||||
0 ignored issues
–
show
The method
welcome() does not exist on Bantenprov\LaravelOpd\Facades\LaravelOpd . Since you implemented __callStatic , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
19 | } |
||||
20 | |||||
21 | public function index() |
||||
22 | { |
||||
23 | $opds = LaravelOpdModel::all(); |
||||
24 | |||||
25 | $nodes = LaravelOpdModel::get()->toTree(); |
||||
26 | |||||
27 | View Code Duplication | $traverse = function ($categories, $prefix = '-') use (&$traverse) { |
|||
0 ignored issues
–
show
This code seems to be duplicated across your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||||
28 | foreach ($categories as $category) { |
||||
29 | echo $prefix.' '.$category->kunker.' - '.$category->name.'<br>'; |
||||
30 | |||||
31 | $traverse($category->children, $prefix.'-'); |
||||
32 | } |
||||
33 | }; |
||||
34 | |||||
35 | $traverse($nodes); |
||||
36 | |||||
37 | return view('laravel-opd::unit_kerja.index',compact('opds')); |
||||
0 ignored issues
–
show
The function
view 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
![]() |
|||||
38 | |||||
39 | } |
||||
40 | |||||
41 | public function createRoot() |
||||
42 | { |
||||
43 | |||||
44 | return view('laravel-opd::unit_kerja.create-root'); |
||||
0 ignored issues
–
show
The function
view 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
![]() |
|||||
45 | } |
||||
46 | |||||
47 | public function createChild() |
||||
48 | { |
||||
49 | $unit_kerjas = LaravelOpdModel::all(); |
||||
50 | |||||
51 | return view('laravel-opd::unit_kerja.create-child',compact('unit_kerjas')); |
||||
0 ignored issues
–
show
The function
view 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
![]() |
|||||
52 | } |
||||
53 | |||||
54 | public function addChild($id) |
||||
55 | { |
||||
56 | $unit_kerja = LaravelOpdModel::where('id',$id)->first(); |
||||
57 | |||||
58 | return view('laravel-opd::unit_kerja.add-child',compact('unit_kerja')); |
||||
0 ignored issues
–
show
The function
view 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
![]() |
|||||
59 | } |
||||
60 | |||||
61 | View Code Duplication | public function storeRoot(Request $request) |
|||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||||
62 | { |
||||
63 | $check_root = LaravelOpdModel::where('id',$request->root); |
||||
64 | |||||
65 | if($check_root->get()->isEmpty()) |
||||
66 | { |
||||
67 | |||||
68 | $unit_kerja = LaravelOpdModel::create([ |
||||
0 ignored issues
–
show
|
|||||
69 | 'kunker' => $request->kunker, |
||||
70 | 'kunker_simral' => '', |
||||
71 | 'name' => $request->name, |
||||
72 | 'levelunker' => $request->levelunker, |
||||
73 | ]); |
||||
74 | } |
||||
75 | else |
||||
76 | { |
||||
77 | return redirect()->back(); |
||||
0 ignored issues
–
show
The function
redirect 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
![]() |
|||||
78 | } |
||||
79 | |||||
80 | |||||
81 | |||||
82 | return redirect()->back(); |
||||
83 | } |
||||
84 | |||||
85 | View Code Duplication | public function storeChild(Request $request) |
|||
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. ![]() |
|||||
86 | { |
||||
87 | $check_root = LaravelOpdModel::where('id',$request->root); |
||||
88 | |||||
89 | $check_root->first()->children()->create([ |
||||
90 | 'kunker' => $request->c_kunker, |
||||
91 | 'kunker_simral' => '', |
||||
92 | 'name' => $request->c_name, |
||||
93 | 'levelunker' => $request->c_levelunker, |
||||
94 | ]); |
||||
95 | |||||
96 | return redirect()->back(); |
||||
0 ignored issues
–
show
The function
redirect 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
![]() |
|||||
97 | } |
||||
98 | } |
||||
99 |
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.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths