repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Http/ViewComposers/CharacterMessagesComposer.php | app/Http/ViewComposers/CharacterMessagesComposer.php | <?php
namespace App\Http\ViewComposers;
use App\Models\Character;
use App\Models\Message;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class CharacterMessagesComposer
{
/**
* Bind data to the view.
*
* @param ... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Traits/GeneratesUuid.php | app/Traits/GeneratesUuid.php | <?php
namespace App\Traits;
use Ramsey\Uuid\Uuid;
trait GeneratesUuid
{
protected function generateUuid(): string
{
return Uuid::uuid4()->toString();
}
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Traits/UsesStringId.php | app/Traits/UsesStringId.php | <?php
namespace App\Traits;
trait UsesStringId
{
public function getIncrementing()
{
return false;
}
public function getKeyType()
{
return 'string';
}
} | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Traits/ThrowsDice.php | app/Traits/ThrowsDice.php | <?php
namespace App\Traits;
trait ThrowsDice
{
protected static function throwTwoDices(): int
{
return self::throwOneDice() + self::throwOneDice();
}
protected static function throwTreeDices(): int
{
return self::throwTwoDices() + self::throwOneDice();
}
protected static... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Support/helpers.php | app/Support/helpers.php | <?php
if (! function_exists('ini_size_to_kilo_bytes')) {
function ini_size_to_kilo_bytes(string $value): float
{
$value = trim($value);
$unitSymbol = strtoupper(substr($value, -1));
$value = (float) $value;
switch ($unitSymbol) {
case 'B':
return $... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/BaseId.php | app/Modules/Generic/Domain/BaseId.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain;
abstract class BaseId
{
/**
* @var string
*/
private $id;
private function __construct(string $id)
{
$this->id = $id;
}
/**
* @param string $id
*
* @return static
*/
public static f... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container.php | app/Modules/Generic/Domain/Container.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain;
use Illuminate\Support\Collection;
abstract class Container
{
/**
* @var Collection
*/
protected $items;
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/ContainerType.php | app/Modules/Generic/Domain/ContainerType.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain;
use InvalidArgumentException;
class ContainerType
{
private const VALID_TYPES = [
self::INVENTORY,
self::STORE
];
private const INVENTORY = 'inventory';
private const STORE = 'store';
/**
* @var string
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/ContainerIsFullException.php | app/Modules/Generic/Domain/Container/ContainerIsFullException.php | <?php
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class ContainerIsFullException extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/InvalidMoneyValue.php | app/Modules/Generic/Domain/Container/InvalidMoneyValue.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class InvalidMoneyValue extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/NotEnoughSpaceInContainerException.php | app/Modules/Generic/Domain/Container/NotEnoughSpaceInContainerException.php | <?php
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class NotEnoughSpaceInContainerException extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/ContainerSlotIsTakenException.php | app/Modules/Generic/Domain/Container/ContainerSlotIsTakenException.php | <?php
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class ContainerSlotIsTakenException extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/NotEnoughMoneyToRemove.php | app/Modules/Generic/Domain/Container/NotEnoughMoneyToRemove.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class NotEnoughMoneyToRemove extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/ItemNotInContainer.php | app/Modules/Generic/Domain/Container/ItemNotInContainer.php | <?php declare(strict_types=1);
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class ItemNotInContainer extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Generic/Domain/Container/ContainerSlotOutOfRangeException.php | app/Modules/Generic/Domain/Container/ContainerSlotOutOfRangeException.php | <?php
namespace App\Modules\Generic\Domain\Container;
use RuntimeException;
class ContainerSlotOutOfRangeException extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Application/Contracts/BattleRepositoryInterface.php | app/Modules/Battle/Application/Contracts/BattleRepositoryInterface.php | <?php
namespace App\Modules\Battle\Application\Contracts;
use App\Modules\Battle\Domain\Battle;
use App\Modules\Battle\Domain\BattleId;
interface BattleRepositoryInterface
{
public function nextIdentity(): BattleId;
public function add(Battle $battle):void;
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleRound.php | app/Modules/Battle/Domain/BattleRound.php | <?php
namespace App\Modules\Battle\Domain;
use App\Modules\Character\Domain\Character;
use App\Traits\GeneratesUuid;
class BattleRound
{
use GeneratesUuid;
/**
* @var string
*/
private $id;
/**
* @var Character
*/
private $attacker;
/**
* @var Character
*/
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleRounds.php | app/Modules/Battle/Domain/BattleRounds.php | <?php
namespace App\Modules\Battle\Domain;
use Illuminate\Support\Collection;
class BattleRounds extends Collection
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleId.php | app/Modules/Battle/Domain/BattleId.php | <?php declare(strict_types=1);
namespace App\Modules\Battle\Domain;
use App\Modules\Generic\Domain\BaseId;
class BattleId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/Battle.php | app/Modules/Battle/Domain/Battle.php | <?php
namespace App\Modules\Battle\Domain;
use App\Modules\Character\Domain\Character;
use App\Traits\GeneratesUuid;
class Battle
{
use GeneratesUuid;
/**
* @var BattleId
*/
private $id;
/**
* @var string
*/
private $locationId;
/**
* @var Character
*/
pri... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleTurn.php | app/Modules/Battle/Domain/BattleTurn.php | <?php
namespace App\Modules\Battle\Domain;
use App\Modules\Character\Domain\Character;
use App\Traits\ThrowsDice;
class BattleTurn
{
use ThrowsDice;
/**
* @var string
*/
private $id;
/**
* @var Character
*/
private $owner;
/**
* @var Character
*/
private... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleTurns.php | app/Modules/Battle/Domain/BattleTurns.php | <?php
namespace App\Modules\Battle\Domain;
use Illuminate\Support\Collection;
class BattleTurns extends Collection
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Domain/BattleTurnResult.php | app/Modules/Battle/Domain/BattleTurnResult.php | <?php
namespace App\Modules\Battle\Domain;
class BattleTurnResult
{
const NONE = 'none';
const MISS = 'miss';
const HIT = 'hit';
const CRITICAL_HIT = 'critical_hit';
const TYPES = [
self::NONE,
self::MISS,
self::HIT,
self::CRITICAL_HIT,
];
/**
* @va... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Battle/Infrastructure/Repositories/BattleRepository.php | app/Modules/Battle/Infrastructure/Repositories/BattleRepository.php | <?php
namespace App\Modules\Battle\Infrastructure\Repositories;
use App\Modules\Battle\Application\Contracts\BattleRepositoryInterface;
use App\Modules\Battle\Domain\Battle;
use App\Models\Battle as BattleModel;
use App\Models\BattleRound as BattleRoundModel;
use App\Modules\Battle\Domain\BattleId;
use App\Modules\... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/User/Application/Services/UserService.php | app/Modules/User/Application/Services/UserService.php | <?php
namespace App\Modules\User\Application\Services;
use App\Modules\User\Application\Commands\CreateUserCommand;
use App\Models\User;
class UserService
{
public function create(CreateUserCommand $command): User
{
/** @var User $user */
$user = User::query()->create([
'name' =... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/User/Application/Commands/CreateUserCommand.php | app/Modules/User/Application/Commands/CreateUserCommand.php | <?php
namespace App\Modules\User\Application\Commands;
class CreateUserCommand
{
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $email;
/**
* @var string
*/
private $password;
public function __construct(string $name, string $email, string... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/User/UI/Http/CommandMappers/CreateUserCommandMapper.php | app/Modules/User/UI/Http/CommandMappers/CreateUserCommandMapper.php | <?php
namespace App\Modules\User\UI\Http\CommandMappers;
use App\Modules\User\Application\Commands\CreateUserCommand;
class CreateUserCommandMapper
{
public function map(array $data): CreateUserCommand
{
return new CreateUserCommand(
$data['name'],
$data['email'],
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Services/CreateStoreService.php | app/Modules/Trade/Application/Services/CreateStoreService.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Application\Services;
use App\Modules\Equipment\Domain\Money;
use App\Modules\Trade\Application\Commands\CreateStoreCommand;
use App\Modules\Trade\Application\Contracts\StoreRepositoryInterface;
use App\Modules\Trade\Domain\Store;
use App\Modules\Trade\Domai... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Services/TradeService.php | app/Modules/Trade/Application/Services/TradeService.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Application\Services;
use App\Modules\Equipment\Application\Contracts\InventoryRepositoryInterface;
use App\Modules\Equipment\Application\Contracts\ItemPrototypeRepositoryInterface;
use App\Modules\Equipment\Application\Contracts\ItemRepositoryInterface;
use... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Services/ManageStoreService.php | app/Modules/Trade/Application/Services/ManageStoreService.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Application\Services;
use App\Modules\Equipment\Application\Contracts\InventoryRepositoryInterface;
use App\Modules\Equipment\Infrastructure\Repositories\ItemRepository;
use App\Modules\Generic\Domain\Container\ItemNotInContainer;
use App\Modules\Trade\Appli... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Contracts/StoreRepositoryInterface.php | app/Modules/Trade/Application/Contracts/StoreRepositoryInterface.php | <?php
namespace App\Modules\Trade\Application\Contracts;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Trade\Domain\Store;
use App\Modules\Trade\Domain\StoreId;
interface StoreRepositoryInterface
{
public function nextIdentity(): StoreId;
public function add(Store $store): void;
public ... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/AddItemToStoreCommand.php | app/Modules/Trade/Application/Commands/AddItemToStoreCommand.php | <?php
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
class AddItemToStoreCommand
{
/**
* @var CharacterId
*/
private $characterId;
/**
* @var int
*/
private $slot;
/**
* @var ItemId
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/BuyItemCommand.php | app/Modules/Trade/Application/Commands/BuyItemCommand.php | <?php
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Trade\Domain\StoreId;
class BuyItemCommand
{
/**
* @var CharacterId
*/
private $customerId;
/**
* @var StoreId
*/
private ... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/ChangeItemPriceCommand.php | app/Modules/Trade/Application/Commands/ChangeItemPriceCommand.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Domain\ItemPrice;
use App\Modules\Generic\Domain\ContainerType;
class ChangeItemPriceCommand
{
/**
* @var ItemId
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/CreateStoreCommand.php | app/Modules/Trade/Application/Commands/CreateStoreCommand.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class CreateStoreCommand
{
/**
* @var CharacterId
*/
private $characterId;
public function __construct(CharacterId $characterId)
{
$this->characterId = $... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/MoveMoneyToContainerCommand.php | app/Modules/Trade/Application/Commands/MoveMoneyToContainerCommand.php | <?php
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Money;
class MoveMoneyToContainerCommand
{
/**
* @var Money
*/
private $money;
/**
* @var CharacterId
*/
private $characterId;
public functio... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/MoveItemToContainerCommand.php | app/Modules/Trade/Application/Commands/MoveItemToContainerCommand.php | <?php
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
class MoveItemToContainerCommand
{
/**
* @var ItemId
*/
private $itemId;
/**
* @var CharacterId
*/
private $characterId;
public funct... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Application/Commands/SellItemCommand.php | app/Modules/Trade/Application/Commands/SellItemCommand.php | <?php
namespace App\Modules\Trade\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Trade\Domain\StoreId;
class SellItemCommand
{
/**
* @var CharacterId
*/
private $customerId;
/**
* @var StoreId
*/
private... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/UI/Http/CommandMappers/ChangeItemPriceCommandMapper.php | app/Modules/Trade/UI/Http/CommandMappers/ChangeItemPriceCommandMapper.php | <?php
namespace App\Modules\Trade\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemPrice;
use App\Modules\Generic\Domain\ContainerType;
use App\Modules\Trade\Application\Commands\ChangeItemPriceCommand;
use App\Modules\Equipment\Domain\ItemId;
use Illuminate\H... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/UI/Http/CommandMappers/MoveMoneyToContainerCommandMapper.php | app/Modules/Trade/UI/Http/CommandMappers/MoveMoneyToContainerCommandMapper.php | <?php
namespace App\Modules\Trade\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Money;
use App\Modules\Trade\Application\Commands\MoveMoneyToContainerCommand;
use Illuminate\Http\Request;
use App\Models\User as UserModel;
class MoveMoneyToContainerCommandMappe... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/UI/Http/CommandMappers/SellItemCommandMapper.php | app/Modules/Trade/UI/Http/CommandMappers/SellItemCommandMapper.php | <?php
namespace App\Modules\Trade\UI\Http\CommandMappers;
use App\Models\User;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Trade\Application\Commands\SellItemCommand;
use App\Modules\Trade\Domain\StoreId;
use Illuminate\Http\Request;
use App\Models\User as Us... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/UI/Http/CommandMappers/BuyItemCommandMapper.php | app/Modules/Trade/UI/Http/CommandMappers/BuyItemCommandMapper.php | <?php
namespace App\Modules\Trade\UI\Http\CommandMappers;
use App\Models\User;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Trade\Application\Commands\BuyItemCommand;
use App\Modules\Trade\Domain\StoreId;
use Illuminate\Http\Request;
use App\Models\User as Use... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/UI/Http/CommandMappers/MoveItemToContainerCommandMapper.php | app/Modules/Trade/UI/Http/CommandMappers/MoveItemToContainerCommandMapper.php | <?php
namespace App\Modules\Trade\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Trade\Application\Commands\MoveItemToContainerCommand;
use App\Modules\Equipment\Domain\ItemId;
use Illuminate\Http\Request;
use App\Models\User as UserModel;
class MoveItemToContainerCommandMapper... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Domain/StoreId.php | app/Modules/Trade/Domain/StoreId.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Domain;
use App\Modules\Generic\Domain\BaseId;
class StoreId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Domain/Store.php | app/Modules/Trade/Domain/Store.php | <?php
namespace App\Modules\Trade\Domain;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Item;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Domain\ItemType;
use App\Modules\Equipment\Domain\Money;
use App\Modules\Generic\Domain\Container\ContainerIsFullException;
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Domain/StoreType.php | app/Modules/Trade/Domain/StoreType.php | <?php
namespace App\Modules\Trade\Domain;
use InvalidArgumentException;
class StoreType
{
public const SELL_ONLY = 'sell_only';
public const BUY_AND_SELL = 'buy_and_sell';
public const TYPES = [
self::SELL_ONLY,
self::BUY_AND_SELL,
];
/**
* @var string
*/
private $... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Domain/Exception/SellPriceIsTooHigh.php | app/Modules/Trade/Domain/Exception/SellPriceIsTooHigh.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Domain\Exception;
use RuntimeException;
class SellPriceIsTooHigh extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Domain/Store/StoreDoesNotBuyItems.php | app/Modules/Trade/Domain/Store/StoreDoesNotBuyItems.php | <?php declare(strict_types=1);
namespace App\Modules\Trade\Domain\Store;
use RuntimeException;
class StoreDoesNotBuyItems extends RuntimeException
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Infrastructure/Repositories/StoreRepository.php | app/Modules/Trade/Infrastructure/Repositories/StoreRepository.php | <?php
namespace App\Modules\Trade\Infrastructure\Repositories;
use App\Modules\Equipment\Domain\Item;
use App\Modules\Trade\Infrastructure\ReconstitutionFactories\StoreReconstitutionFactory;
use App\Models\Store as StoreModel;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Trade\Application\Contracts\S... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Trade/Infrastructure/ReconstitutionFactories/StoreReconstitutionFactory.php | app/Modules/Trade/Infrastructure/ReconstitutionFactories/StoreReconstitutionFactory.php | <?php
namespace App\Modules\Trade\Infrastructure\ReconstitutionFactories;
use App\Models\Item as ItemModel;
use App\Modules\Equipment\Domain\Money;
use App\Modules\Equipment\Infrastructure\ReconstitutionFactories\ItemReconstitutionFactory;
use App\Modules\Trade\Domain\Store;
use App\Modules\Trade\Domain\StoreId;
use... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Application/Services/MessageService.php | app/Modules/Message/Application/Services/MessageService.php | <?php
namespace App\Modules\Message\Application\Services;
use App\Modules\Message\Application\Contracts\MessageRepositoryInterface;
use App\Modules\Message\Application\Commands\SendMessageCommand;
use App\Modules\Message\Domain\Message;
class MessageService
{
/**
* @var MessageRepositoryInterface
*/
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Application/Contracts/MessageRepositoryInterface.php | app/Modules/Message/Application/Contracts/MessageRepositoryInterface.php | <?php
namespace App\Modules\Message\Application\Contracts;
use App\Modules\Message\Domain\MessageId;
use App\Modules\Message\Domain\Message;
interface MessageRepositoryInterface
{
public function nextIdentity(): MessageId;
public function add(Message $message):void;
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Application/Commands/SendMessageCommand.php | app/Modules/Message/Application/Commands/SendMessageCommand.php | <?php
namespace App\Modules\Message\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class SendMessageCommand
{
/**
* @var CharacterId
*/
private $senderId;
/**
* @var CharacterId
*/
private $recipientId;
/**
* @var string
*/
private $content... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/UI/Http/CommandMappers/SendMessageCommandMapper.php | app/Modules/Message/UI/Http/CommandMappers/SendMessageCommandMapper.php | <?php
namespace App\Modules\Message\UI\Http\CommandMappers;
use App\Models\Character;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Message\Application\Commands\SendMessageCommand;
use Illuminate\Http\Request;
class SendMessageCommandMapper
{
public function map(Request $request): SendMessageCom... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Domain/MessageId.php | app/Modules/Message/Domain/MessageId.php | <?php declare(strict_types=1);
namespace App\Modules\Message\Domain;
use App\Modules\Generic\Domain\BaseId;
class MessageId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Domain/Message.php | app/Modules/Message/Domain/Message.php | <?php
namespace App\Modules\Message\Domain;
use App\Modules\Character\Domain\CharacterId;
class Message
{
public const UNREAD = 'unread';
public const READ = 'read';
/**
* @var MessageId
*/
private $id;
/**
* @var CharacterId
*/
private $senderId;
/**
* @var Cha... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Message/Infrastructure/Repositories/MessageRepository.php | app/Modules/Message/Infrastructure/Repositories/MessageRepository.php | <?php
namespace App\Modules\Message\Infrastructure\Repositories;
use App\Modules\Message\Domain\MessageId;
use App\Modules\Message\Domain\Message;
use App\Models\Message as MessageModel;
use App\Modules\Message\Application\Contracts\MessageRepositoryInterface;
use App\Traits\GeneratesUuid;
use Exception;
class Messa... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Services/ItemService.php | app/Modules/Equipment/Application/Services/ItemService.php | <?php
namespace App\Modules\Equipment\Application\Services;
use App\Modules\Character\Application\Contracts\CharacterRepositoryInterface;
use App\Modules\Equipment\Application\Commands\CreateItemCommand;
use App\Modules\Equipment\Application\Contracts\ItemPrototypeRepositoryInterface;
use App\Modules\Equipment\Applic... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Services/InventoryService.php | app/Modules/Equipment/Application/Services/InventoryService.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Application\Services;
use App\Modules\Equipment\Application\Commands\CreateInventoryCommand;
use App\Modules\Equipment\Application\Commands\EquipItemCommand;
use App\Modules\Equipment\Application\Contracts\InventoryRepositoryInterface;
use App\Modules\Eq... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Contracts/ItemRepositoryInterface.php | app/Modules/Equipment/Application/Contracts/ItemRepositoryInterface.php | <?php
namespace App\Modules\Equipment\Application\Contracts;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Domain\Item;
interface ItemRepositoryInterface
{
public function nextIdentity(): ItemId;
public function add(Item $item): void;
public function getOne(ItemId $itemId): Item;
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Contracts/ItemPrototypeRepositoryInterface.php | app/Modules/Equipment/Application/Contracts/ItemPrototypeRepositoryInterface.php | <?php
namespace App\Modules\Equipment\Application\Contracts;
use App\Modules\Equipment\Domain\ItemPrototypeId;
use App\Modules\Equipment\Domain\ItemPrototype;
interface ItemPrototypeRepositoryInterface
{
public function nextIdentity(): ItemPrototypeId;
public function getOne(ItemPrototypeId $itemPrototypeId... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Contracts/InventoryRepositoryInterface.php | app/Modules/Equipment/Application/Contracts/InventoryRepositoryInterface.php | <?php
namespace App\Modules\Equipment\Application\Contracts;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Inventory;
use App\Modules\Equipment\Domain\InventoryId;
interface InventoryRepositoryInterface
{
public function nextIdentity(): InventoryId;
public function add(Inven... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Factories/ItemFactory.php | app/Modules/Equipment/Application/Factories/ItemFactory.php | <?php
namespace App\Modules\Equipment\Application\Factories;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Item;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Domain\ItemPrototype;
class ItemFactory
{
public function create(ItemId $itemId, ItemPrototype $ite... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Commands/CreateItemCommand.php | app/Modules/Equipment/Application/Commands/CreateItemCommand.php | <?php
namespace App\Modules\Equipment\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemPrototypeId;
class CreateItemCommand
{
/**
* @var ItemPrototypeId
*/
private $prototypeId;
/**
* @var CharacterId
*/
private $creatorChara... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Commands/AddItemToInventoryCommand.php | app/Modules/Equipment/Application/Commands/AddItemToInventoryCommand.php | <?php
namespace App\Modules\Equipment\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
class AddItemToInventoryCommand
{
/**
* @var CharacterId
*/
private $characterId;
/**
* @var int
*/
private $slot;
/**
* @var... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Commands/EquipItemCommand.php | app/Modules/Equipment/Application/Commands/EquipItemCommand.php | <?php
namespace App\Modules\Equipment\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
class EquipItemCommand
{
/**
* @var ItemId
*/
private $itemId;
/**
* @var CharacterId
*/
private $ownerCharacterId;
public functi... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Application/Commands/CreateInventoryCommand.php | app/Modules/Equipment/Application/Commands/CreateInventoryCommand.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class CreateInventoryCommand
{
/**
* @var CharacterId
*/
private $characterId;
public function __construct(CharacterId $characterId)
{
$this->charact... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/UI/Http/CommandMappers/EquipItemCommandMapper.php | app/Modules/Equipment/UI/Http/CommandMappers/EquipItemCommandMapper.php | <?php
namespace App\Modules\Equipment\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Application\Commands\EquipItemCommand;
use Illuminate\Http\Request;
use App\Models\User as UserModel;
class EquipItemCommandMapper
{
publi... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/UI/Http/CommandMappers/AddItemToInventoryCommandMapper.php | app/Modules/Equipment/UI/Http/CommandMappers/AddItemToInventoryCommandMapper.php | <?php
namespace App\Modules\Equipment\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Application\Commands\AddItemToInventoryCommand;
use Illuminate\Http\Request;
use App\Models\User as UserModel;
class AddItemToInventoryCommand... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/UI/Http/CommandMappers/CreateItemCommandMapper.php | app/Modules/Equipment/UI/Http/CommandMappers/CreateItemCommandMapper.php | <?php
namespace App\Modules\Equipment\UI\Http\CommandMappers;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\ItemPrototypeId;
use App\Modules\Equipment\Application\Commands\CreateItemCommand;
use Illuminate\Http\Request;
use App\Models\User as UserModel;
class CreateItemCommandMapper
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/Money.php | app/Modules/Equipment/Domain/Money.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
use App\Modules\Generic\Domain\Container\InvalidMoneyValue;
use App\Modules\Generic\Domain\Container\NotEnoughMoneyToRemove;
class Money
{
/**
* @var int
*/
private $value;
public function __construct(int $value)
{
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemStatus.php | app/Modules/Equipment/Domain/ItemStatus.php | <?php
namespace App\Modules\Equipment\Domain;
use InvalidArgumentException;
class ItemStatus
{
public const EQUIPPED = 'equipped';
public const IN_BACKPACK = 'in_backpack';
public const STATUSES = [
self::EQUIPPED,
self::IN_BACKPACK,
];
/**
* @var string
*/
private... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemEffect.php | app/Modules/Equipment/Domain/ItemEffect.php | <?php
namespace App\Modules\Equipment\Domain;
use InvalidArgumentException;
class ItemEffect
{
public const NONE = 'none';
public const DAMAGE = 'damage';
public const ARMOR = 'armor';
public const PRECISION = 'precision';
public const EVASION = 'evasion';
public const TRICKERY = 'evasion';
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/InventorySlot.php | app/Modules/Equipment/Domain/InventorySlot.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
class InventorySlot
{
private $slot;
public static function undefined(): self
{
return new self(-1);
}
public static function defined(int $slot): self
{
return new self($slot);
}
public function... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemPrototype.php | app/Modules/Equipment/Domain/ItemPrototype.php | <?php
namespace App\Modules\Equipment\Domain;
use Illuminate\Support\Collection;
class ItemPrototype
{
/**
* @var ItemPrototypeId
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $description;
/**
* @var string
*/
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemId.php | app/Modules/Equipment/Domain/ItemId.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
use App\Modules\Generic\Domain\BaseId;
class ItemId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/InventoryId.php | app/Modules/Equipment/Domain/InventoryId.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
use App\Modules\Generic\Domain\BaseId;
class InventoryId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemPrototypeId.php | app/Modules/Equipment/Domain/ItemPrototypeId.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
use App\Modules\Generic\Domain\BaseId;
class ItemPrototypeId extends BaseId
{
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/InventoryItem.php | app/Modules/Equipment/Domain/InventoryItem.php | <?php
namespace App\Modules\Equipment\Domain;
class InventoryItem extends Item
{
/**
* @var ItemStatus
*/
private $status;
public function __construct(Item $item, ItemStatus $status)
{
parent::__construct(
$item->getId(),
$item->getName(),
$item-... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/Item.php | app/Modules/Equipment/Domain/Item.php | <?php
namespace App\Modules\Equipment\Domain;
use App\Modules\Character\Domain\CharacterId;
use Illuminate\Support\Collection;
class Item
{
/**
* @var ItemId
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $description;
/**
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemType.php | app/Modules/Equipment/Domain/ItemType.php | <?php
namespace App\Modules\Equipment\Domain;
use InvalidArgumentException;
class ItemType
{
public const MISCELLANEOUS = 'miscellaneous';
public const HEAD_GEAR = 'head_gear';
public const BODY_ARMOR = 'body_armor';
public const MAIN_HAND = 'main_hand';
public const OFF_HAND = 'off_hand';
p... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/Inventory.php | app/Modules/Equipment/Domain/Inventory.php | <?php
namespace App\Modules\Equipment\Domain;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Generic\Domain\Container\ContainerIsFullException;
use App\Modules\Generic\Domain\Container\ItemNotInContainer;
use App\Modules\Generic\Domain\Container\NotEnoughSpaceInContainerException;
use Illuminate\Suppor... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Domain/ItemPrice.php | app/Modules/Equipment/Domain/ItemPrice.php | <?php declare(strict_types=1);
namespace App\Modules\Equipment\Domain;
use Webmozart\Assert\Assert;
class ItemPrice
{
/**
* @var int
*/
private $amount;
private function __construct(int $amount)
{
Assert::greaterThanEq($amount, 0, 'Item price must be greater or equal to 0');
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/Repositories/ItemRepository.php | app/Modules/Equipment/Infrastructure/Repositories/ItemRepository.php | <?php
namespace App\Modules\Equipment\Infrastructure\Repositories;
use App\Models\Item as ItemModel;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Application\Contracts\ItemRepositoryInterface;
use App\Modules\Equipment\Domain\Item;
use App\Modules\Equipment\Domain\ItemEffect;
use App\Modules\Equ... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/Repositories/InventoryRepository.php | app/Modules/Equipment/Infrastructure/Repositories/InventoryRepository.php | <?php
namespace App\Modules\Equipment\Infrastructure\Repositories;
use App\Models\Inventory as InventoryModel;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Application\Contracts\InventoryRepositoryInterface;
use App\Modules\Equipment\Domain\Inventory;
use App\Modules\Equipment\Domain\Invent... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/Repositories/ItemPrototypeRepository.php | app/Modules/Equipment/Infrastructure/Repositories/ItemPrototypeRepository.php | <?php
namespace App\Modules\Equipment\Infrastructure\Repositories;
use App\Models\ItemPrototype as ItemPrototypeModel;
use App\Modules\Equipment\Domain\ItemPrototypeId;
use App\Modules\Equipment\Application\Contracts\ItemPrototypeRepositoryInterface;
use App\Modules\Equipment\Domain\ItemPrototype;
use App\Modules\Equ... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/ReconstitutionFactories/InventoryReconstitutionFactory.php | app/Modules/Equipment/Infrastructure/ReconstitutionFactories/InventoryReconstitutionFactory.php | <?php
namespace App\Modules\Equipment\Infrastructure\ReconstitutionFactories;
use App\Models\Item as ItemModel;
use App\Models\Inventory as InventoryModel;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Inventory;
use App\Modules\Equipment\Domain\InventoryId;
use App\Modules\Equipment... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/ReconstitutionFactories/InventoryItemReconstitutionFactory.php | app/Modules/Equipment/Infrastructure/ReconstitutionFactories/InventoryItemReconstitutionFactory.php | <?php
namespace App\Modules\Equipment\Infrastructure\ReconstitutionFactories;
use App\Models\Item as ItemModel;
use App\Modules\Equipment\Domain\InventoryItem;
use App\Modules\Equipment\Domain\ItemStatus;
class InventoryItemReconstitutionFactory
{
/**
* @var ItemReconstitutionFactory
*/
private $... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/ReconstitutionFactories/ItemPrototypeReconstitutionFactory.php | app/Modules/Equipment/Infrastructure/ReconstitutionFactories/ItemPrototypeReconstitutionFactory.php | <?php
namespace App\Modules\Equipment\Infrastructure\ReconstitutionFactories;
use App\Models\ItemPrototype as ItemPrototypeModel;
use App\Modules\Equipment\Domain\ItemPrice;
use App\Modules\Equipment\Domain\ItemPrototype;
use App\Modules\Equipment\Domain\ItemEffect;
use App\Modules\Equipment\Domain\ItemPrototypeId;
... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Equipment/Infrastructure/ReconstitutionFactories/ItemReconstitutionFactory.php | app/Modules/Equipment/Infrastructure/ReconstitutionFactories/ItemReconstitutionFactory.php | <?php
namespace App\Modules\Equipment\Infrastructure\ReconstitutionFactories;
use App\Models\Item as ItemModel;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Equipment\Domain\Item;
use App\Modules\Equipment\Domain\ItemEffect;
use App\Modules\Equipment\Domain\ItemId;
use App\Modules\Equipment\Domain\I... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Services/CharacterService.php | app/Modules/Character/Application/Services/CharacterService.php | <?php
namespace App\Modules\Character\Application\Services;
use App\Modules\Battle\Application\Contracts\BattleRepositoryInterface;
use App\Modules\Battle\Domain\Battle;
use App\Modules\Battle\Domain\BattleId;
use App\Modules\Battle\Domain\BattleRounds;
use App\Modules\Character\Application\Contracts\RaceRepository... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Contracts/LocationRepositoryInterface.php | app/Modules/Character/Application/Contracts/LocationRepositoryInterface.php | <?php
namespace App\Modules\Character\Application\Contracts;
use App\Modules\Character\Domain\LocationId;
interface LocationRepositoryInterface
{
public function nextIdentity(): LocationId;
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Contracts/RaceRepositoryInterface.php | app/Modules/Character/Application/Contracts/RaceRepositoryInterface.php | <?php
namespace App\Modules\Character\Application\Contracts;
use App\Modules\Character\Domain\Race;
interface RaceRepositoryInterface
{
public function getOne(int $raceId): Race;
}
| php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Contracts/CharacterRepositoryInterface.php | app/Modules/Character/Application/Contracts/CharacterRepositoryInterface.php | <?php
namespace App\Modules\Character\Application\Contracts;
use App\Modules\Character\Domain\Character;
use App\Modules\Character\Domain\CharacterId;
interface CharacterRepositoryInterface
{
public function nextIdentity(): CharacterId;
public function add(Character $character): void;
public function g... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Factories/CharacterFactory.php | app/Modules/Character/Application/Factories/CharacterFactory.php | <?php
namespace App\Modules\Character\Application\Factories;
use App\Modules\Character\Application\Commands\CreateCharacterCommand;
use App\Modules\Character\Domain\CharacterId;
use App\Modules\Character\Domain\CharacterType;
use App\Modules\Character\Domain\Race;
use App\Modules\Equipment\Domain\Inventory;
use App\... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Commands/CreateCharacterCommand.php | app/Modules/Character/Application/Commands/CreateCharacterCommand.php | <?php
namespace App\Modules\Character\Application\Commands;
class CreateCharacterCommand
{
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $gender;
/**
* @var string
*/
private $type;
/**
* @var int
*/
private $raceId;
/*... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Commands/MoveCharacterCommand.php | app/Modules/Character/Application/Commands/MoveCharacterCommand.php | <?php
namespace App\Modules\Character\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class MoveCharacterCommand
{
/**
* @var CharacterId
*/
private $characterId;
/**
* @var string
*/
private $locationId;
public function __construct(CharacterId $charact... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Commands/AttackCharacterCommand.php | app/Modules/Character/Application/Commands/AttackCharacterCommand.php | <?php
namespace App\Modules\Character\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class AttackCharacterCommand
{
/**
* @var CharacterId
*/
private $attackerId;
/**
* @var CharacterId
*/
private $defenderId;
public function __construct(CharacterId $at... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/Application/Commands/IncreaseAttributeCommand.php | app/Modules/Character/Application/Commands/IncreaseAttributeCommand.php | <?php
namespace App\Modules\Character\Application\Commands;
use App\Modules\Character\Domain\CharacterId;
class IncreaseAttributeCommand
{
/**
* @var CharacterId
*/
private $characterId;
/**
* @var string
*/
private $attribute;
public function __construct(CharacterId $chara... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
mchekin/rpg | https://github.com/mchekin/rpg/blob/5e4b129f4c9a132e5f4841029dfb18436bb393b3/app/Modules/Character/UI/Http/CommandMappers/IncreaseAttributeCommandMapper.php | app/Modules/Character/UI/Http/CommandMappers/IncreaseAttributeCommandMapper.php | <?php
namespace App\Modules\Character\UI\Http\CommandMappers;
use App\Modules\Character\Application\Commands\IncreaseAttributeCommand;
use App\Modules\Character\Domain\CharacterId;
use Illuminate\Http\Request;
class IncreaseAttributeCommandMapper
{
public function map(string $characterId, Request $request): Inc... | php | MIT | 5e4b129f4c9a132e5f4841029dfb18436bb393b3 | 2026-01-05T02:14:36.098984Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.