Showing 12 of 18 total issues
File EdexmlTest.php
has 453 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
App::uses('Edexml', 'Edexml.Model');
class TestEdexml extends Edexml {
Method testConvertStudent
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConvertStudent() {
$data = [
'@key' => 'key',
'achternaam' => 'Achternaam',
'roepnaam' => 'Roepnaam',
Method testConvertTeacher
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConvertTeacher() {
$data = [
'@key' => 'key',
'achternaam' => 'Achternaam',
'roepnaam' => 'Roepnaam',
File Edexml.php
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
App::uses('AppModel', 'Model');
App::uses('Xml', 'Utility');
/**
Method testConvertSingleItemData
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function testConvertSingleItemData() {
$data = [
'EDEX' => [
'school' => [
'schooljaar' => '2012-2013',
Function convert
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function convert($data) {
$result = [];
$result['school'] = $this->_convertSchool($data['EDEX']['school']);
- 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 _convertStudent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _convertStudent($student) {
$result = [
'key' => null,
'date_of_birth' => null,
'gender' => null,
Function _convertStudent
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function _convertStudent($student) {
$result = [
'key' => null,
'date_of_birth' => null,
'gender' => null,
- 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 _convertTeacher
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _convertTeacher($teacher) {
$result = [
'key' => null,
'date_of_birth' => null,
'gender' => null,
Method convert
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function convert($data) {
$result = [];
$result['school'] = $this->_convertSchool($data['EDEX']['school']);
Function _convertTeacher
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function _convertTeacher($teacher) {
$result = [
'key' => null,
'date_of_birth' => null,
'gender' => null,
- 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
Function _convertNames
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function _convertNames($user) {
$result = [
'first_name' => '',
'last_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"