<commit_before><?php

namespace GPS;

class PolygonService {

    public function isPointInsideThePolygon($latitude, $longitude, array $polygon)
    {

        $latArray = array();
        $lonArray = array();

        foreach($polygon as $coordinate) {
            if ($this->isAValidGPSPoint($coordinate[0], $coordinate[1])) {
                $latArray[] = $coordinate[0];
                $lonArray[] = $coordinate[1];
            }
        }
<commit_msg>Add more controls in input coordinates<commit_after><?php

namespace GPS;

class PolygonService {

    public function isPointInsideThePolygon($latitude, $longitude, array $polygon)
    {

        $latArray = array();
        $lonArray = array();

        if (! $this->isAValidGPSPoint($latitude, $longitude)) {
            return false;
        }

        foreach($polygon as $coordinates) {
            if ($this->isAValidGPSPoint($coordinates[0], $coordinates[1])) {
                $latArray[] = $coordinates[0];
                $lonArray[] = $coordinates[1];
            } else {
                return false;
            }
        }

{'fraction_non_alphanumeric': 0.13047445255474452, 'fraction_numerical': 0.0072992700729927005, 'mean_word_length': 2.1253561253561255, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '487359', 'n_tokens_mistral': 326, 'n_tokens_neox': 308, 'n_words': 63}