<commit_before><?php
/**
 * Created by PhpStorm.
 * User: Sjaak
 * Date: 19-10-2014
 * Time: 12:07
 */

namespace sjaakp\spatial;

/**
 * Class SpatialHelper
 * @package sjaakp\spatial
 * Converts between:
 * - geometry (PHP array)
 * - feature (PHP array)
 * - Well-Known Text (used by MySQL)
 * - GeoJSON (used by Leaflet)
 *
 * Geometry and feature are 'decoded GeoJson'. They are formatted like:
 * [
 *  'type' => 'Point',
 *  'coordinates' => [ lng, lat ]
 * ]
 * (Notice: Leaflet uses [ lat, lng ] internally)
 *
 * @link http://geojson.org/geojson-spec.html
 * @link http://dev.mysql.com/doc/refman/5.6/en/gis-data-formats.html#gis-wkt-format
 *
 */
use yii\helpers\Json;

class SpatialHelper {

    protected function implodePoint($pntArray)  {
        return implode(' ', $pntArray);
    }

    protected static function implodePoints($pntsArray)    {
        return implode(',', array_map('static::implodePoint', $pntsArray));<commit_msg>Made implodePoint() static<commit_after><?php
/**
 * Created by PhpStorm.
 * User: Sjaak
 * Date: 19-10-2014
 * Time: 12:07
 */

namespace sjaakp\spatial;

/**
 * Class SpatialHelper
 * @package sjaakp\spatial
 * Converts between:
 * - geometry (PHP array)
 * - feature (PHP array)
 * - Well-Known Text (used by MySQL)
 * - GeoJSON (used by Leaflet)
 *
 * Geometry and feature are 'decoded GeoJson'. They are formatted like:
 * [
 *  'type' => 'Point',
 *  'coordinates' => [ lng, lat ]
 * ]
 * (Notice: Leaflet uses [ lat, lng ] internally)
 *
 * @link http://geojson.org/geojson-spec.html
 * @link http://dev.mysql.com/doc/refman/5.6/en/gis-data-formats.html#gis-wkt-format
 *
 */
use yii\helpers\Json;

class SpatialHelper {

    protected static function implodePoint($pntArray)  {
        return implode(' ', $pntArray);
    }

    protected static function implodePoints($pntsArray)    {
        return implode(',', array_map('static::implodePoint', $pntsArray));
{'fraction_non_alphanumeric': 0.15641293013555788, 'fraction_numerical': 0.014598540145985401, 'mean_word_length': 3.341628959276018, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5128083', 'n_tokens_mistral': 726, 'n_tokens_neox': 670, 'n_words': 154}