Bundles up some useful properties of the statistic for convenience.

@return array
3359
public function toArray()
    {
        $name = $this->name();

        $value = $this->computeValue();
        $delta = $this->computeDelta();

        return [
            'name' => $name,
            'key' => $this->key(),
            'granularity' => $this->granularity(),
            'prefix' => $this->prefix(),
            'suffix' => $this->suffix(),
            'hasChart' => $this->hasChart(),
            'span' => $this->span(),
            'value' => $value,
            'abbreviated_value' => (is_numeric($value)) ? U::number_abbreviate(round($value, 2), 1) : $value,
            'delta' => $delta,
            'abbreviated_delta' => (is_numeric($delta)) ? U::number_abbreviate(round($delta, 2), 1) : $delta,
        ];
    }
735583
public function toArray()
    {
        return [
            'id'          => $this->id,
            'module'      => $this->module,
            'bundle'      => $this->bundle,
            'position'    => $this->position,
            'name'        => $this->name,
            'description' => $this->description,
            'category'    => $this->category,
            'active'      => $this->active,
            'tags'        => $this->tags
        ];
    }
1010417
public function toArray(): array
    {
        return [
            'name'         => $this->package->getName(),
            'vendorName'   => $this->getVendorName(),
            'packageName'  => $this->getPackageName(),
            'version'      => $this->package->getVersion(),
            'required'     => $this->isRequired(),
            'installed'    => $this->isInstalled(),
            'activated'    => $this->isActivated(),
            'path'         => $this->getPath(),
            'namespace'    => $this->getRootNamespace(),
            'friendlyName' => $this->getFriendlyName(),
            'type'         => $this->getFriendlyType(),
            'status'       => $this->getStatus(),
        ];
    }
1051864
protected function getManagedProperties(): array
    {
        $properties = $this->entityMap->getProperties();

        $attributesName = $this->entityMap->getAttributesArrayName();

        return $attributesName == null ? $properties : array_merge($properties, [$attributesName]);
    }
544159
private function getWhereClause(): array
    {
        $result = array_merge($this->getOwnerFields(), $this->getBelongTo(), $this->getPermissions());
        $result = array_merge($result, $this->getParentPermissions(), $this->getParentJoinsWhereClause());
        $result = array_merge_recursive($result, $this->getSupervisorWhereClause());

        return $result;
    }
707080
public function featureImportances() : array
    {
        if (!$this->forest or !$this->featureCount) {
            return [];
        }

        $importances = array_fill(0, $this->featureCount, 0.);

        foreach ($this->forest as $tree) {
            foreach ($tree->featureImportances() as $column => $value) {
                $importances[$column] += $value;
            }
        }

        $k = count($this->forest);

        foreach ($importances as &$importance) {
            $importance /= $k;
        }

        return $importances;
    }
767622
public function stats() {
		$keys = [];
		$keys['unused_valid'] = $this->find('count', ['conditions' => [$this->getAlias() . '.used' => 0, $this->getAlias() . '.created >=' => date(FORMAT_DB_DATETIME, time() - $this->validity)]]);
		$keys['used_valid'] = $this->find('count', ['conditions' => [$this->getAlias() . '.used' => 1, $this->getAlias() . '.created >=' => date(FORMAT_DB_DATETIME, time() - $this->validity)]]);

		$keys['unused_invalid'] = $this->find('count', ['conditions' => [$this->getAlias() . '.used' => 0, $this->getAlias() . '.created <' => date(FORMAT_DB_DATETIME, time() - $this->validity)]]);
		$keys['used_invalid'] = $this->find('count', ['conditions' => [$this->getAlias() . '.used' => 1, $this->getAlias() . '.created <' => date(FORMAT_DB_DATETIME, time() - $this->validity)]]);

		$types = $this->find('all', ['conditions' => [], 'fields' => ['DISTINCT type']])->toArray();
		$keys['types'] = !empty($types) ? Hash::extract($types, '{n}.type') : [];
		return $keys;
	}
942504
public function describe() : array
    {
        $info = [
            'path' => $this->path,
            'maxDepth' => $this->maxDepth,
            'skipSymLinks' => $this->skipSymLinks,
            'dirs' => $this->dirs,
            'itemValue' => $this->itemValue,
            'traverseHidden' => $this->traverseHidden,
            'skipUnreadable' => $this->skipUnreadable,
            'requireUnique' => $this->requireUnique,
            // Count actual criteria.
            'criteriaCount' => (int) !$this->includeHidden,
            // First actual criteria.
            'includeHidden' => $this->includeHidden,
        ];
        $possible_empties = [
            'includeNames',
            'excludeNames',
            'includeExtensions',
            'excludeExtensions',
            'includeParents',
            'excludeParents',
            'customFilter',
        ];
        foreach ($possible_empties as $key) {
            if ($this->{$key}) {
                ++$info['criteriaCount'];
                $info[$key] = $this->{$key};
            }
        }
        return $info;
    }
639134
public function toArray()
    {
        return [
            'asset_dir' => $this->assetDir(),
            'view_namespace' => $this->getViewNamespace(),
            'name' => $this->name(),
            'version' => $this->version(),
            'homepage' => $this->homepage(),
        ];
    }
1100972
protected function getCumulativeStatistics() {
        if (!$this->_cumulativeStatistics) {
            $this->_cumulativeStatistics = new WorkspaceCumulativeStatisticsList(
                $this->version,
                $this->solution['sid']
            );
        }

        return $this->_cumulativeStatistics;
    }
156403
private function getScriptsContainers()
    {
        $container = null;
        $config    = null;
        foreach (['container', 'app', 'foundation'] as $name) {
            if (isset($this->{$name}) && is_null($container)) {
                $container = $this->{$name}->make('antares.asset');
                $config    = $this->{$name}->make('config');
                break;
            }
        }
        if (is_null($container)) {
            $container = app('antares.asset');
        }
        if (is_null($config)) {
            $config = app('config');
        }
        return [
            'container' => $container,
            'config'    => $config
        ];
    }
315069
public function featureImportances() : array
    {
        if (!$this->root) {
            return [];
        }

        $importances = array_fill(0, $this->featureCount, 0.);

        foreach ($this->dump() as $node) {
            if ($node instanceof Decision) {
                $index = $node->column();

                $importances[$index] += $node->purityIncrease();
            }
        }

        $total = array_sum($importances) ?: self::BETA;

        foreach ($importances as &$importance) {
            $importance /= $total;
        }

        arsort($importances);

        return $importances;
    }
1301269
public function getProperties()
    {
        $properties = [];

        foreach ($this->audios as $audio) {
            $properties = array_merge($properties, $audio->getProperties());
        }
        
        if ($this->title !== null) {
            $properties[] = new Property(Property::TITLE, $this->title);
        }

        if ($this->description !== null) {
            $properties[] = new Property(Property::DESCRIPTION, $this->description);
        }

        if ($this->determiner !== null) {
            $properties[] = new Property(Property::DETERMINER, $this->determiner);
        }

        foreach ($this->images as $image) {
            $properties = array_merge($properties, $image->getProperties());
        }

        if ($this->locale !== null) {
            $properties[] = new Property(Property::LOCALE, $this->locale);
        }

        foreach ($this->localeAlternate as $locale) {
            $properties[] = new Property(Property::LOCALE_ALTERNATE, $locale);
        }

        if ($this->richAttachment !== null) {
            $properties[] = new Property(Property::RICH_ATTACHMENT, (int)$this->richAttachment);
        }

        foreach ($this->seeAlso as $seeAlso) {
            $properties[] = new Property(Property::SEE_ALSO, $seeAlso);
        }

        if ($this->siteName !== null) {
            $properties[] = new Property(Property::SITE_NAME, $this->siteName);
        }

        if ($this->type !== null) {
            $properties[] = new Property(Property::TYPE, $this->type);
        }

        if ($this->updatedTime !== null) {
            $properties[] = new Property(Property::UPDATED_TIME, $this->updatedTime->format("c"));
        }

        if ($this->url !== null) {
            $properties[] = new Property(Property::URL, $this->url);
        }

        foreach ($this->videos as $video) {
            $properties = array_merge($properties, $video->getProperties());
        }

        return $properties;
    }
182868
public function getFeatureImportances()
    {
        if ($this->featureImportances !== null) {
            return $this->featureImportances;
        }

        $sampleCount = count($this->samples);
        $this->featureImportances = [];
        foreach ($this->columnNames as $column => $columnName) {
            $nodes = $this->getSplitNodesByColumn($column, $this->tree);

            $importance = 0;
            foreach ($nodes as $node) {
                $importance += $node->getNodeImpurityDecrease($sampleCount);
            }

            $this->featureImportances[$columnName] = $importance;
        }

        // Normalize & sort the importances
        $total = array_sum($this->featureImportances);
        if ($total > 0) {
            foreach ($this->featureImportances as &$importance) {
                $importance /= $total;
            }
            arsort($this->featureImportances);
        }

        return $this->featureImportances;
    }
701107
public function getStatisticsLogsDev():array
    {
        $last = array_values((AbstractServer::getLogs("dev")));
        $success = 0;
        $critical = 0;
        $others = 0;
        $errors = 0;
        for ($i = 0; $i < count($last); $i++) {
            $one = $last[$i];
            if ($one['code'] == 200) {
                $success++;
            } else {
                $errors++;
                if ($one['code'] == 500) {
                    $critical++;
                } else {
                    $others++;
                }
            }
        }
        return (array("errors" => $errors, "critical" => $critical,
            "success" => $success, "others" => $others));
    }
970266
public function getProperties()
    {
        return [
            'workspaceName' => $this->workspaceName,
            'currentDateTime' => $this->currentDateTime,
            'dimensions' => $this->dimensions,
            'targetDimensions' => $this->targetDimensions,
            'invisibleContentShown' => $this->invisibleContentShown,
            'removedContentShown' => $this->removedContentShown,
            'inaccessibleContentShown' => $this->inaccessibleContentShown,
            'currentSite' => $this->currentSite,
            'currentDomain' => $this->currentDomain
        ];
    }
867639
public function toArray()
    {
        return [
            'userAgent'    => $this->userAgent,
            'version'      => $this->version,
            'majorVersion' => $this->majorVersion,
            'minorVersion' => $this->minorVersion,
            'patchVersion' => $this->patchVersion,
            'debug'        => $this->debug,
            'platform'     => $this->platform,
            'device'       => $this->device,
        ];
    }