protected function isScalar($type) { return in_array($type, ['int', 'integer', 'float', 'string', 'bool', 'boolean']); }