Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
seoplague committed Sep 23, 2023
0 parents commit 4b0e2e1
Show file tree
Hide file tree
Showing 11 changed files with 482 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
composer.lock
phpunit.xml
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/openapi-provider.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Change Log

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.

## 4.5.0

### Added

- Add support for PHP 8.1
- Add GitHub Actions workflow

### Removed

- Drop support for PHP 7.3

### Changed

- Migrate from PHP-HTTP to PSR-18 client

## 4.4.0

### Added

- Add support for PHP 8.0

### Removed

- Drop support for PHP 7.2

### Changed

- Upgrade PHPUnit to version 9

## 4.3.0

### Removed

- Drop support for PHP < 7.2

## 4.2.0

### Added

- Yandex now requires an API key

## 4.1.0

### Added

- Support for [`kind`](https://tech.yandex.ru/maps/doc/geocoder/desc/reference/kind-docpage/).

### Changed

- Improve tests by using `Geocoder\Provider\Yandex\Model\YandexAddress`

## 4.0.1

### Fixed

- Added `geocoder-php/common-http` dependency

## 4.0.0

First release of this library.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2011 — William Durand <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
88 changes: 88 additions & 0 deletions Model/OpenApiAddress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?php

declare(strict_types=1);

/*
* This file is part of the Geocoder package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/

namespace Geocoder\Provider\OpenApi\Model;

use Geocoder\Model\Address;

/**
* @author Tobias Nyholm <[email protected]>
*/
final class OpenApiAddress extends Address
{
/**
* @var string|null
*/
private $precision;

/**
* The name of this location.
*
* @var string|null
*/
private $name;

/**
* The kind of this location.
*
* @var string|null
*/
private $kind;

/**
* @return string|null
*/
public function getPrecision()
{
return $this->precision;
}

public function withPrecision(string $precision = null): self
{
$new = clone $this;
$new->precision = $precision;

return $new;
}

/**
* @return string|null
*/
public function getName()
{
return $this->name;
}

public function withName(string $name = null): self
{
$new = clone $this;
$new->name = $name;

return $new;
}

/**
* @return string|null
*/
public function getKind()
{
return $this->kind;
}

public function withKind(string $kind = null): self
{
$new = clone $this;
$new->kind = $kind;

return $new;
}
}
Loading

0 comments on commit 4b0e2e1

Please sign in to comment.