execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
rerouteWithError accesses the super-global variable $_POST. Open
private function rerouteWithError($url, $errorMessage)
{
// Restore the values in the fields the user already entered
foreach ($_POST as $key => $val) {
$url .= "&$key=$val";
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
checkRequest accesses the super-global variable $_REQUEST. Open
private static function checkRequest() {
$vals = null;
foreach (\Intern\InternshipView::$requiredFields as $field) {
/* If not set or is empty (For text fields) */
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
checkRequest accesses the super-global variable $_REQUEST. Open
private static function checkRequest() {
$vals = null;
foreach (\Intern\InternshipView::$requiredFields as $field) {
/* If not set or is empty (For text fields) */
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
checkRequest accesses the super-global variable $_REQUEST. Open
private static function checkRequest() {
$vals = null;
foreach (\Intern\InternshipView::$requiredFields as $field) {
/* If not set or is empty (For text fields) */
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_POST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
execute accesses the super-global variable $_REQUEST. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- 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
checkRequest accesses the super-global variable $_REQUEST. Open
private static function checkRequest() {
$vals = null;
foreach (\Intern\InternshipView::$requiredFields as $field) {
/* If not set or is empty (For text fields) */
- Read upRead up
- Create a ticketCreate a ticket
- 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
Function execute
has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method execute
has 241 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Create a ticketCreate a ticket
The class SaveInternship has an overall complexity of 86 which is very high. The configured complexity threshold is 50. Open
class SaveInternship {
public function __construct(){}
private function rerouteWithError($url, $errorMessage)
- Create a ticketCreate a ticket
- Exclude checks
File SaveInternship.php
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of Internship Inventory.
*
- Create a ticketCreate a ticket
The method execute() has 344 lines of code. Current threshold is set to 100. Avoid really long methods. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Create a ticketCreate a ticket
- Exclude checks
The method execute() has an NPath complexity of 351888764357836800. The configured NPath complexity threshold is 200. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method execute() has a Cyclomatic Complexity of 76. The configured cyclomatic complexity threshold is 10. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The class SaveInternship has a coupling between objects value of 22. Consider to reduce the number of dependencies under 13. Open
class SaveInternship {
public function __construct(){}
private function rerouteWithError($url, $errorMessage)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '376', column '34'). Open
$email = new \Intern\Email\OIEDCertifiedEmail(\Intern\InternSettings::getInstance(), $i, $term);
- Read upRead up
- Create a ticketCreate a ticket
- 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 '358', column '29'). Open
$workflow = new \Intern\WorkflowController($i, $t);
- Read upRead up
- Create a ticketCreate a ticket
- 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
Avoid using static access to class '\NQ' in method 'rerouteWithError'. Open
\NQ::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\SubHostFactory' in method 'execute'. Open
$subInfo = SubHostFactory::getSubById($_REQUEST['sub_host']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$i->course_subj = null;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$i->secondary_part = 0;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\Current_User' in method 'execute'. Open
if (\Current_User::isDeity()) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_Core' in method 'execute'. Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else{
$i->remote = 0;
$i->remote_state = NULL;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$i->multi_part = 0;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$oiedCertified = false;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::rollback();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, $e->getMessage());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\WorkflowStateFactory' in method 'execute'. Open
$currState = WorkflowStateFactory::getState($i->getStateName());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::simple('intern', \Intern\UI\NotifyUI::SUCCESS, 'Saved internship for ' . $i->getFullName());
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Current_User' in method 'execute'. Open
if (\Current_User::isDeity()) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::begin();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\InternSettings' in method 'execute'. Open
$email = new \Intern\Email\OIEDCertifiedEmail(\Intern\InternSettings::getInstance(), $i, $term);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$supervisor->supervisor_province = self::trimField($_REQUEST['supervisor_province']);
$supervisor->supervisor_country = $_REQUEST['supervisor_country'] == '-1' ? null : $_REQUEST['supervisor_country'];
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\Intern\WorkflowTransitionFactory' in method 'execute'. Open
$t = \Intern\WorkflowTransitionFactory::getTransitionByName($_POST['workflow_action']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Current_User' in method 'execute'. Open
if (\Current_User::isDeity()) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::rollback();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::rollback();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, "We couldn't find a matching student in Banner. Your changes were saved, but this student probably needs to contact the Registrar's Office to re-enroll.");
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::rollback();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\NQ' in method 'rerouteWithError'. Open
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, $errorMessage);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Canopy\Request' in method 'execute'. Open
if(\Canopy\Request::isAjax()){
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\InternshipFactory' in method 'execute'. Open
$i = \Intern\InternshipFactory::getInternshipById($_REQUEST['internship_id']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\SupervisorFactory' in method 'execute'. Open
$supervisor = SupervisorFactory::getSupervisorById($_REQUEST['supervisor_id']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_Core' in method 'rerouteWithError'. Open
return \PHPWS_Core::reroute($url);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Current_User' in method 'execute'. Open
if (\Current_User::allow('intern', 'change_term')) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::commit();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// Form token doesn't match, so show a nice error message
$this->rerouteWithError('index.php?module=intern&action=ShowInternship',
'Someone else has modified this internship while you were working. In order to not overwrite their changes, your changes were not saved.');
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::commit();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Current_User' in method 'execute'. Open
$ch = new ChangeHistory($i, \Current_User::getUserObj(), time(),
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$majors = array();
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// Otherwise, redirect to the internship edit view
// Show message if user edited internship
\NQ::simple('intern', \Intern\UI\NotifyUI::SUCCESS, 'Saved internship for ' . $i->getFullName());
\NQ::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\Intern\TermFactory' in method 'execute'. Open
$term = TermFactory::getTermByTermCode($i->term);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\WorkflowStateFactory' in method 'execute'. Open
$state = WorkflowStateFactory::getState('CreationState');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Intern\DatabaseStorage' in method 'execute'. Open
DatabaseStorage::save($supervisor);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_Core' in method 'execute'. Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\PHPWS_DB' in method 'execute'. Open
\PHPWS_DB::begin();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else{
$i->loc_country = $subInfo->country;
$i->loc_province = $subInfo->province;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$i->oied_certified = 0;
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\NQ' in method 'execute'. Open
\NQ::close();
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method execute uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// User choose a major, so loop over the set of majors until we find the matching major code
$code = $_POST['major_code'];
foreach ($majors as $m) {
if ($m->getCode() == $code) {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method execute() contains an exit expression. Open
exit;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ExitExpression
Since: 0.2
An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.
Example
class Foo {
public function bar($param) {
if ($param === 42) {
exit(23);
}
}
}
Source https://phpmd.org/rules/design.html#exitexpression
Call to method getUserObj
from undeclared class \Current_User
Open
$ch = new ChangeHistory($i, \Current_User::getUserObj(), time(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method commit
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::commit();
- Create a ticketCreate a ticket
- Exclude checks
Call to method begin
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::begin();
- Create a ticketCreate a ticket
- Exclude checks
Call to method close
from undeclared class \NQ
Open
\NQ::close();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i = \Intern\InternshipFactory::getInternshipById($_REQUEST['internship_id']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->credits = isset($_POST['multipart']) && isset($_POST['secondary_part']) ? null : (int) $_REQUEST['credits'];
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->loc_phone = self::trimField($_REQUEST['host_phone']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method isDeity
from undeclared class \Current_User
Open
if (\Current_User::isDeity()) {
- Create a ticketCreate a ticket
- Exclude checks
Invalid offset 0
of array type array{}
Open
$i->major_description = $majors[0]->getDescription();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getCode
on non-class type null
Open
$i->major_code = $majors[0]->getCode();
- Create a ticketCreate a ticket
- Exclude checks
Invalid offset 0
of array type array{}
Open
$i->major_description = $majors[0]->getDescription();
- Create a ticketCreate a ticket
- Exclude checks
Call to method rollback
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::rollback();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_last_name = self::trimField($_REQUEST['supervisor_last_name']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method rollback
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::rollback();
- Create a ticketCreate a ticket
- Exclude checks
Call to method reroute
from undeclared class \PHPWS_Core
Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->host_sub_id = $_REQUEST['sub_host'];
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
if ($i->form_token == $_REQUEST['form_token']) {
- Create a ticketCreate a ticket
- Exclude checks
Variable $major
is undeclared (Did you mean $majors) Open
$i->major_code = $major->getCode();
- Create a ticketCreate a ticket
- Exclude checks
Call to method isAjax
from undeclared class \Canopy\Request
Open
if(\Canopy\Request::isAjax()){
- Create a ticketCreate a ticket
- Exclude checks
Assigning null
to property but \Intern\Internship->course_subj
is string
Open
$i->course_subj = null;
- Create a ticketCreate a ticket
- Exclude checks
Call to method getMajors
from undeclared class \Intern\DataProvider\Student\Intern\Student
(Did you mean class \Intern\Student) Open
$majors = $student->getMajors();
- Create a ticketCreate a ticket
- Exclude checks
Variable $major
is undeclared (Did you mean $majors) Open
$i->major_description = $major->getDescription();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getDescription
on non-class type null
Open
$i->major_description = $majors[0]->getDescription();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_first_name = self::trimField($_REQUEST['supervisor_first_name']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_title = self::trimField($_REQUEST['supervisor_title']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_state = $_REQUEST['supervisor_state'] == '-1' ? null : $_REQUEST['supervisor_state'];
- Create a ticketCreate a ticket
- Exclude checks
Call to method commit
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::commit();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->faculty_id = $_REQUEST['faculty_id'] > 0 ? $_REQUEST['faculty_id'] : null;
- Create a ticketCreate a ticket
- Exclude checks
Call to method allow
from undeclared class \Current_User
Open
if (\Current_User::allow('intern', 'change_term')) {
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$subInfo = SubHostFactory::getSubById($_REQUEST['sub_host']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_email = self::trimField($_REQUEST['supervisor_email']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_fax = self::trimField($_REQUEST['supervisor_fax']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method simple
from undeclared class \NQ
Open
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, $e->getMessage());
- Create a ticketCreate a ticket
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->paid = $_REQUEST['payment'] == 'paid';
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->preferred_name = self::trimField($_REQUEST['student_preferred_name']);
- Create a ticketCreate a ticket
- Exclude checks
Assigning 0|false|int
to property but \Intern\Internship->end_date
is null
Open
$i->end_date = !empty($_REQUEST['end_date']) ? strtotime($_REQUEST['end_date']) : 0;
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->level = $_REQUEST['level'];
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor = SupervisorFactory::getSupervisorById($_REQUEST['supervisor_id']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_phone = self::trimField($_REQUEST['supervisor_phone']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_address = self::trimField($_REQUEST['supervisor_address']);
- Create a ticketCreate a ticket
- Exclude checks
Assigning 0|false|int
to property but \Intern\Internship->start_date
is null
Open
$i->start_date = !empty($_REQUEST['start_date']) ? strtotime($_REQUEST['start_date']) : 0;
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->term = $_REQUEST['term'];
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->campus = $_REQUEST['campus'];
- Create a ticketCreate a ticket
- Exclude checks
Invalid offset 0
of array type array{}
Open
$i->major_code = $majors[0]->getCode();
- Create a ticketCreate a ticket
- Exclude checks
Call to method rollback
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::rollback();
- Create a ticketCreate a ticket
- Exclude checks
Call to method simple
from undeclared class \NQ
Open
\NQ::simple('intern', \Intern\UI\NotifyUI::SUCCESS, 'Saved internship for ' . $i->getFullName());
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->setPreferredNameMetaphone(self::trimField($_REQUEST['student_preferred_name']));
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_country = $_REQUEST['supervisor_country'] == '-1' ? null : $_REQUEST['supervisor_country'];
- Create a ticketCreate a ticket
- Exclude checks
Call to method isDeity
from undeclared class \Current_User
Open
if (\Current_User::isDeity()) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method isDeity
from undeclared class \Current_User
Open
if (\Current_User::isDeity()) {
- Create a ticketCreate a ticket
- Exclude checks
Invalid offset 0
of array type array{}
Open
$i->major_code = $majors[0]->getCode();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_city = self::trimField($_REQUEST['supervisor_city']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method begin
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::begin();
- Create a ticketCreate a ticket
- Exclude checks
Call to method simple
from undeclared class \NQ
Open
\NQ::simple('intern', \Intern\UI\NotifyUI::ERROR, $errorMessage);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->host_id = $_REQUEST['main_host'];
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->phone = self::trimField($_REQUEST['student_phone']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getDescription
on non-class type null
Open
$i->major_description = $majors[0]->getDescription();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_zip = $_REQUEST['supervisor_zip'];
- Create a ticketCreate a ticket
- Exclude checks
Call to method reroute
from undeclared class \PHPWS_Core
Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Create a ticketCreate a ticket
- Exclude checks
Call to method close
from undeclared class \NQ
Open
\NQ::close();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$avg_hours_week = (int) $_REQUEST['avg_hours_week'];
- Create a ticketCreate a ticket
- Exclude checks
Call to method reroute
from undeclared class \PHPWS_Core
Open
return \PHPWS_Core::reroute($url);
- Create a ticketCreate a ticket
- Exclude checks
Call to method rollback
from undeclared class \PHPWS_DB
Open
\PHPWS_DB::rollback();
- Create a ticketCreate a ticket
- Exclude checks
Call to method simple
from undeclared class \NQ
Open
\NQ::simple('intern', \Intern\UI\NotifyUI::WARNING, "We couldn't find a matching student in Banner. Your changes were saved, but this student probably needs to contact the Registrar's Office to re-enroll.");
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->pay_rate = self::trimField($_REQUEST['pay_rate']);
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$supervisor->supervisor_province = self::trimField($_REQUEST['supervisor_province']);
- Create a ticketCreate a ticket
- Exclude checks
Call to method close
from undeclared class \NQ
Open
\NQ::close();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to nullable ?array
Open
$i->department_id = $_REQUEST['department'];
- Create a ticketCreate a ticket
- Exclude checks
Call to method getCode
on non-class type null
Open
$i->major_code = $majors[0]->getCode();
- Create a ticketCreate a ticket
- Exclude checks
Call to method close
from undeclared class \NQ
Open
\NQ::close();
- Create a ticketCreate a ticket
- Exclude checks
Suspicious type null
of a variable or expression used to build a string. (Expected type to be able to cast to a string) Open
return \PHPWS_Core::reroute('index.php?module=intern&action=ShowInternship&internship_id=' . $i->id);
- Create a ticketCreate a ticket
- Exclude checks
Avoid variables with short names like $t. Configured minimum length is 3. Open
$t = \Intern\WorkflowTransitionFactory::getTransitionByName($_POST['workflow_action']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $ch. Configured minimum length is 3. Open
$ch = new ChangeHistory($i, \Current_User::getUserObj(), time(),
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $i. Configured minimum length is 3. Open
$i = \Intern\InternshipFactory::getInternshipById($_REQUEST['internship_id']);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The variable $avg_hours_week is not named in camelCase. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $avg_hours_week is not named in camelCase. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $avg_hours_week is not named in camelCase. Open
public function execute() {
// We don't want to do certain things like state change or error checks if this is an ajax request.
$isAjax = false;
if(\Canopy\Request::isAjax()){
$isAjax = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}