Issues (41)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/Contracts/Builder.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Malezha\Menu\Contracts;
3
4
use Illuminate\Contracts\Container\Container;
5
use Illuminate\Contracts\Support\Arrayable;
6
7
/**
8
 * Interface Builder
9
 * @package Malezha\Menu\Contracts
10
 */
11
interface Builder extends HasAttributes, HasActiveAttributes, Arrayable, \ArrayAccess
12
{
13
    const UL = 'ul';
14
15
    const OL = 'ol';
16
17
    /**
18
     * @param Container $container
19
     * @param Attributes $attributes
20
     * @param Attributes $activeAttributes
21
     * @param string $type
22
     * @param string $view
23
     * @internal param string $name
24
     */
25
    function __construct(Container $container, Attributes $attributes, Attributes $activeAttributes,
26
                         $type = self::UL, $view = null);
27
28
    /**
29
     * @param string $name
30
     * @param string $type
31
     * @param callable|null $callback
32
     * @return ElementFactory|Element
33
     */
34
    public function create($name, $type, callable $callback = null);
35
36
    /**
37
     * Insert values before item
38
     * 
39
     * @param string $name
40
     * @param callable $callback
41
     * @return Element
42
     */
43
    public function insertBefore($name, callable $callback);
44
45
    /**
46
     * Insert values after item
47
     *
48
     * @param string $name
49
     * @param callable $callback
50
     * @return mixed
51
     */
52
    public function insertAfter($name, callable $callback);
53
54
    /**
55
     * Check exits by name
56
     *
57
     * @param string $name
58
     */
59
    public function has($name);
60
61
    /**
62
     * Get element or sub menu by name
63
     *
64
     * @param string $name
65
     * @param mixed|null $default
66
     * @return ElementFactory|Element|mixed
67
     */
68
    public function get($name, $default = null);
69
70
    /**
71
     * Get element or sub menu by index
72
     *
73
     * @param int $index
74
     * @param mixed|null $default
75
     * @return ElementFactory|Element|mixed
76
     */
77
    public function getByIndex($index, $default = null);
78
79
    /**
80
     * Get all elements
81
     *
82
     * @return array
83
     */
84
    public function all();
85
86
    /**
87
     * Delete element
88
     *
89
     * @param string $name
90
     */
91
    public function forget($name);
92
93
    /**
94
     * Get menu type: UL or OL
95
     *
96
     * @return string
97
     */
98
    public function getType();
99
100
    /**
101
     * Set menu type. You can use constants at this interface
102
     *
103
     * @param string $type
104
     */
105
    public function setType($type);
106
107
    /**
108
     * Render menu to html
109
     *
110
     * @param string|null $view
111
     * @return string
112
     */
113
    public function render($view = null);
114
115
    /**
116
     * Get render view
117
     *
118
     * @return string
119
     */
120
    public function getView();
121
122
    /**
123
     * Set render view
124
     *
125
     * @param string $view
126
     * @throws \Exception
127
     */
128
    public function setView($view);
129
130
    /**
131
     * @param array $builder
132
     * @return Builder
133
     */
134
    static public function fromArray(array $builder);
0 ignored issues
show
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
135
}