Showing 127 of 140 total issues
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(BackendSingletonContainer $container, PageOrderImpl $pageOrder, $id, $title, $template, $alias, $lastModified, $hidden)
- Create a ticketCreate a ticket
Method sendMail
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function sendMail($from, $to, $subject, $message, $cc, $bcc, $additionalHeaders = array())
- Create a ticketCreate a ticket
Method sendMail
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function sendMail($from,$to, $subject, $message,$cc,$bcc,$additionalHeaders= array());
- Create a ticketCreate a ticket
Function uploadImageFile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function uploadImageFile()
{
return function (FileLibrary $library, array $fileArray, array $sizes) {
//TODO test
$file = $library->uploadToLibrary($this->container->getUserLibraryInstance()->getUserLoggedIn(), $fileArray);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function expectFunctionChain
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function expectFunctionChain()
{
if ($this->look_ahead == Lexer::T_DOT) {
$this->match(Lexer::T_DOT);
$name = $this->expectName();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function expectArrayEntry
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function expectArrayEntry()
{
switch ($this->look_ahead) {
case Lexer::T_NAME:
case Lexer::T_NAME_NOT_STARTING_WITH_UNDERSCORE:
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createPageInstance
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function createPageInstance($id, $title, $template, $alias, $lastMod, $hidden)
- Create a ticketCreate a ticket
Function relativeToAbsolute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function relativeToAbsolute($file,$currentWorkingDir = null)
{
if($currentWorkingDir == null){
$currentWorkingDir = getcwd();
}
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method crop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function crop($x, $y, $width, $height, $saveAsNewFile = false);
- Create a ticketCreate a ticket
Method crop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function crop($x, $y, $width, $height, $saveAsNewFile = false)
- Create a ticketCreate a ticket
Method createPage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createPage($id, $title='', $template = '', $alias = '', $hidden = false);
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(BackendSingletonContainer $container, $id,$title,$template,$alias = null)
- Create a ticketCreate a ticket
Method crop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function crop($x, $y, $width, $height, $saveAsNewFile = false)
- Create a ticketCreate a ticket
Method createPage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createPage($id, $title = '', $template = '', $alias = '', $hidden = false)
- Create a ticketCreate a ticket
Function clean
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function clean()
{
foreach($this->listFolder() as $f){
if($f instanceof Folder){
$f->delete(Folder::DELETE_FOLDER_RECURSIVE);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function wrapperHandler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function wrapperHandler($input, $token)
{
if (!$this->container->getUserLibraryInstance()->verifyUserSessionToken($token)) {
return new ResponseImpl(Response::RESPONSE_TYPE_ERROR, Response::ERROR_CODE_UNAUTHORIZED);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function listFunctions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function listFunctions($type)
{
if (!$this->hasType($type)) {
return array();
}
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function listTemplateFolders
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function listTemplateFolders()
{
$this->setUpTemplate();
$result = [];
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function recursiveCalculatePath
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function recursiveCalculatePath(Page $page, Page $parent = null)
{
$order = $this->getPageOrder($parent);
foreach ($order as $p) {
/** @var $p Page */
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updatePageOrderId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function updatePageOrderId($oldId, $newId)
{
if (isset($this->pageOrder[$oldId])) {
$this->pageOrder[$newId] = $this->pageOrder[$oldId];
unset($this->pageOrder[$oldId]);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"