Skip to content

Commit

Permalink
6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
aliyilmaz committed Nov 11, 2024
1 parent 2160bd9 commit 30f54a9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Mind.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
*
* @package Mind
* @version Release: 6.0.1
* @version Release: 6.0.2
* @license GPL3
* @author Ali YILMAZ <[email protected]>
* @category Php Framework, Design pattern builder for PHP.
Expand Down Expand Up @@ -2369,9 +2369,9 @@ public function is_blood($blood, $donor = null){
* @param float|int|string $latitude
* @return bool
*/
public function is_latitude($latitude){
$lat_pattern = '/\A[+-]?(?:90(?:\.0{1,18})?|\d(?(?<=9)|\d?)\.\d{1,18})\z/x';

public function is_latitude($latitude) {
$lat_pattern = '/\A[+-]?(?:90(?:\.0+)?|(?:[0-8]?\d(?:\.\d+)?|90(?:\.0+)?))\z/';
if (preg_match($lat_pattern, $latitude)) {
return true;
} else {
Expand All @@ -2384,9 +2384,10 @@ public function is_latitude($latitude){
* @param float|int|string $longitude
* @return bool
*/
public function is_longitude($longitude){
$long_pattern = '/\A[+-]?(?:180(?:\.0{1,18})?|(?:1[0-7]\d|\d{1,2})\.\d{1,18})\z/x';
public function is_longitude($longitude) {

$long_pattern = '/\A[+-]?(?:180(?:\.0+)?|(?:1[0-7]\d|\d{1,2})(?:\.\d+)?)\z/';

if (preg_match($long_pattern, $longitude)) {
return true;
} else {
Expand Down

0 comments on commit 30f54a9

Please sign in to comment.