Skip to content

Commit

Permalink
Fixed some of the typos.
Browse files Browse the repository at this point in the history
Updated readme.
Updated composer requirements.
  • Loading branch information
artur-stepien committed May 9, 2022
1 parent ce19dd4 commit 6e07bb3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Basic PHP library handling Wargaming Public API. Uses namespace to get data sour
use Wargaming\Language\EN as EnglishLanguage;
use Wargaming\Server\EU as EuropeanServer;

require_once 'vendor/autoload.php';
require_once __DIR__.'/vendor/autoload.php';

// API Instance where YOUR_APPLICATION_ID is your application_id registered for the server you use.
$lang = new EnglishLanguage();
Expand Down Expand Up @@ -40,7 +40,7 @@ try {
use Wargaming\Language\EN as EnglishLanguage;
use Wargaming\Server\EU as EuropeanServer;

require_once 'vendor/autoload.php';
require_once __DIR__.'/vendor/autoload.php';

// API Instance where YOUR_APPLICATION_ID is your application_id registered for the server you use.
$lang = new EnglishLanguage();
Expand Down Expand Up @@ -68,7 +68,7 @@ try {
use Wargaming\Language\EN as EnglishLanguage;
use Wargaming\Server\EU as EuropeanServer;

require_once 'vendor/autoload.php';
require_once __DIR__.'/vendor/autoload.php';

// API Instance where YOUR_APPLICATION_ID is your application_id registered for the server you use.
$lang = new EnglishLanguage();
Expand All @@ -91,6 +91,11 @@ try {
```

## News
### 1.4.1 - 2022-05-09
- Allow chaining in set methods.
- Simplified some of the conditions.
- Fixed few typos in documentation.

### 1.4.0 - 2021-06-08
- Prepared for use in dependency injection.
- Added a `public function setSSLVerification(bool $state)` method to change SSL connection verification status (CURLOPT_SSL_VERIFYPEER).
Expand Down
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "Artur Stępień",
"email": "[email protected]",
"homepage": "http://www.bestproject.pl"
"homepage": "https://www.bestproject.pl"
}
],
"require-dev": {},
Expand All @@ -23,9 +23,6 @@
"Wargaming\\": "src/"
}
},
"conflict": {
"artur-stepien/wargaming-papi": "<1.4"
},
"scripts": {},
"scripts-descriptions": {}
}
4 changes: 2 additions & 2 deletions src/Server/ServerPrototype.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(string $application_id = '')
}

if (!is_string($this::URL) || $this::URL === '') {
throw new Exception('Server object is missing URL constant.');
throw new \RuntimeException('Server object is missing URL constant.');
}
}

Expand All @@ -53,7 +53,7 @@ public function getURL(): string
{

if (!is_string($this->application_id) || $this->application_id === '') {
throw new Exception('This server instance is missing application id ($application_id). Create your own class extending ServerPrototype or any of the existing servers and set the application id.');
throw new \RuntimeException('This server instance is missing application id ($application_id). Create your own class extending ServerPrototype or any of the existing servers and set the application id.');
}

return $this->getURL();
Expand Down

0 comments on commit 6e07bb3

Please sign in to comment.