Showing 17 of 17 total issues
Missing class import via use statement (line '18', column '23'). Open
throw new \Exception('$this->currency should be instance of Money\Currency, "' . get_class($this->currency) . '" given');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '73', column '23'). Open
throw new \Exception('Item->quantity() expects an integer');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '88', column '23'). Open
throw new \Exception('There is more than one item with the id "' . $id . '" on the cart with id "' . $this->id . '"');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '127', column '23'). Open
throw new \Exception('Value passed to Cart->add() is not an array nor an Item. Value passed: ' . json_encode($arrayOrItem));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '156', column '23'). Open
throw new \Exception("An item without ID can't be added to the cart. The item: " . json_encode($item));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '165', column '23'). Open
throw new \Exception('Item->setFields() expects an array. Argument given: ' . json_encode($fields));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
has accesses the super-global variable $_SESSION. Open
public function has($key)
{
return isset($_SESSION[$this->name][$key]);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
put accesses the super-global variable $_SESSION. Open
public function put($key, $value)
{
$_SESSION[$this->name][$key] = serialize($value);
return $_SESSION[$this->name][$key];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
get accesses the super-global variable $_SESSION. Open
public function get($key)
{
if ($this->has($key)) {
return unserialize($_SESSION[$this->name][$key]);
}
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
put accesses the super-global variable $_SESSION. Open
public function put($key, $value)
{
$_SESSION[$this->name][$key] = serialize($value);
return $_SESSION[$this->name][$key];
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
forget accesses the super-global variable $_SESSION. Open
public function forget($key)
{
if ($this->has($key)) {
unset($_SESSION[$this->name][$key]);
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
flush accesses the super-global variable $_SESSION. Open
public function flush()
{
$_SESSION[$this->name] = [];
return true;
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
TODO found Open
TODO
- Exclude checks
TODO found Open
TODO
- Exclude checks
TODO found Open
// TODO
- Exclude checks
TODO found Open
TODO
- Exclude checks
TODO found Open
// TODO
- Exclude checks