Issues (731)

Security Analysis    no request data  

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.

IQuery.php (3 issues)

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
3
namespace pQuery;
4
5
interface IQuery extends \Countable {
6
   /// Methods ///
7
8
   /**
9
    * Adds the specified class(es) to each of the set of matched elements.
10
    * @param string $classname The name of the class to add. You can add multiple classes by separating them with spaces.
11
    * @return IQuery
12
    */
13
   function addClass($classname);
14
15
   /**
16
    * Insert content, specified by the parameter, after each element in the set of matched elements.
17
    * @param string $content The content to add.
18
    * @return IQuery
19
    */
20
   function after($content);
21
22
   /**
23
    * Insert content, specified by the parameter, to the end of each element in the set of matched elements.
24
    * @param string $content The content to append.
25
    * @return IQuery
26
    */
27
   function append($content);
28
29
   /**
30
    * Get the value of an attribute for the first element in the set of matched elements or set one
31
    * or more attributes for every matched element.
32
    * @param string $name The name of the attribute.
33
    * @param null|string $value The value to set or null to get the current attribute value.
34
    * @return string|IQuery
35
    */
36
   function attr($name, $value = null);
37
38
   /**
39
    * Insert content, specified by the parameter, before each element in the set of matched elements.
40
    * @param string $content The content to add.
41
    * @return IQuery
42
    */
43
   function before($content);
44
45
   /**
46
    * Remove all child nodes of the set of matched elements from the DOM.
47
    * @return IQuery;
0 ignored issues
show
The doc-type IQuery; could not be parsed: Expected "|" or "end of type", but got ";" at position 6. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
48
    */
49
   function clear();
50
51
   /**
52
    * Get the value of a style property for the first element in the set of matched elements or
53
    * set one or more CSS properties for every matched element.
54
    */
55
//   function css($name, $value = null);
0 ignored issues
show
Unused Code Comprehensibility introduced by
54% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
56
57
   /**
58
    * Determine whether any of the matched elements are assigned the given class.
59
    * @param string $classname The name of the class to check.
60
    */
61
   function hasClass($classname);
62
63
   /**
64
    * Get the HTML contents of the first element in the set of matched elements
65
    * or set the HTML contents of every matched element.
66
    * @param string|null $value The value to set.
67
    */
68
   function html($value = null);
69
70
   /**
71
    * Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.
72
    * @param string $content The content to add.
73
    */
74
   function prepend($content);
75
76
   /**
77
    * Get the value of a property for the first element in the set of matched elements
78
    * or set one or more properties for every matched element.
79
    * @param string $name The name of the property.
80
    * The currently supported properties are `tagname`, `selected`, and `checked`.
81
    * @param null|string $value The value to set or null to get the current property value.
82
    */
83
   function prop($name, $value = null);
84
85
   /**
86
    * Remove the set of matched elements from the DOM.
87
    * @param null|string $selector A css query to filter the set of removed nodes.
88
    */
89
   function remove($selector = null);
90
91
   /**
92
    * Remove an attribute from each element in the set of matched elements.
93
    * @param string $name The name of the attribute to remove.
94
    */
95
   function removeAttr($name);
96
97
   /**
98
    * Remove a single class, multiple classes, or all classes from each element in the set of matched elements.
99
    * @param string $classname The name of the class to remove.
100
    */
101
   function removeClass($classname);
102
103
   /**
104
    * Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.
105
    * @param string $content The content that will replace the nodes.
106
    */
107
   function replaceWith($content);
108
109
   /**
110
    * Returns the name of the element.
111
    * @param null|string $tagName A new tag name or null to return the current tag name.
0 ignored issues
show
There is no parameter named $tagName. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
112
    */
113
   function tagName($value = null);
114
115
   /**
116
    * Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements.
117
    * @param null|string $value A string to set the text or null to return the current text.
118
    */
119
   function text($value = null);
120
121
   /**
122
    * Add or remove one or more classes from each element in the set of matched elements,
123
    * depending on either the class’s presence or the value of the switch argument.
124
    * @param string $classname
125
    * @param bool|null
126
    */
127
   function toggleClass($classname, $switch = null);
128
129
   /**
130
    * Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
131
    */
132
   function unwrap();
133
134
   /**
135
    * Get the current value of the first element in the set of matched elements or set the value of every matched element.
136
    * @param string|null $value The new value of the element or null to return the current value.
137
    */
138
   function val($value = null);
139
140
   /**
141
    * Wrap an HTML structure around each element in the set of matched elements.
142
    * @param string A tag name or html string specifying the structure to wrap around the matched elements.
143
    */
144
   function wrap($wrapping_element);
145
146
   /**
147
    * Wrap an HTML structure around the content of each element in the set of matched elements.
148
    * @param string A tag name or html string specifying the structure to wrap around the content of the matched elements.
149
    */
150
   function wrapInner($wrapping_element);
151
}
152
153