Add missing docblocks and return types.
This commit is contained in:
@ -19,11 +19,23 @@
|
||||
namespace Libs;
|
||||
|
||||
class Neuron {
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*
|
||||
* @param object|array $data
|
||||
*/
|
||||
public function __construct(array|object $data = []) {
|
||||
foreach($data as $key => $value)
|
||||
$this->{$key} = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* __get
|
||||
*
|
||||
* @param string $index
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get(string $index) {
|
||||
return (isset($this->{$index}) &&
|
||||
$this->{$index} != '') ? $this->{$index} : null;
|
||||
|
Reference in New Issue
Block a user