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.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | use App\Repositories\TranslateRepository; |
||
3 | |||
4 | |||
5 | Breadcrumbs::register('home', function ($breadcrumbs, $key = 'breadcrumbs_home') { |
||
6 | $repository = new TranslateRepository(); |
||
7 | $breadcrumbs->push($repository->getKey($key)->value, route('home')); |
||
8 | }); |
||
9 | |||
10 | View Code Duplication | Breadcrumbs::register('expire_soon_products', function ($breadcrumbs, $key = 'breadcrumbs_offerts') { |
|
0 ignored issues
–
show
|
|||
11 | $repository = new TranslateRepository(); |
||
12 | $breadcrumbs->parent('home'); |
||
13 | $breadcrumbs->push($repository->getKey($key)->value, route('expire_soon_products')); |
||
14 | }); |
||
15 | |||
16 | View Code Duplication | Breadcrumbs::register('view_blog', function ($breadcrumbs, $key = 'breadcrumbs_blog') { |
|
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. ![]() |
|||
17 | $repository = new TranslateRepository(); |
||
18 | $breadcrumbs->parent('home'); |
||
19 | $breadcrumbs->push($repository->getKey($key)->value, route('view_blog')); |
||
20 | }); |
||
21 | |||
22 | Breadcrumbs::register('view_post', function ($breadcrumbs, $post) { |
||
23 | $repository = new TranslateRepository(); |
||
0 ignored issues
–
show
$repository is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
24 | $breadcrumbs->parent('view_blog'); |
||
25 | $breadcrumbs->push($post->title, route('view_post', $post->id)); |
||
26 | }); |
||
27 | |||
28 | View Code Duplication | Breadcrumbs::register('contacts', function ($breadcrumbs, $key = 'breadcrumbs_contacts') { |
|
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. ![]() |
|||
29 | $repository = new TranslateRepository(); |
||
30 | $breadcrumbs->parent('home'); |
||
31 | $breadcrumbs->push($repository->getKey($key)->value, route('contacts')); |
||
32 | }); |
||
33 | |||
34 | View Code Duplication | Breadcrumbs::register('frontend_vendors', function ($breadcrumbs, $key = 'breadcrumbs_vendors') { |
|
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. ![]() |
|||
35 | $repository = new TranslateRepository(); |
||
36 | $breadcrumbs->parent('home'); |
||
37 | $breadcrumbs->push($repository->getKey($key)->value, route('vendors')); |
||
38 | }); |
||
39 | |||
40 | Breadcrumbs::register('view_vendor_frontend', function ($breadcrumbs, $vendor) { |
||
41 | $repository = new TranslateRepository(); |
||
0 ignored issues
–
show
$repository is not used, you could remove the assignment.
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently. $myVar = 'Value';
$higher = false;
if (rand(1, 6) > 3) {
$higher = true;
} else {
$higher = false;
}
Both the ![]() |
|||
42 | $breadcrumbs->parent('view_blog'); |
||
43 | $breadcrumbs->push($vendor->name, route('view_vendor', $vendor->id)); |
||
44 | }); |
||
45 | |||
46 | View Code Duplication | Breadcrumbs::register('support', function ($breadcrumbs, $key = 'breadcrumbs_support') { |
|
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. ![]() |
|||
47 | $repository = new TranslateRepository(); |
||
48 | $breadcrumbs->parent('home'); |
||
49 | $breadcrumbs->push($repository->getKey($key)->value, route('support')); |
||
50 | }); |
||
51 | |||
52 | Breadcrumbs::register('show_page', function ($breadcrumbs, $static_page) { |
||
53 | $breadcrumbs->parent('home'); |
||
54 | $breadcrumbs->push($static_page->title, route('show_page', $static_page->id)); |
||
55 | }); |
||
56 | |||
57 | View Code Duplication | Breadcrumbs::register('view_category', function ($breadcrumbs, $category) { |
|
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. ![]() |
|||
58 | $breadcrumbs->parent('home'); |
||
59 | $breadcrumbs->push($category->present()->renderName(), route('view_category', [ $category->slug ])); |
||
60 | }); |
||
61 | |||
62 | Breadcrumbs::register('view_vendor', function ($breadcrumbs, $vendor) { |
||
63 | $breadcrumbs->parent('home'); |
||
64 | $breadcrumbs->push($vendor->present()->renderTitle(), route('view_vendor', $vendor->slug)); |
||
65 | }); |
||
66 | |||
67 | View Code Duplication | Breadcrumbs::register('view_sub_category', function ($breadcrumbs, $category, $subcategory) { |
|
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. ![]() |
|||
68 | $breadcrumbs->parent('view_category', $category); |
||
69 | $breadcrumbs->push($subcategory->present()->renderName(), route('view_sub_category', [ $category->slug, $subcategory->slug ])); |
||
70 | }); |
||
71 | |||
72 | Breadcrumbs::register('view_lot', function ($breadcrumbs, $lot) { |
||
73 | if($lot->vendor) |
||
74 | $breadcrumbs->parent('view_vendor', $lot->vendor); |
||
75 | |||
76 | $breadcrumbs->push($lot->present()->renderName(), route('view_lot', $lot->id)); |
||
77 | }); |
||
78 | |||
79 | Breadcrumbs::register('view_product', function ($breadcrumbs, $product) { |
||
80 | if($product->lots) |
||
81 | $breadcrumbs->parent('view_lot', $product->lot); |
||
82 | |||
83 | $breadcrumbs->push($product->name, route('view_product', $product->id)); |
||
84 | }); |
||
85 | |||
86 | Breadcrumbs::register('my_vendors', function ($breadcrumbs) { |
||
87 | //todo: dashoboard. |
||
88 | $breadcrumbs->push('My Vendors', route('my_vendors')); |
||
89 | }); |
||
90 | |||
91 | Breadcrumbs::register('create_vendor', function ($breadcrumbs) { |
||
92 | //todo: dashoboard. |
||
93 | $breadcrumbs->push('Vendor Create', route('create_vendor')); |
||
94 | }); |
||
95 | |||
96 | Breadcrumbs::register('vendors', function ($breadcrumbs, $key = 'breadcrumbs_vendors') { |
||
97 | $repository = new TranslateRepository(); |
||
98 | $breadcrumbs->push($repository->getKey($key)->value, route('vendors')); |
||
99 | }); |
||
100 | |||
101 | Breadcrumbs::register('add_lot', function ($breadcrumbs, $vendor) { |
||
102 | //todo: dashoboard. |
||
103 | $breadcrumbs->parent('view_vendor', $vendor); |
||
104 | $breadcrumbs->push('Create lot', route('add_lot', $vendor->slug)); |
||
105 | }); |
||
106 | |||
107 | Breadcrumbs::register('settings', function ($breadcrumbs, $key = 'breadcrumbs_settings') { |
||
108 | $repository = new TranslateRepository(); |
||
109 | |||
110 | $breadcrumbs->push($repository->getKey($key)->value, route('settings')); |
||
111 | }); |
||
112 | |||
113 | Breadcrumbs::register('user_password', function ($breadcrumbs, $key = 'breadcrumbs_user_password') { |
||
114 | $repository = new TranslateRepository(); |
||
115 | |||
116 | $breadcrumbs->push($repository->getKey($key)->value, route('user_password')); |
||
117 | }); |
||
118 | |||
119 | Breadcrumbs::register('my_involved', function ($breadcrumbs) { |
||
120 | //todo: dashoboard. |
||
121 | $breadcrumbs->push('My Involved', route('my_involved')); |
||
122 | }); |
||
123 | |||
124 | Breadcrumbs::register('my_products', function ($breadcrumbs) { |
||
125 | //todo: dashoboard. |
||
126 | $breadcrumbs->push('My Products', route('my_products')); |
||
127 | }); |
||
128 | |||
129 | Breadcrumbs::register('my_lots', function ($breadcrumbs) { |
||
130 | //todo: dashoboard. |
||
131 | $breadcrumbs->push('My Lots', route('my_lots')); |
||
132 | }); |
||
133 | |||
134 | Breadcrumbs::register('edit_vendor', function ($breadcrumbs, $vendor) { |
||
135 | //todo: dashoboard. |
||
136 | $breadcrumbs->push('Edit Vendor', route('edit_vendor', $vendor->id)); |
||
137 | }); |
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.