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
Hi Raffael,
whenever possible prefer PHP docblocks over inline comments, for example, at the following line:
CpMultiplane/modules/Multiplane/bootstrap.php
Lines 196 to 241 in 20296db
I use this atom plugin to make writing easier, you can try to check if this kate plugin it still working.
Happy holidays,
Raruto