Function save_event
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
static function save_event($postmortem, $conn = null) {
$values = array("title");
try {
if (isset($postmortem["id"])) {
- 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 save_event
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
static function save_event($postmortem, $conn = null) {
$values = array("title");
try {
if (isset($postmortem["id"])) {
File Persistence.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
require_once "Configuration.php";
/**
Function get_array
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
if (!$where) {
$where = array();
}
- 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 get_array
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
if (!$where) {
$where = array();
}
Method range_query
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
static function range_query($columns, $table_name, $where = array(), $conn = null) {
$get_sql = 'SELECT ' . implode(',', $columns) . ' FROM ' . $table_name;
$placeholders = array();
$placeholder_values = array();
Function store_array
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static function store_array($table_name, $assoc_column, $values, $postmortem_id, $conn) {
try {
foreach ($values as $value) {
$select_sql = 'SELECT postmortem_id, id, deleted ' .
' FROM ' . $table_name .
- 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 store_array
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
static function store_array($table_name, $assoc_column, $values, $postmortem_id, $conn) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
try {
$ret = array();
$stmt = $conn->prepare($get_sql);
$stmt->execute($placeholder_values);
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
- 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 118.
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 2 locations. Consider refactoring. Open
try {
$ret = array();
$stmt = $conn->prepare($get_sql);
$stmt->execute($where);
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
- 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 118.
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 2 locations. Consider refactoring. Open
static function flag_as_undeleted($table_name, $pk_column, $pk, $conn) {
try {
$sql = "UPDATE $table_name SET deleted=0 WHERE $pk_column = :id";
$stmt = $conn->prepare($sql);
$stmt->execute(array('id' => $pk));
- 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 103.
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 2 locations. Consider refactoring. Open
static function flag_as_deleted($table_name, $pk_column, $pk, $conn) {
try {
$sql = "UPDATE $table_name SET deleted=1 WHERE $pk_column = :id";
$stmt = $conn->prepare($sql);
$stmt->execute(array('id' => $pk));
- 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 103.
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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Persistence {
- Exclude checks
Method name "Persistence::save_event" is not in camel caps format Open
static function save_event($postmortem, $conn = null) {
- Exclude checks
Visibility must be declared on method "save_forum" Open
static function save_forum($forum, $conn = null) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class Persistence {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['gcal']) ) {
- Exclude checks
Method name "Persistence::store_array" is not in camel caps format Open
static function store_array($table_name, $assoc_column, $values, $postmortem_id, $conn) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['owner_team'] ) ){
- Exclude checks
Visibility must be declared on method "flag_as_deleted" Open
static function flag_as_deleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Method name "Persistence::flag_as_undeleted" is not in camel caps format Open
static function flag_as_undeleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Visibility must be declared on method "save_event" Open
static function save_event($postmortem, $conn = null) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['problem_type'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['incident_cause'] ) ){
- Exclude checks
The closing brace for the class must go on the next line after the body Open
}
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['detecttime']) ) {
- Exclude checks
Visibility must be declared on method "get_association_by_id" Open
static function get_association_by_id($columns, $table_name, $pk, $conn) {
- Exclude checks
Method name "Persistence::flag_as_deleted" is not in camel caps format Open
static function flag_as_deleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
array_walk($where, function($value, $column) use (&$placeholders) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['tldr']) ) {
- Exclude checks
Method name "Persistence::save_forum" is not in camel caps format Open
static function save_forum($forum, $conn = null) {
- Exclude checks
Visibility must be declared on method "get_array" Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
- Exclude checks
Visibility must be declared on method "flag_as_undeleted" Open
static function flag_as_undeleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['facilitator'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['impact_type'] ) ){
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
array_walk($where, function($value, $col) use (&$placeholders, &$placeholder_values) {
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Method name "Persistence::get_array" is not in camel caps format Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['why_surprised']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['severity']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['statustime'] ) ){
- Exclude checks
Method name "Persistence::range_query" is not in camel caps format Open
static function range_query($columns, $table_name, $where = array(), $conn = null) {
- Exclude checks
Visibility must be declared on method "range_query" Open
static function range_query($columns, $table_name, $where = array(), $conn = null) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['starttime']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['subsystem'] ) ){
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Method name "Persistence::get_association_by_id" is not in camel caps format Open
static function get_association_by_id($columns, $table_name, $pk, $conn) {
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Visibility must be declared on method "get_database_object" Open
static function get_database_object() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['created'] ) ){
- Exclude checks
Terminating statement must be indented to the same level as the CASE body Open
break;
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['summary']) ) {
- Exclude checks
Method name "Persistence::get_database_object" is not in camel caps format Open
static function get_database_object() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['meeting_notes_link'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if( isset($postmortem['endtime']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset($postmortem['contact']) ) {
- Exclude checks
Blank line found at end of control structure Open
- Exclude checks
Method name "Persistence::get_postmortem" is not in camel caps format Open
static function get_postmortem($postmortem_id, $conn = null) {
- Exclude checks
Visibility must be declared on method "get_postmortem" Open
static function get_postmortem($postmortem_id, $conn = null) {
- Exclude checks
Visibility must be declared on method "store_array" Open
static function store_array($table_name, $assoc_column, $values, $postmortem_id, $conn) {
- Exclude checks
Arguments with default values must be at the end of the argument list Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
- Exclude checks
Opening brace should be on a new line Open
static function save_event($postmortem, $conn = null) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['summary']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"summary");
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['tldr']) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['statustime'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['facilitator'] ) ){
- Exclude checks
Closing brace indented incorrectly; expected 11 spaces, found 12 Open
}
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case "=": // not actually a range query
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case "BETWEEN":
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['problem_type'] ) ){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['subsystem'] ) ){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['impact_type'] ) ){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case "!=": // not actually a range query but not supported by get_array
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case ">=":
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$placeholder_values[$max_ph] = $value->max_value;
- Exclude checks
No space found after comma in function call Open
array_push($values,"detecttime");
- Exclude checks
No space found after comma in function call Open
array_push($values,"contact");
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['subsystem'] ) ){
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$placeholders[] = sprintf('%s = :%s', $col, $col);
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['why_surprised']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"severity");
- Exclude checks
Opening brace should be on a new line Open
static function flag_as_undeleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['summary']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"why_surprised");
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['created'] ) ){
- Exclude checks
Opening brace should be on a new line Open
static function get_postmortem($postmortem_id, $conn = null) {
- Exclude checks
Opening brace should be on a new line Open
static function get_array($columns, $where = array(), $table_name, $conn = null) {
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case "<":
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['meeting_notes_link'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['starttime']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"starttime");
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['facilitator'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['owner_team'] ) ){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['detecttime']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"gcal");
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset($postmortem['contact']) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['subsystem'] ) ){
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['incident_cause'] ) ){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['incident_cause'] ) ){
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$placeholder_values[$min_ph] = $value->min_value;
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
default:
- Exclude checks
Opening brace should be on a new line Open
static function get_association_by_id($columns, $table_name, $pk, $conn) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['tldr']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['incident_cause'] ) ){
- Exclude checks
Whitespace found at end of line Open
&& array_key_exists('client_cert', $config['database'])
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['meeting_notes_link'] ) ){
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['facilitator'] ) ){
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 11 Open
if (!array_key_exists("id", $postmortem)) {
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$min_ph = 'min_' . $col;
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['gcal']) ) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['statustime'] ) ){
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['created'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['incident_cause'] ) ){
- Exclude checks
Whitespace found at end of line Open
if(array_key_exists('client_key', $config['database'])
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['endtime']) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['problem_type'] ) ){
- Exclude checks
Opening brace should be on a new line Open
static function save_forum($forum, $conn = null) {
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$max_ph = 'max_' . $col;
- Exclude checks
Opening brace should be on a new line Open
static function flag_as_deleted($table_name, $pk_column, $pk, $conn) {
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['why_surprised']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['meeting_notes_link'] ) ){
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['starttime']) ) {
- Exclude checks
No space found after comma in function call Open
array_push($values,"endtime");
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['gcal']) ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['statustime'] ) ){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case ">":
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$placeholder_values[$col] = $value->value;
- Exclude checks
Expected 1 newline at end of file; 0 found Open
}
- Exclude checks
No space found after comma in function call Open
array_push($values,"tldr");
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['meeting_notes_link'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['detecttime']) ) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if( isset($postmortem['severity']) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['severity']) ) {
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['problem_type'] ) ){
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['impact_type'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['impact_type'] ) ){
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Opening brace should be on a new line Open
static function range_query($columns, $table_name, $where = array(), $conn = null) {
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Opening brace should be on a new line Open
static function get_database_object() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['statustime'] ) ){
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 16 Open
case "<=":
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 20 Open
$placeholders[] = sprintf('%s BETWEEN :%s AND :%s', $col, $min_ph, $max_ph);
- Exclude checks
No space found after comma in function call Open
array_push($values,"statustime");
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['owner_team'] ) ){
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(array_key_exists('client_key', $config['database'])
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if( isset($postmortem['endtime']) ) {
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['created'] ) ){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['created'] ) ){
- Exclude checks
Expected 1 space after closing parenthesis; found 0 Open
if ( isset( $postmortem['facilitator'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['problem_type'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['subsystem'] ) ){
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $postmortem['owner_team'] ) ){
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $postmortem['owner_team'] ) ){
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $postmortem['impact_type'] ) ){
- Exclude checks
Opening brace should be on a new line Open
static function store_array($table_name, $assoc_column, $values, $postmortem_id, $conn) {
- Exclude checks
Expected 1 space after CATCH keyword; 0 found Open
} catch(PDOException $e) {
- Exclude checks