remove accesses the super-global variable $_SESSION. Open
function remove($detail, $occurrence){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "DELETE FROM service_attendance WHERE detail_id = $detail AND user_id = $id AND processed = 0";
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
register accesses the super-global variable $_SESSION. Open
function register($detail,$occurrence){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT length FROM service_details WHERE detail_id = $detail";
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
displayListing accesses the super-global variable $_SESSION. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
displayListing accesses the super-global variable $_SERVER. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Function displayListing
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
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 displayListing
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
File service_signup.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once ('session.php');
require_once ('mysql_access.php');
?>
<!doctype html>
Function option
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function option($occurrence_id, $driveCount){
include('mysql_access.php');
$return = "";
for($u = 0; $u <= 6; $u++){
if($u==$driveCount){
- Read upRead up
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
The function displayListing() has an NPath complexity of 69126. The configured NPath complexity threshold is 200. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 function displayListing() has 247 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Exclude checks
The function displayListing() has a Cyclomatic Complexity of 22. The configured cyclomatic complexity threshold is 10. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$resultPLData = $db->query($sqlPLData);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$resultUserData = $db->query($sqlUserData);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$resultO = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result2 = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$resultUserData = $db->query($sqlUserData);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result2 = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$resultPLData = $db->query($sqlPLData);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$db' which will lead to PHP notices. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The method displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$m = 2;
$message = "<a href=\"service_signup.php?r=$detail_id&o=$occurrence_id\" class=\"button expand\">Remove</a>";
//$message;
}
- Read upRead up
- 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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$start = substr($start,0,-3)."am";
}
- Read upRead up
- 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 option uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$s = "";
}
- Read upRead up
- 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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$v = 1;
while($r = mysqli_fetch_array($resultO)){
//$user_id = $r['id'];
$detail_id = $r['detail_id'];
- Read upRead up
- 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 remove uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
refresh($occurrence);
}
- Read upRead up
- 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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Read upRead up
- 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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$message = "<a href=\"#\" class=\"button alert expand\" onclick=\"return false;\">Full</a>";
$drive = "";
}
- Read upRead up
- 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 register uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
refresh($occurrence);
}
- Read upRead up
- 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 displayListing uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
}else{
$end = substr($end,0,-3)."am";
}
- Read upRead up
- 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 unused parameters such as '$occurrence_id'. Open
function option($occurrence_id, $driveCount){
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused local variables such as '$lastname'. Open
$lastname = $r['lastname'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$firstname'. Open
$firstname = $r['firstname'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$db'. Open
$result = $db->query($sql);
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$event_id'. Open
$event_id = $r['event_id'];
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The function displayListing() contains an exit expression. Open
die("error 0");
- Read upRead up
- 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
Similar blocks of code found in 6 locations. Consider refactoring. Open
if($end > 12){
$endstr = substr($end, 0,2);
$endstr -= 12;
$end = $endstr.substr($end,2,-3)."pm";
}else{
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
if($start > 12){
$startstr = substr($start, 0,2);
$startstr -= 12;
$start = $startstr.substr($start,2,-3)."pm";
}else{
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 95.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 43 and the first side effect is on line 20. Open
<?php
- Exclude checks
Avoid variables with short names like $id. Configured minimum length is 3. Open
$id = $_SESSION['sessionID'];
- Read upRead up
- 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 parameter $occurrence_id is not named in camelCase. Open
function option($occurrence_id, $driveCount){
include('mysql_access.php');
$return = "";
for($u = 0; $u <= 6; $u++){
if($u==$driveCount){
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $ph. Configured minimum length is 3. Open
$ph = $rw['phone'];
- Read upRead up
- 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 $dr. Configured minimum length is 3. Open
$dr = $rw['drive'];
- Read upRead up
- 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 $v. Configured minimum length is 3. Open
$v = 1;
- Read upRead up
- 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 $r2. Configured minimum length is 3. Open
while($r2 = mysqli_fetch_array($result2)){
- Read upRead up
- 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 $fn. Configured minimum length is 3. Open
$fn = $rw['firstname'];
- Read upRead up
- 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 $rw. Configured minimum length is 3. Open
while($rw = mysqli_fetch_array($resultUserData)){
- Read upRead up
- 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 $id. Configured minimum length is 3. Open
$id = $_SESSION['sessionID'];
- Read upRead up
- 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 $r. Configured minimum length is 3. Open
while($r = mysqli_fetch_array($result)){
- Read upRead up
- 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 $r. Configured minimum length is 3. Open
while($r = mysqli_fetch_array($result)){
- Read upRead up
- 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 $s. Configured minimum length is 3. Open
$s = "selected=\"selected\"";
- Read upRead up
- 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 $id. Configured minimum length is 3. Open
$id = $_SESSION['sessionID'];
- Read upRead up
- 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 $m. Configured minimum length is 3. Open
$m = 1;
- Read upRead up
- 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 $ln. Configured minimum length is 3. Open
$ln = $rw['lastname'];
- Read upRead up
- 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
File contains UTF-8 byte order mark, which may corrupt your application Open
<?php
- Exclude checks
Blank line found at start of control structure Open
}else{
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Function closing brace must go on the next line following the body; found 1 blank lines before brace Open
}
- Exclude checks
Each PHP statement must be on a line by itself Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
echo "<div class=\"row\"><div class=\"small-12 columns\"><p>You need to login before you can see this page.</p></div></div>";
- Exclude checks
Line exceeds 120 characters; contains 165 characters Open
//echo "<tr class=\"displayListing2\"><td>event name</td><td>date</td><td></td><td>start</td><td>end</td><td>current</td><td>limit</td><td>hours</td><td></td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
echo "<div class=\"small-2 columns\">$DOW</div><div class=\"small-2 columns\">$theDate</div><div class=\"small-2 columns\">$start</div><div class=\"small-4 columns end\">$name</div>";
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$message = "<a href=\"service_signup.php?d=$detail_id&o=$occurrence_id\" class=\"button expand success\">Sign up</a>";
- Exclude checks
Line exceeds 120 characters; contains 146 characters Open
$sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND user_id = $id AND occurrence_id = $occurrence_id";
- Exclude checks
Line exceeds 120 characters; contains 183 characters Open
//echo "<tr class=\"trNEW\"><td>$name</td><td>$DOW</td><td>$theDate</td><td>$start</td><td>$end</td><td>$count</td><td>$max</td><td>$length $v $ma</td><td>{$message}</td></tr>";
- Exclude checks
Line exceeds 120 characters; contains 215 characters Open
$sqlUserData = "SELECT s.*, c.firstname, c.lastname, phone FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line exceeds 120 characters; contains 208 characters Open
$sqlUserData = "SELECT s.*, c.firstname, c.lastname FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line exceeds 120 characters; contains 365 characters Open
echo "<div class=\"row\"><div class=\"small-4 columns\"><b>Date</b><br>$DOW<br>$theDate</div><div class=\"small-2 columns\"><b>Start</b><br>$start</div><div class=\"small-2 columns\"><b>End</b><br>$end</div><div class=\"small-2 columns text-center\"><b>Hours</b><br>$length $v</div><div class=\"small-2 columns text-center\"><b>Spots</b><br>$max</div></div>";
- Exclude checks
Line exceeds 120 characters; contains 274 characters Open
$sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line exceeds 120 characters; contains 274 characters Open
$sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
echo "<div class=\"row\"><div class=\"small-12 columns\"><p>You need to login before you can see this page.</p></div></div>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
if($datew == 6 && $dateG >= 13){//Friday
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($count > 0){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
require_once('service_hours_logger.php');
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($datew == 6 && $dateG >= 13){//Friday
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
function refresh($occurrence){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$sql = "UPDATE service_occurrence SET active = 0 WHERE theDate < DATE(NOW())";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$dateG = date('G');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$result = $db->query($sql2);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$id = $_SESSION['sessionID'];
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($datew == 6 && $dateG >= 13){//Friday
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$result = $db->query($sql);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$count = $r['count'];
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$sql2 = "UPDATE service_occurrence SET active = 2 WHERE active = 4";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$datew = date('w');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
if($count > 0){
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$result = $db->query($sql);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$sql = "UPDATE service_occurrence SET active = 1 WHERE active = 3";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$result = $db->query($sql);
- Exclude checks
Space before opening parenthesis of function call prohibited Open
require_once ('mysql_access.php');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
function register($detail,$occurrence){
- Exclude checks
Opening brace should be on a new line Open
function register($detail,$occurrence){
- Exclude checks
Opening brace should be on a new line Open
function remove($detail, $occurrence){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
echo(mysqli_error());
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
include('mysql_access.php');
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(mysqli_num_rows($result)!=0){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\">";
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
die("error 0");
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$v = 1;
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$start = $r['start'];
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$sql = "SELECT length FROM service_details WHERE detail_id = $detail";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$DOW = $r['DOW'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
$sql = "SELECT d.detail_id, d.event_id, d.DOW,
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$detail_id = $r['detail_id'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$DOW = $r['DOW'];
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
if(($count < $max)||($num_rows == 1)||($max==-1)){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
function remove($detail, $occurrence){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!$result){
- Exclude checks
Opening brace should be on a new line Open
function displayListing(){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$start = $r['start'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$theDate = $r['theDate'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
$resultO = $db->query($sql);
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!$resultO){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND occurrence_id = $occurrence_id";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$result2 = $db->query($sql);
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r2 = mysqli_fetch_array($result2)){
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$m = 2;
- Exclude checks
Space before opening parenthesis of function call prohibited Open
require_once ('session.php');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 0 Open
$sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE processed = 1";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($count > 0){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
if(!$result){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
echo("something went wrong".mysqli_error()."<br/>".$sql."<br/>Perhaps someone else signed up for the event.");
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
refresh($occurrence);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
if(!$result){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
$return .= "<option value=$u $s>$u</option>";
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 0 Open
echo "<div class=\"row\">";
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 0 Open
echo "<h2>Currently Attending:</h2>";
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 0 Open
echo "</div></div>";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(!$resultO){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$result2 = $db->query($sql);
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}else{
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 0 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$firstname = $r['firstname'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$end = $r['end'];
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($num_rows == 0){
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
echo("<meta http-equiv=\"REFRESH\" content=\"0;url=service_signup.php#$occurrence\">");
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$id = $_SESSION['sessionID'];
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$length = $r['length'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$result = $db->query($sql);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
for($u = 0; $u <= 6; $u++){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$name = $r['name'];
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 0 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$theDate = date('M-d', strtotime($theDate));
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$num_rows = $r2['count'];
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($num_rows == 0){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$sql = "INSERT INTO service_attendance (detail_id, user_id, occurrence_id, length)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$id = $_SESSION['sessionID'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$result = $db->query($sql);
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(!$result){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($u==$driveCount){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
$id = $_SESSION['sessionID'];
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(mysqli_num_rows($result)!=0){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r = mysqli_fetch_array($result2)){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
refresh($occurrence);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 10 Open
for($u = 0; $u <= 6; $u++){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 14 Open
$s = "";
- Exclude checks
Closing brace indented incorrectly; expected 0 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
function displayListing(){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 0 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"small-2 columns\">$DOW</div><div class=\"small-2 columns\">$theDate</div><div class=\"small-2 columns\">$start</div><div class=\"small-4 columns end\">$name</div>";
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r = mysqli_fetch_array($resultO)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$length = $r['length'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sql = "SELECT COUNT(*) AS count FROM service_attendance WHERE detail_id = $detail_id AND user_id = $id AND occurrence_id = $occurrence_id";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($r2 = mysqli_fetch_array($result2)){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
if($num_rows == 0){
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
include('mysql_access.php');
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(!$result){
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Opening brace should be on a new line Open
function option($occurrence_id, $driveCount){
- Exclude checks
Closing brace indented incorrectly; expected 10 spaces, found 8 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$end = $r['end'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$length = $r['length'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$max = $r['max'];
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($r = mysqli_fetch_array($result2)){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(($count < $max)||($num_rows == 1)||($max==-1)){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
}
- Exclude checks
Opening brace should be on a new line Open
function refresh($occurrence){
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
function option($occurrence_id, $driveCount){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 14 Open
$s = "selected=\"selected\"";
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 0 Open
if(mysqli_num_rows($result)!=0){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$count = $r['count'];
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(($count < $max)||($num_rows == 1)||($max==-1)){
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$message = "<a href=\"service_signup.php?r=$detail_id&o=$occurrence_id\" class=\"button expand\">Remove</a>";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}else{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($u==$driveCount){
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$event_id = $r['event_id'];
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
while($r = mysqli_fetch_array($resultO)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$event_id = $r['event_id'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$lastname = $r['lastname'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$theDate = $r['theDate'];
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$m = 1;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!$result){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$sql = "DELETE FROM service_attendance WHERE detail_id = $detail AND user_id = $id AND processed = 0";
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 0 Open
echo "<div class=\"small-12 columns\">";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div>";
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r2 = mysqli_fetch_array($result2)){
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$message = "<a href=\"service_signup.php?d=$detail_id&o=$occurrence_id\" class=\"button expand success\">Sign up</a>";
- Exclude checks
Expected 1 space between comma and argument "$occurrence"; 0 found Open
function register($detail,$occurrence){
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}else{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after FOR keyword; 0 found Open
for($u = 0; $u <= 6; $u++){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
$result = $db->query($sql);
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r = mysqli_fetch_array($resultO)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$occurrence_id = $r['occurrence_id'];
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($r = mysqli_fetch_array($result2)){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
$result = $db->query($sql);
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($r = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
echo <<<END
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
if(!$resultO){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$name = $r['name'];
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
No space found after comma in function call Open
$endstr = substr($end, 0,2);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}else{
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($m!=2){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$lname = $row['lastname'];
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Closing brace must be on a line by itself Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div>";
- Exclude checks
Closing brace must be on a line by itself Open
if($ph == ""){ $ph = "- - - - - - - - -";}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(isset($_GET['d'])){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$message = "<a href=\"#\" class=\"button alert expand\" onclick=\"return false;\">Full</a>";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$drive = "";
- Exclude checks
No space found after comma in function call Open
$startstr = substr($start, 0,2);
- Exclude checks
No space found after comma in function call Open
$start = $startstr.substr($start,2,-3)."pm";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}else{
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($end > 12){
- Exclude checks
No space found after comma in function call Open
$end = substr($end,0,-3)."am";
- Exclude checks
No space found after comma in function call Open
$end = substr($end,0,-3)."am";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$drive = "";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$drive =
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"small-8 columns\">Project Leader: ";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"small-8 small-centered columns\">$drive</div></div>";
- Exclude checks
No space found after comma in function call Open
register($_GET['d'],$_GET['o']);
- Exclude checks
No space found after comma in function call Open
$start = substr($start,0,-3)."am";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"small-5 columns\">";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($ph == ""){ $ph = "- - - - - - - - -";}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
register($_GET['d'],$_GET['o']);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
No space found after comma in function call Open
$start = $startstr.substr($start,2,-3)."pm";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
if($m==2){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$drive = "";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$resultPLData = $db->query($sqlPLData);
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($m==2){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$optionC = option($occurrence_id, $driveCount);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div><div class=\"small-4 columns\">";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$fname = $row['firstname'];
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$lname = $row['lastname'];
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
if($start > 12){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$endstr = substr($end, 0,2);
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sql = "SELECT drive FROM service_attendance WHERE occurrence_id = $occurrence_id AND user_id = $id";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($v = mysqli_fetch_array($result)){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
echo "$phone";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$fn = $rw['firstname'];
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$ph = $rw['phone'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div>";
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($start > 12){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sqlUserData = "SELECT s.*, c.firstname, c.lastname FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$ln = $rw['lastname'];
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$fn = $rw['firstname'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div></div>";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$start = substr($start,0,-3)."am";
- Exclude checks
No space found after comma in function call Open
$start = substr($start,0,-3)."am";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 10 Open
$result = $db->query($sql);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 10 Open
while($v = mysqli_fetch_array($result)){
- Exclude checks
Closing brace indented incorrectly; expected 10 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
"<div class=\"row\">
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"small-12 columns\"><h2 id=\"$occurrence_id\">$name</h2></div></div>";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$phone = $row['phone'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$resultPLData = $db->query($sqlPLData);
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</div></div>";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
echo "$ph <br>";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "</li>";
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 0 Open
echo "</ul></div>";
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
if(isset($_GET['d'])){
- Exclude checks
Expected 1 space after ELSEIF keyword; 0 found Open
}elseif(isset($_GET['r'])){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
remove($_GET['r'],$_GET['o']);
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($start > 12){
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($m==2){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sqlUserData = "SELECT s.*, c.firstname, c.lastname, phone FROM service_attendance AS s JOIN contact_information AS c ON c.id = s.user_id WHERE occurrence_id = $occurrence_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_GET['d'])){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
}elseif(isset($_GET['r'])){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"small-12 columns\">";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"small-4 columns\"><b>Date</b><br>$DOW<br>$theDate</div><div class=\"small-2 columns\"><b>Start</b><br>$start</div><div class=\"small-2 columns\"><b>End</b><br>$end</div><div class=\"small-2 columns text-center\"><b>Hours</b><br>$length $v</div><div class=\"small-2 columns text-center\"><b>Spots</b><br>$max</div></div>";
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Newline required after opening brace Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$dr = $rw['drive'];
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}elseif(isset($_GET['r'])){
- Exclude checks
No space found after comma in function call Open
$end = $endstr.substr($end,2,-3)."pm";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 12 Open
$driveCount = $v['drive'];
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($end > 12){
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($v = mysqli_fetch_array($result)){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
if($m!=2){
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$start = $startstr.substr($start,2,-3)."pm";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
echo "$fname $lname";
- Exclude checks
Expected 1 space after WHILE keyword; 0 found Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Closing brace must be on a line by itself Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($rw = mysqli_fetch_array($resultUserData)){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($ph == ""){ $ph = "- - - - - - - - -";}
- Exclude checks
Newline required after opening brace Open
if($ph == ""){ $ph = "- - - - - - - - -";}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$m = 0;
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"medium-5 small-6 medium-offset-2 small-offset-1 columns\">";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$dr = $rw['drive'];
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
echo "$fn $ln {$dr}<br/>";
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
if($ph == ""){ $ph = "- - - - - - - - -";}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<div class=\"row\"><div class=\"small-12 columns\">{$message}</div></div>";
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$startstr = substr($start, 0,2);
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$endstr -= 12;
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$end = $endstr.substr($end,2,-3)."pm";
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($m!=2){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
while($row = mysqli_fetch_array($resultPLData)){
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$phone = $row['phone'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$resultUserData = $db->query($sqlUserData);
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$ln = $rw['lastname'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$optionC = "";
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
echo "<li>";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$startstr -= 12;
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
if($end > 12){
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$resultUserData = $db->query($sqlUserData);
- Exclude checks
No space found after comma in function call Open
$end = $endstr.substr($end,2,-3)."pm";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$end = substr($end,0,-3)."am";
- Exclude checks
Expected 1 space after closing brace; 0 found Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$sqlPLData = "SELECT d.detail_id, l.*, c.firstname, c.lastname, c.phone FROM service_details AS d JOIN service_leaders AS l ON l.detail_id = d.detail_id JOIN contact_information AS c ON c.id = l.user_id WHERE d.detail_id = $detail_id ORDER BY c.firstname, c.lastname";
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 8 Open
$fname = $row['firstname'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}elseif(isset($_GET['r'])){
- Exclude checks
Newline required after opening brace Open
if($dr > 0){$dr = "(".$dr.")";}else{ $dr = "";}
- Exclude checks
Expected 1 space after ELSE keyword; 0 found Open
}else{
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if(isset($_POST['Drive'])){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$driveNum = $_POST['driveCount'];
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$occ = $_POST['occ'];
- Exclude checks
Expected 1 space after closing brace; 0 found Open
}else{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(isset($_POST['Drive'])){
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 2 Open
displayListing();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
}else{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$sql = "UPDATE service_attendance SET drive = $driveNum WHERE occurrence_id = $occ AND user_id = $id";
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 2 Open
if(isset($_POST['Drive'])){
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$result = $db->query($sql);
- Exclude checks
No space found after comma in function call Open
remove($_GET['r'],$_GET['o']);
- Exclude checks
The variable $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $event_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $DOW is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $num_rows is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $DOW is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $DOW is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $num_rows is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $DOW is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $event_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $occurrence_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $num_rows is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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 $detail_id is not named in camelCase. Open
function displayListing(){
include('mysql_access.php');
$id = $_SESSION['sessionID'];
$sql = "SELECT d.event_id, d.DOW, d.start, d.end, d.length, e.name, o.theDate
FROM service_details AS d
- Read upRead up
- 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();
}
}