create WxReceiveLocationEvent instance

@param array $data
@return WxReceiveLocationEvent
164608
protected function createLocationEvent(array $data)
    {
        $result = new WxReceiveLocationEvent();
        $this->initReceive($result, $data);

        $result->setLatitude($data['Latitude']);
        $result->setLongitude($data['Longitude']);
        $result->setPrecision($data['Precision']);

        return $result;
    }
686572
public function addDeviceGroup(array $data)
    {
        $url = "https://api.weixin.qq.com/shakearound/device/group/adddevice?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, $data);
    }
977036
public static function fromArray(array $data)
    {
        return new Messages(
            new Message(isset($data['right-message']) ? $data['right-message'] : ''),
            new Message(isset($data['error-message']) ? $data['error-message'] : '')
        );
    }
1284151
public function create(array $data)
    {
        $scene = '';
        if (func_num_args() === 2) {
            $scene = func_get_arg(1);
        }

        $this->setOriginal($data);

        $this->setData($this->guardResult($data, $scene));

        if ($this->fireEvent('creating', $data) === false) {
            return false;
        }

        $model = $this->driver->create($this->getData());

        $this->fireEvent('created', $model);

        return $model;
    }
637303
public static function fromArray(array $data)
    {
        return new PhpCs(
            new Undefined(false),
            new Enabled($data['enabled']),
            new PhpCsStandard($data['standard']),
            new Ignore(isset($data['ignore']) ? $data['ignore'] : '')
        );
    }
348303
public function create($data)
    {
        $methodDescriptor = new MethodDescriptor();
        $this->mapReflectorToDescriptor($data, $methodDescriptor);

        $this->assembleDocBlock($data->getDocBlock(), $methodDescriptor);
        $this->addArguments($data, $methodDescriptor);
        $this->addVariadicArgument($data, $methodDescriptor);

        return $methodDescriptor;
    }
472854
public function create(array $data): Poll
    {
        $poll = new Poll($data['id'], $this);
        $poll
            ->setType($data['type'])
            ->setTitle($data['title'])
            ->setState($data['state'])
            ->setMultiDay((bool)$data['multiDay'])
            ->setByInvitation((bool)$data['byInvitation'])
            ->setInviteesCount((int)$data['inviteesCount'])
            ->setParticipantsCount((int)$data['participantsCount'])
            ->setAskAddress((bool)$data['askAddress'])
            ->setAskEmail((bool)$data['askEmail'])
            ->setAskPhone((bool)$data['askPhone'])
            ->setAmINotified((bool)$data['amINotified'])
            ->setLastWriteAccess(new \DateTime($data['lastWriteAccess']));

        // Possible exception
        try {
            $lastActivity = new \DateTime($data['lastActivity']);
        } catch (\Exception $e) {
            $lastActivity = new \DateTime();
        }
        $poll->setLastActivity($lastActivity);

        // Optional, possibly missing, attributes
        if (!empty($data['adminKey'])) {
            $poll->setAdminKey($data['adminKey']);
        }
        if (!empty($data['rowConstraint'])) {
            $poll->setRowConstraint((bool)$data['rowConstraint']);
        }

        return $poll;
    }
84099
public static function switching(array $data)
    {
        return (new QuickStart(
            [
                new SwitchingMiddleware(),
                new CommandSwitcherMiddleware(),
                new DummyFallbackMiddleware(),
                new DumpLogMiddleware(true),
            ]
        ))
            ->addCommand(SomeCommand::class, true)
            ->addCommand(SwitchedCommand::class)
            ->setup(null, null, [], new Sender())
            ->handle(json_encode($data));
    }
457380
public static function fromArray(array $data)
    {
        return new PrePush(
            new Undefined(false),
            new Enabled($data['enabled']),
            PrePushExecuteFactory::fromArray($data['execute']),
            isset($data['message']) ? MessagesFactory::fromArray($data['message']) : MessagesFactory::setUndefined()
        );
    }
1336913
protected function storeNotificationInstance(array $data)
    {

        is_null($typeId = array_get($data, 'type_id')) ? $typeId = app(NotificationTypes::class)->where('name', array_get($data, 'type'))->first()->id : null;
        $model  = $this->model->getModel()->newInstance([
            'category_id' => array_get($data, 'category'),
            'type_id'     => $typeId,
            'active'      => array_get($data, 'active', 1),
            'severity_id' => NotificationSeverity::medium()->first()->id,
            'event'       => config('antares/notifications::default.custom_event')
        ]);
        $model->save();
        return $model;
    }
630573
public function create(array $data) {
        $this->_checkAcl('create');
        $pk = $this->_model->insert($data);
        return $pk;
    }
940958
public function create($data = [])
    {
        if (! $data) {
            $data = $this->data;
        } else {
            $this->populate($data);
        }

        $response = $this->client->post('', [], $data);

        if (!$response->hasErrors()) {
            $this->event->dispatch('SUBSCRIPTION.UPDATE', new SubscriptionsEvent($this->data));
        }

        return $this;
    }
928262
protected function createEntry(array $data)
    {
        return Entity\AccountNode::fromNode(parent::createEntry($data), $this->getConnection()->getConfiguration());
    }
1310274
public function createEvent(array $data)
    {
        $json = json_encode($data);

        return $this->sendRequest('POST', $this->eventUrl, $json);
    }
889175
public function setData(array $data): self
    {
        assert(count($data) == 2);

        [$allowedEvents, $subscribers] = $data;

        assert($this->checkAllSubscribersAreStatic($subscribers) === true);

        return $this->setAllowedEvents($allowedEvents)->setSubscribers($subscribers);
    }
1324019
public function addLocation($location, $data = null)
  {
    if(InUseLocation::isValid($location))
    {
      $this->locations[] = [$location, $data];
    }
    return $this;
  }
368371
private function createEventFromArray(array $data = []): Event
    {
        if (null === $this->serializer) {
            $this->serializer = new PhpArraySerializer();
        }

        /** @var Event $event */
        $event = $this->serializer->deserialize($data);
        return $event;
    }