@param array $data

@return \BrowserDetector\Version\VersionInterface
764043
public static function fromArray(array $data): VersionInterface
    {
        $major      = array_key_exists('major', $data) ? $data['major'] : '0';
        $minor      = array_key_exists('minor', $data) ? $data['minor'] : '0';
        $micro      = array_key_exists('micro', $data) ? $data['micro'] : '0';
        $patch      = array_key_exists('patch', $data) ? $data['patch'] : '0';
        $micropatch = array_key_exists('micropatch', $data) ? $data['micropatch'] : '0';
        $stability  = array_key_exists('stability', $data) ? $data['stability'] : 'stable';
        $build      = array_key_exists('build', $data) ? $data['build'] : null;

        return new Version($major, $minor, $micro, $patch, $micropatch, $stability, $build);
    }
1190666
public static function fromArray(array $data)
    {
        $tools = [
            isset($data['composer']) ? ComposerFactory::fromArray($data['composer']) : ComposerFactory::setUndefined(),
            isset($data['jsonlint']) ? JsonLintFactory::fromArray($data['jsonlint']) : JsonLintFactory::setUndefined(),
            isset($data['phplint']) ? PhpLintFactory::fromArray($data['phplint']) : PhpLintFactory::setUndefined(),
            isset($data['phpmd']) ? PhpMdFactory::fromArray($data['phpmd']) : PhpMdFactory::setUndefined(),
            isset($data['phpcs']) ? PhpCsFactory::fromArray($data['phpcs']) : PhpCsFactory::setUndefined(),
            isset($data['php-cs-fixer']) ? PhpCsFixerFactory::fromArray($data['php-cs-fixer']) :
                PhpCsFixerFactory::setUndefined(),
            isset($data['phpunit']) ? PhpUnitFactory::fromArray($data['phpunit']) : PhpUnitFactory::setUndefined(),
            isset($data['phpunit']['strict-coverage']) ? PhpUnitStrictCoverageFactory::fromArray(
                $data['phpunit']['strict-coverage']
            ) : PhpUnitStrictCoverageFactory::setUndefined(),
            isset($data['phpunit']['guard-coverage']) ? PhpUnitGuardCoverageFactory::build(
                $data['phpunit']['guard-coverage']
            ) : PhpUnitGuardCoverageFactory::setUndefined(),
        ];

        return new Execute($tools);
    }
1352436
public function setData(array $data)
    {
        $keys = $this->validDataFromRequest();
        $data = array_intersect_key($data, array_flip($keys));
        $this->mergeData($data);

        return $this;
    }
828609
final public function sanitize($data)
    {
        if ($this->_walk && (is_array($data) || is_object($data))) {
            $arr = (array)$data;

            foreach ($arr as $key => $value) {
                if (is_array($data)) {
                    $data[$key] = $this->sanitize($value);
                }

                if (is_object($data)) {
                    $data->$key = $this->sanitize($value);
                }
            }
        } else {
            $context = $this->_chain->getContext();
            $context->data = $data;

            $data = $this->_chain->run('sanitize', $context);
        }

        return $data;
    }
414629
public function update(array $data)
    {
        $todo = Basecamp::todos($this->bucket->id)->update($this->id, $data);

        $this->setAttributes($todo);

        return $todo;
    }
310345
public function update(array $data)
    {
        $this->attributes = new Collection(array_merge($this->attributes->toArray(), $data));

        return $this->save();
    }
855609
public function update($data)
    {
        $response = $this->api->put($this->url(), $data);
        $this->data = (array) $response->data;

        return $this;
    }
646519
public function create(array $data)
    {
        $response = $this->ontraport->post(
            $this->getNamespace(), $this->toArray($data)
        );

        return $this->ontraport->item($this, $response);
    }
570244
public function withInput(array $data = [])
    {
        if (count($data) == 0) {
            $this->request->session()->add('__bow.old', $this->request->all());
        } else {
            $this->request->session()->add('__bow.old', $data);
        }

        return $this;
    }
1028204
public function fromArray(array $data)
  {
    $this->setBrowserName($data['browser_name']);
    $this->setBrowserVersion($data['browser_version']);
    $this->setOperatingSystem($data['operating_system']);
    $this->setEngine($data['engine']);
  }
956281
public static function fromArray(array $data)
    {
        $config = isset($data['config']) ? $data['config'] : [];

        return new static($data['name'], $data['pluralName'], $data['uri'], $config);
    }
375739
public function jobCheckNewVersion($data)
    {
        $config = $this->getConfig();

        if (!$config->get('adminNotifications') || !$config->get('adminNotificationsNewVersion')) {
            return true;
        }

        $latestRelease = $this->getLatestRelease();
        if (empty($latestRelease['version'])) {
            $config->set('latestVersion', $latestRelease['version']);
            $config->save();
            return true;
        }

        if ($config->get('latestVersion') != $latestRelease['version']) {
            $config->set('latestVersion', $latestRelease['version']);

            if (!empty($latestRelease['notes'])) {
                //todo: create notification
            }

            $config->save();
            return true;
        }

        if (!empty($latestRelease['notes'])) {
            //todo: find and modify notification
        }

        return true;
    }
539889
protected function validate(array &$data)
    {
        $this->validateVersion();
        $this->validateExtensions();
        $this->validateIni();
        $data = array_merge($data, ['messages' => $this->messages]);
        return $data;
    }
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'] : '')
        );
    }
761971
public function merge(array $data)
    {
        user_error(__CLASS__ . '::' . __FUNCTION__ . '() is deprecated since Grav 1.6, use ->update($data) method instead', E_USER_DEPRECATED);

        $this->setElements($this->getBlueprint()->mergeData($this->toArray(), $data));

        return $this;
    }
298166
public function create(array $data = array())
    {
        if (!isset($data["configPathPrefix"])) {
            $data["configPathPrefix"] = $this->configPathPrefix;
        }
        return $this->_objectManager->create($this->_instanceName, $data);
    }
18347
public static function deserializeObject(array $data)
    {
        return new static(
            $data['type'],
            $data['name'],
            $data['description'],
            isset($data['specUri']) ? $data['specUri'] : null,
            isset($data['documentationUri']) ? $data['documentationUri'] : null
        );
    }