Skip to content

PHPDoc blocks #32

Description

@Raruto

Hi Raffael,

whenever possible prefer PHP docblocks over inline comments, for example, at the following line:

// modified version of Lime\fetch_from_array()
'get' => function($index, $default = null) {
if (\is_null($index)) {
return null;
} elseif (isset($this->$index)) {
return $this->$index;
} elseif (\strpos($index, '/')) {
$keys = \explode('/', $index);
switch (\count($keys)){
case 1:
if (isset($this->{$keys[0]})){
return $this->{$keys[0]};
}
break;
case 2:
if (isset($this->{$keys[0]}[$keys[1]])){
return $this->{$keys[0]}[$keys[1]];
}
break;
case 3:
if (isset($this->{$keys[0]}[$keys[1]][$keys[2]])){
return $this->{$keys[0]}[$keys[1]][$keys[2]];
}
break;
case 4:
if (isset($this->{$keys[0]}[$keys[1]][$keys[2]][$keys[3]])){
return $this->{$keys[0]}[$keys[1]][$keys[2]][$keys[3]];
}
break;
}
}
return \is_callable($default) ? \call_user_func($default) : $default;
}, // end of get()

I use this atom plugin to make writing easier, you can try to check if this kate plugin it still working.

Happy holidays,
Raruto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions