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 | |||
3 | namespace NokitaKaze\Queue; |
||
4 | |||
5 | class QueueFactory { |
||
6 | /** |
||
7 | * @param GeneralQueueConstructionSettings $settings |
||
8 | * |
||
9 | * @return Queue |
||
10 | * @throws QueueException |
||
11 | */ |
||
12 | static function get_queue($settings) { |
||
13 | if (!isset($settings->name)) { |
||
0 ignored issues
–
show
|
|||
14 | throw new QueueException('Queue name has not been set'); |
||
15 | } |
||
16 | if (!isset($settings->sleep_time_while_consuming)) { |
||
0 ignored issues
–
show
Accessing
sleep_time_while_consuming on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
17 | $settings->sleep_time_while_consuming = 0.02; |
||
0 ignored issues
–
show
Accessing
sleep_time_while_consuming on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
18 | } |
||
19 | |||
20 | if (!isset($settings->queues)) { |
||
0 ignored issues
–
show
Accessing
queues on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
21 | if (!isset($settings->scenario) or ($settings->scenario == 0)) { |
||
0 ignored issues
–
show
Accessing
scenario on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
22 | $settings->queues = self::get_scenario_read_small_files($settings); |
||
23 | } elseif ($settings->scenario == 1) { |
||
0 ignored issues
–
show
Accessing
scenario on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
24 | $settings->queues = self::get_scenario_write_small_files($settings); |
||
25 | } else { |
||
26 | throw new QueueException("Can not resolve scenario #{$settings->scenario}"); |
||
0 ignored issues
–
show
Accessing
scenario on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
27 | } |
||
28 | } |
||
29 | |||
30 | $queue = new Queue($settings); |
||
31 | |||
32 | return $queue; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param GeneralQueueConstructionSettings $settings |
||
37 | * |
||
38 | * @return Queue[] |
||
39 | */ |
||
40 | protected static function get_scenario_read_small_files($settings) { |
||
41 | /** |
||
42 | * @var FileDBQueueConstructionSettingsForGeneral $sub_set1 |
||
43 | */ |
||
44 | $sub_set1 = (object) []; |
||
45 | $sub_set1->is_general = true; |
||
0 ignored issues
–
show
Accessing
is_general on the interface NokitaKaze\Queue\FileDBQ...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
46 | $sub_set1->name = $settings->name.'_set1'; |
||
0 ignored issues
–
show
Accessing
name on the interface NokitaKaze\Queue\FileDBQ...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
name on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
47 | $sub_set1->folder = $settings->folder; |
||
0 ignored issues
–
show
Accessing
folder on the interface NokitaKaze\Queue\FileDBQ...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
folder on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
48 | $sub_set1->mutex_folder = $settings->folder.'/mutex'; |
||
0 ignored issues
–
show
Accessing
mutex_folder on the interface NokitaKaze\Queue\FileDBQ...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
folder on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
49 | $sub_set1->class_name = 'FileDB'; |
||
0 ignored issues
–
show
Accessing
class_name on the interface NokitaKaze\Queue\FileDBQ...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
50 | |||
51 | /** |
||
52 | * @var SmallFilesQueueConstructionSettingsForGeneral $sub_set2 |
||
53 | */ |
||
54 | $sub_set2 = (object) []; |
||
55 | $sub_set2->is_general = false; |
||
0 ignored issues
–
show
Accessing
is_general on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
56 | $sub_set2->name = $settings->name.'_set2'; |
||
0 ignored issues
–
show
Accessing
name on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
name on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
57 | $sub_set2->message_folder = $settings->folder.'/messages'; |
||
0 ignored issues
–
show
Accessing
message_folder on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
folder on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
58 | $sub_set2->class_name = 'SmallFiles'; |
||
0 ignored issues
–
show
Accessing
class_name on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
59 | |||
60 | return [$sub_set1, $sub_set2]; |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * @param GeneralQueueConstructionSettings $settings |
||
65 | * |
||
66 | * @return SmallFilesQueueConstructionSettingsForGeneral[] |
||
67 | */ |
||
68 | protected static function get_scenario_write_small_files($settings) { |
||
69 | /** |
||
70 | * @var SmallFilesQueueConstructionSettingsForGeneral $sub_set2 |
||
71 | */ |
||
72 | $sub_set2 = (object) []; |
||
73 | $sub_set2->is_general = true; |
||
0 ignored issues
–
show
Accessing
is_general on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
74 | $sub_set2->name = $settings->name.'_set2'; |
||
0 ignored issues
–
show
Accessing
name on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
name on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
75 | $sub_set2->message_folder = $settings->folder.'/messages'; |
||
0 ignored issues
–
show
Accessing
message_folder on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() Accessing
folder on the interface NokitaKaze\Queue\GeneralQueueConstructionSettings suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
76 | $sub_set2->class_name = 'SmallFiles'; |
||
0 ignored issues
–
show
Accessing
class_name on the interface NokitaKaze\Queue\SmallFi...ctionSettingsForGeneral suggest that you code against a concrete implementation. How about adding an instanceof check?
If you access a property on an interface, you most likely code against a concrete implementation of the interface. Available Fixes
![]() |
|||
77 | |||
78 | return [$sub_set2]; |
||
79 | } |
||
80 | } |
||
81 | |||
82 | ?> |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: