Add missing docblocks and return types.

This commit is contained in:
kj
2023-03-25 12:26:42 -04:00
parent 1bde430251
commit 3c8a21161f
4 changed files with 64 additions and 29 deletions

View File

@ -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;