Remove usage of codeception/specify and fzaninotto/faker

This commit is contained in:
ErickSkrauch 2019-12-29 17:55:21 +03:00
parent 43a4a58053
commit 7607248c27
5 changed files with 12 additions and 11 deletions

View File

@ -25,8 +25,8 @@ return [
} }
}; };
}, },
common\components\SkinSystem\Api::class => function() { common\components\SkinsSystemApi::class => function() {
return new class extends common\components\SkinSystem\Api { return new class extends common\components\SkinsSystemApi {
public function textures(string $username): ?array { public function textures(string $username): ?array {
return [ return [
'SKIN' => [ 'SKIN' => [

View File

@ -1,11 +1,12 @@
<?php <?php
namespace common\components\Sentry; declare(strict_types=1);
namespace common\components;
use mito\sentry\Component;
use Yii; use Yii;
class Component extends \mito\sentry\Component { class Sentry extends Component {
public $jsNotifier = false;
public function init() { public function init() {
if (!$this->enabled) { if (!$this->enabled) {

View File

@ -1,13 +1,13 @@
<?php <?php
declare(strict_types=1); declare(strict_types=1);
namespace common\components\SkinSystem; namespace common\components;
use GuzzleHttp\ClientInterface; use GuzzleHttp\ClientInterface;
use Yii; use Yii;
// TODO: convert to complete Chrly client library // TODO: convert to complete Chrly client library
class Api { class SkinsSystemApi {
private const BASE_DOMAIN = 'http://skinsystem.ely.by'; private const BASE_DOMAIN = 'http://skinsystem.ely.by';

View File

@ -19,7 +19,7 @@ return [
'definitions' => [ 'definitions' => [
GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class, GuzzleHttp\ClientInterface::class => GuzzleHttp\Client::class,
Ely\Mojang\Api::class => Ely\Mojang\Api::class, Ely\Mojang\Api::class => Ely\Mojang\Api::class,
common\components\SkinSystem\Api::class => common\components\SkinSystem\Api::class, common\components\SkinsSystemApi::class => common\components\SkinsSystemApi::class,
], ],
], ],
'components' => [ 'components' => [
@ -68,7 +68,7 @@ return [
], ],
], ],
'sentry' => [ 'sentry' => [
'class' => common\components\Sentry\Component::class, 'class' => common\components\Sentry::class,
'enabled' => !empty(getenv('SENTRY_DSN')), 'enabled' => !empty(getenv('SENTRY_DSN')),
'dsn' => getenv('SENTRY_DSN'), 'dsn' => getenv('SENTRY_DSN'),
'environment' => YII_ENV_DEV ? 'development' : 'production', 'environment' => YII_ENV_DEV ? 'development' : 'production',

View File

@ -3,7 +3,7 @@ declare(strict_types=1);
namespace common\models; namespace common\models;
use common\components\SkinSystem\Api as SkinSystemApi; use common\components\SkinsSystemApi as SkinSystemApi;
use DateInterval; use DateInterval;
use DateTime; use DateTime;
use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\GuzzleException;