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 |
|---|---|---|---|---|---|---|---|---|
spatie/laravel-twitter-streaming-api | https://github.com/spatie/laravel-twitter-streaming-api/blob/e9184ca8681e899a06dd671b8e7611be2c9c1168/src/TwitterStreamingApi.php | src/TwitterStreamingApi.php | <?php
namespace Spatie\LaravelTwitterStreamingApi;
use Illuminate\Contracts\Config\Repository;
use Spatie\TwitterStreamingApi\PublicStream;
use Spatie\TwitterStreamingApi\UserStream;
class TwitterStreamingApi
{
/** @var array */
protected array $config;
public function __construct(Repository $config)
... | php | MIT | e9184ca8681e899a06dd671b8e7611be2c9c1168 | 2026-01-05T02:14:55.782917Z | false |
spatie/laravel-twitter-streaming-api | https://github.com/spatie/laravel-twitter-streaming-api/blob/e9184ca8681e899a06dd671b8e7611be2c9c1168/tests/TestCase.php | tests/TestCase.php | <?php
namespace Spatie\LaravelTwitterStreamingApi\Test;
use Orchestra\Testbench\TestCase as Orchestra;
use Spatie\LaravelTwitterStreamingApi\TwitterStreamingApiFacade;
use Spatie\LaravelTwitterStreamingApi\TwitterStreamingApiServiceProvider;
abstract class TestCase extends Orchestra
{
protected function getPacka... | php | MIT | e9184ca8681e899a06dd671b8e7611be2c9c1168 | 2026-01-05T02:14:55.782917Z | false |
spatie/laravel-twitter-streaming-api | https://github.com/spatie/laravel-twitter-streaming-api/blob/e9184ca8681e899a06dd671b8e7611be2c9c1168/tests/FacadeTest.php | tests/FacadeTest.php | <?php
namespace Spatie\LaravelTwitterStreamingApi\Test;
use Spatie\TwitterStreamingApi\PublicStream;
use Spatie\TwitterStreamingApi\UserStream;
use TwitterStreamingApi;
class FacadeTest extends TestCase
{
/** @test */
public function it_can_return_a_public_stream()
{
$this->assertInstanceOf(Publi... | php | MIT | e9184ca8681e899a06dd671b8e7611be2c9c1168 | 2026-01-05T02:14:55.782917Z | false |
spatie/laravel-twitter-streaming-api | https://github.com/spatie/laravel-twitter-streaming-api/blob/e9184ca8681e899a06dd671b8e7611be2c9c1168/config/laravel-twitter-streaming-api.php | config/laravel-twitter-streaming-api.php | <?php
return [
/*
* To work with Twitter's Streaming API you'll need some credentials.
*
* If you don't have credentials yet, head over to https://developers.twitter.com/
*/
'handle' => env('TWITTER_HANDLE'),
'api_key' => env('TWITTER_API_KEY'),
'api_secret_key' => env('TWITTER_... | php | MIT | e9184ca8681e899a06dd671b8e7611be2c9c1168 | 2026-01-05T02:14:55.782917Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/phinx.php | phinx.php | <?php
require_once __DIR__ . '/vendor/autoload.php';
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds'
],
'environments' => [
'default_migration... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/seeds/PokedexSeeder.php | db/seeds/PokedexSeeder.php | <?php
declare(strict_types=1);
use Phinx\Seed\AbstractSeed;
class PokedexSeeder extends AbstractSeed
{
public function getDependencies()
{
return [
'PlayerSeeder',
];
}
public function run()
{
$data = [
['player_id' => 1],
['player_id' ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/seeds/PlayerSeeder.php | db/seeds/PlayerSeeder.php | <?php
declare(strict_types=1);
use Phinx\Seed\AbstractSeed;
class PlayerSeeder extends AbstractSeed
{
public function run()
{
$data = [
[
'name' => 'Ash Ketchum',
'avatar' => 'https://i1.sndcdn.com/avatars-000740962879-t7ox4k-t500x500.jpg',
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/seeds/MartItemSeeder.php | db/seeds/MartItemSeeder.php | <?php
declare(strict_types=1);
use App\Market\Domain\ValueObjects\Category;
use Phinx\Seed\AbstractSeed;
class MartItemSeeder extends AbstractSeed
{
public function run()
{
$now = (new DateTimeImmutable())->format('Y-m-d H:i:s');
$data = [
[
'name' => 'Antidote',
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210117190415_create_pokedex_pokemons_table.php | db/migrations/20210117190415_create_pokedex_pokemons_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePokedexPokemonsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('pokedex_pokemons');
$table->addColumn('pokedex_id', 'integer')
->addColumn('pokemon_id',... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20201227190351_create_players_table.php | db/migrations/20201227190351_create_players_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePlayersTable extends AbstractMigration
{
public function change(): void
{
$players = $this->table('players');
$players->addColumn('name', 'string', ['limit' => 60])
->addColumn('avatar', 'stri... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210117190045_create_pokedex_table.php | db/migrations/20210117190045_create_pokedex_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePokedexTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('pokedex');
$table->addColumn('player_id', 'integer')
->addForeignKey('player_id', 'players', 'i... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210102173838_create_cart_table.php | db/migrations/20210102173838_create_cart_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateCartTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('cart');
$table->addColumn('player_id', 'integer')
->addColumn('total', 'decimal', ['precision' => ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210102034434_add_pokemons_alias_column.php | db/migrations/20210102034434_add_pokemons_alias_column.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddPokemonsAliasColumn extends AbstractMigration
{
public function change(): void
{
$table = $this->table('pokemons');
$table->addColumn('alias', 'string', ['after' => 'name'])
->update();
}
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210102174613_create_mart_items_table.php | db/migrations/20210102174613_create_mart_items_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateMartItemsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('mart_items');
$table->addColumn('name', 'string', ['limit' => 60])
->addColumn('price', 'decim... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20210102180911_create_cart_items_table.php | db/migrations/20210102180911_create_cart_items_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateCartItemsTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('cart_items');
$table->addColumn('cart_id', 'integer')
->addColumn('mart_item_id', 'integer')
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20201229191400_create_battle_table.php | db/migrations/20201229191400_create_battle_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreateBattleTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('battles');
$table->addColumn('player1_id', 'integer')
->addColumn('pokemon1_id', 'integer')
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20201229004158_create_pokemon_table.php | db/migrations/20201229004158_create_pokemon_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePokemonTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('pokemons');
$table->addColumn('type_id', 'integer')
->addColumn('api_id', 'integer', ['null' => ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/db/migrations/20201228192130_create_pokemon_type_table.php | db/migrations/20201228192130_create_pokemon_type_table.php | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class CreatePokemonTypeTable extends AbstractMigration
{
public function change(): void
{
$table = $this->table('pokemon_types');
$table->addColumn('name', 'string', ['limit' => 100])
->addIndex(['name'], ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Domain/Battle.php | src/Battle/Domain/Battle.php | <?php
declare(strict_types=1);
namespace App\Battle\Domain;
use App\Battle\Domain\ValueObjects\BattlePokemon;
use App\Battle\Domain\ValueObjects\BattleStatus;
use App\Shared\Domain\Entity;
use DateTimeInterface;
final class Battle extends Entity
{
protected BattlePokemon $trainer1;
protected BattlePokemon $... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Domain/ValueObjects/BattlePokemon.php | src/Battle/Domain/ValueObjects/BattlePokemon.php | <?php
declare(strict_types=1);
namespace App\Battle\Domain\ValueObjects;
use App\Player\Domain\Player;
use App\Pokedex\Domain\Pokemon;
use JsonSerializable;
final class BattlePokemon implements JsonSerializable
{
private Pokemon $pokemon;
private ?Player $trainer;
private bool $hasTrainer;
public f... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Domain/ValueObjects/BattleStatus.php | src/Battle/Domain/ValueObjects/BattleStatus.php | <?php
declare(strict_types=1);
namespace App\Battle\Domain\ValueObjects;
use InvalidArgumentException;
use JsonSerializable;
final class BattleStatus implements JsonSerializable
{
public const STARTED = 'STARTED';
public const FINISHED = 'FINISHED';
private string $status;
public function __constr... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Domain/Factory/BattleFactory.php | src/Battle/Domain/Factory/BattleFactory.php | <?php
declare(strict_types=1);
namespace App\Battle\Domain\Factory;
use App\Battle\Domain\Battle;
use App\Battle\Domain\ValueObjects\BattleStatus;
use DateTimeImmutable;
final class BattleFactory
{
public static function create(array $values = [])
{
$battle = new Battle();
$battle->setCreate... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Adapters/Http/StartAction.php | src/Battle/Adapters/Http/StartAction.php | <?php
declare(strict_types=1);
namespace App\Battle\Adapters\Http;
use App\Battle\UseCases\StartBattle\InputBoundary;
use App\Battle\UseCases\StartBattle\StartBattle;
use App\Shared\Adapters\Http\PayloadAction;
class StartAction extends PayloadAction
{
private StartBattle $useCase;
public function __constr... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/Adapters/Repositories/BattleRepository.php | src/Battle/Adapters/Repositories/BattleRepository.php | <?php
declare(strict_types=1);
namespace App\Battle\Adapters\Repositories;
use App\Battle\Domain\Battle;
use App\Battle\Domain\Factory\BattleFactory;
use App\Battle\Domain\ValueObjects\BattlePokemon;
use App\Battle\Domain\ValueObjects\BattleStatus;
use App\Battle\UseCases\Contracts\BattleRepository as BattleReposito... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/UseCases/Contracts/BattleRepository.php | src/Battle/UseCases/Contracts/BattleRepository.php | <?php
declare(strict_types=1);
namespace App\Battle\UseCases\Contracts;
use App\Battle\Domain\Battle;
use App\Battle\Domain\ValueObjects\BattlePokemon;
interface BattleRepository
{
public function start(BattlePokemon $trainer, BattlePokemon $challenger): Battle;
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/UseCases/StartBattle/InputBoundary.php | src/Battle/UseCases/StartBattle/InputBoundary.php | <?php
declare(strict_types=1);
namespace App\Battle\UseCases\StartBattle;
use App\Shared\Helpers\DTO;
final class InputBoundary extends DTO
{
protected int $trainerId;
protected string $trainerPokemonAlias;
protected ?int $challengerId;
protected string $challengerPokemonAlias;
public function ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/UseCases/StartBattle/OutputBoundary.php | src/Battle/UseCases/StartBattle/OutputBoundary.php | <?php
declare(strict_types=1);
namespace App\Battle\UseCases\StartBattle;
use App\Shared\Helpers\DTO;
final class OutputBoundary extends DTO
{
protected int $id;
protected int $xpEarned;
protected float $moneyEarned;
protected string $status;
protected string $createdAt;
protected ?string $e... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/UseCases/StartBattle/StartBattle.php | src/Battle/UseCases/StartBattle/StartBattle.php | <?php
declare(strict_types=1);
namespace App\Battle\UseCases\StartBattle;
use App\Battle\Domain\ValueObjects\BattlePokemon;
use App\Battle\UseCases\Contracts\BattleRepository;
use App\Player\UseCases\Contracts\PlayerRepository;
use App\Pokedex\UseCases\Contracts\PokemonRepository;
use App\Pokedex\UseCases\Contracts\... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Battle/UseCases/StartBattle/StartBattleValidator.php | src/Battle/UseCases/StartBattle/StartBattleValidator.php | <?php
declare(strict_types=1);
namespace App\Battle\UseCases\StartBattle;
use App\Shared\Application\ValidationErrorEnum;
use App\Shared\Adapters\Contracts\ValidatorTool;
final class StartBattleValidator
{
private ValidatorTool $v;
public function __construct(ValidatorTool $validatorTool)
{
$th... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Player.php | src/Player/Domain/Player.php | <?php
declare(strict_types=1);
namespace App\Player\Domain;
use App\Shared\Domain\Entity;
use App\Shared\Domain\ValueObjects\Gender;
final class Player extends Entity
{
protected string $name;
protected string $avatar;
protected Gender $gender;
protected Bag $bag;
protected Party $party;
pro... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Party.php | src/Player/Domain/Party.php | <?php
declare(strict_types=1);
namespace App\Player\Domain;
use App\Player\Domain\Exceptions\PokemonLimitExceededException;
use App\Pokemon\Domain\Pokemon;
use App\Shared\Domain\Entity;
final class Party extends Entity
{
/**
* @var Pokemon[]
*/
protected array $pokemons = [];
public function ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Bag.php | src/Player/Domain/Bag.php | <?php
declare(strict_types=1);
namespace App\Player\Domain;
use App\Market\Domain\Item;
use App\Shared\Domain\Entity;
final class Bag extends Entity
{
protected Player $player;
/**
* @var Item[]
*/
protected array $items = [];
/**
* @var Item[]
*/
protected array $pokeballs... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Exceptions/PlayerNotFoundException.php | src/Player/Domain/Exceptions/PlayerNotFoundException.php | <?php
declare(strict_types=1);
namespace App\Player\Domain\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
use App\Shared\Exceptions\AppValidationException;
class PlayerNotFoundException extends AppValidationException
{
protected string $type = AppExceptionBase::TYPE_INVALID_INPUT;
protected string ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Exceptions/PokemonLimitExceededException.php | src/Player/Domain/Exceptions/PokemonLimitExceededException.php | <?php
declare(strict_types=1);
namespace App\Player\Domain\Exceptions;
use DomainException;
use Throwable;
class PokemonLimitExceededException extends DomainException
{
public function __construct($message = "Limite de Pokemons atingido", $code = 0, Throwable $previous = null)
{
parent::__construct(... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Factory/BagFactory.php | src/Player/Domain/Factory/BagFactory.php | <?php
declare(strict_types=1);
namespace App\Player\Domain\Factory;
use App\Player\Domain\Bag;
final class BagFactory
{
public static function create(array $values = []): Bag
{
$bag = new Bag();
if (empty($values)) {
return $bag;
}
$bag->fill($values);
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Factory/PlayerFactory.php | src/Player/Domain/Factory/PlayerFactory.php | <?php
declare(strict_types=1);
namespace App\Player\Domain\Factory;
use App\Player\Domain\Player;
use App\Shared\Domain\ValueObjects\Gender;
final class PlayerFactory
{
public static function create(array $values = []): Player
{
$player = new Player();
$player->setBag(BagFactory::create());
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Domain/Factory/PartyFactory.php | src/Player/Domain/Factory/PartyFactory.php | <?php
declare(strict_types=1);
namespace App\Player\Domain\Factory;
use App\Player\Domain\Party;
final class PartyFactory
{
public static function create(array $values = []): Party
{
$party = new Party();
if (empty($values)) {
return $party;
}
$party->fill($valu... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Adapters/Http/ProfilePageAction.php | src/Player/Adapters/Http/ProfilePageAction.php | <?php
declare(strict_types=1);
namespace App\Player\Adapters\Http;
use App\Shared\Adapters\Http\TemplateAction;
class ProfilePageAction extends TemplateAction
{
protected function handle(): string
{
return $this->presenter->render('profile.html.twig', [
'name' => 'Kildim',
'l... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Adapters/Http/ProfileAction.php | src/Player/Adapters/Http/ProfileAction.php | <?php
declare(strict_types=1);
namespace App\Player\Adapters\Http;
use App\Player\UseCases\Contracts\PlayerRepository;
use App\Shared\Application\ValidationErrorEnum;
use App\Shared\Exceptions\AppValidationException;
use App\Shared\Adapters\Http\PayloadAction;
class ProfileAction extends PayloadAction
{
private... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/Adapters/Repository/PlayerRepository.php | src/Player/Adapters/Repository/PlayerRepository.php | <?php
declare(strict_types=1);
namespace App\Player\Adapters\Repository;
use App\Player\Domain\Exceptions\PlayerNotFoundException;
use App\Player\Domain\Factory\PlayerFactory;
use App\Player\Domain\Player;
use App\Player\UseCases\Contracts\PlayerRepository as PlayerRepositoryInterface;
use App\Shared\Adapters\Contra... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Player/UseCases/Contracts/PlayerRepository.php | src/Player/UseCases/Contracts/PlayerRepository.php | <?php
declare(strict_types=1);
namespace App\Player\UseCases\Contracts;
use App\Player\Domain\Player;
interface PlayerRepository
{
public function get(int $pk): ?Player;
public function debitMoney(Player $player, float $money): bool;
public function addIntoBag(Player $player, array $items): bool;
pu... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Type.php | src/Pokedex/Domain/Type.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain;
use App\Shared\Domain\Entity;
final class Type extends Entity
{
protected string $name;
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
* @re... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Pokedex.php | src/Pokedex/Domain/Pokedex.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain;
use App\Player\Domain\Player;
use App\Shared\Domain\Entity;
final class Pokedex extends Entity
{
protected Player $player;
/**
* @var Pokemon[]
*/
protected array $pokemons;
public function addPokemon(Pokemon $pokemon)
{
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Pokemon.php | src/Pokedex/Domain/Pokemon.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain;
use App\Shared\Domain\Entity;
final class Pokemon extends Entity
{
protected string $name;
protected string $alias;
protected int $number;
protected float $height;
protected float $weight;
protected string $image;
protected Typ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Exceptions/PokedexNotFoundException.php | src/Pokedex/Domain/Exceptions/PokedexNotFoundException.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
use App\Shared\Exceptions\AppValidationException;
class PokedexNotFoundException extends AppValidationException
{
protected string $type = AppExceptionBase::TYPE_INVALID_INPUT;
protected strin... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Exceptions/PokemonNotFoundException.php | src/Pokedex/Domain/Exceptions/PokemonNotFoundException.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
use App\Shared\Exceptions\AppValidationException;
class PokemonNotFoundException extends AppValidationException
{
protected string $type = AppExceptionBase::TYPE_INVALID_INPUT;
protected strin... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Factory/PokedexFactory.php | src/Pokedex/Domain/Factory/PokedexFactory.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain\Factory;
use App\Player\Domain\Factory\PlayerFactory;
use App\Pokedex\Domain\Pokedex;
final class PokedexFactory
{
public static function create(array $values = []): Pokedex
{
$pokedex = new Pokedex();
$pokedex->setPlayer(PlayerFact... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Factory/TypeFactory.php | src/Pokedex/Domain/Factory/TypeFactory.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain\Factory;
use App\Pokedex\Domain\Type;
final class TypeFactory
{
public static function create(array $values = []): Type
{
$type = new Type();
if (empty($values)) {
return $type;
}
$type->fill($values);
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Domain/Factory/PokemonFactory.php | src/Pokedex/Domain/Factory/PokemonFactory.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Domain\Factory;
use App\Pokedex\Domain\Pokemon;
final class PokemonFactory
{
public static function create(array $values = []): Pokemon
{
$pokemon = new Pokemon();
$pokemon->setType(TypeFactory::create());
if (empty($values)) {
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Adapters/Http/SearchAction.php | src/Pokedex/Adapters/Http/SearchAction.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Adapters\Http;
use App\Pokedex\UseCases\Contracts\PokemonRepository;
use App\Shared\Adapters\Http\PayloadAction;
final class SearchAction extends PayloadAction
{
private PokemonRepository $repository;
public function __construct(PokemonRepository $reposi... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Adapters/Repository/PokemonRepository.php | src/Pokedex/Adapters/Repository/PokemonRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Adapters\Repository;
use App\Pokedex\Domain\Exceptions\PokemonNotFoundException;
use App\Pokedex\Domain\Factory\PokemonFactory;
use App\Pokedex\Domain\Factory\TypeFactory;
use App\Pokedex\Domain\Pokemon;
use App\Pokedex\UseCases\Contracts\PokemonRepository as Poke... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Adapters/Repository/TypeRepository.php | src/Pokedex/Adapters/Repository/TypeRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Adapters\Repository;
use App\Pokedex\Domain\Factory\TypeFactory;
use App\Pokedex\Domain\Type;
use App\Pokedex\UseCases\Contracts\TypeRepository as TypeRepositoryInterface;
use App\Shared\Adapters\Contracts\DatabaseDriver;
use App\Shared\Adapters\Contracts\QueryBui... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/Adapters/Repository/PokedexRepository.php | src/Pokedex/Adapters/Repository/PokedexRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\Adapters\Repository;
use App\Player\Domain\Player;
use App\Pokedex\Domain\Exceptions\PokedexNotFoundException;
use App\Pokedex\Domain\Factory\PokedexFactory;
use App\Pokedex\Domain\Factory\PokemonFactory;
use App\Pokedex\Domain\Pokedex;
use App\Pokedex\Domain\Poke... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/UseCases/Contracts/PokemonRepository.php | src/Pokedex/UseCases/Contracts/PokemonRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\UseCases\Contracts;
use App\Pokedex\Domain\Pokemon;
interface PokemonRepository
{
/**
* @param array $params
* @return Pokemon[]
*/
public function search(array $params): array;
public function get(int $pk): ?Pokemon;
public functio... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/UseCases/Contracts/TypeRepository.php | src/Pokedex/UseCases/Contracts/TypeRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\UseCases\Contracts;
use App\Pokedex\Domain\Type;
interface TypeRepository
{
public function findTypeByName(string $name): ?Type;
public function createType(Type $type): Type;
public function get(int $pk): ?Type;
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Pokedex/UseCases/Contracts/PokedexRepository.php | src/Pokedex/UseCases/Contracts/PokedexRepository.php | <?php
declare(strict_types=1);
namespace App\Pokedex\UseCases\Contracts;
use App\Player\Domain\Player;
use App\Pokedex\Domain\Pokedex;
use App\Pokedex\Domain\Pokemon;
interface PokedexRepository
{
public function getPlayerPokedex(Player $player): ?Pokedex;
public function markPokemonAsSeen(Player $player, P... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/CartItem.php | src/Market/Domain/CartItem.php | <?php
declare(strict_types=1);
namespace App\Market\Domain;
use App\Shared\Domain\Entity;
final class CartItem extends Entity
{
protected Item $item;
protected string $name;
protected float $price;
protected int $quantity;
protected float $total;
/**
* @return Item
*/
public f... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Cart.php | src/Market/Domain/Cart.php | <?php
declare(strict_types=1);
namespace App\Market\Domain;
use App\Player\Domain\Player;
use App\Shared\Domain\Entity;
use DateTimeInterface;
final class Cart extends Entity
{
protected Player $player;
protected float $total = 0;
protected int $count = 0;
protected DateTimeInterface $createdAt;
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Item.php | src/Market/Domain/Item.php | <?php
declare(strict_types=1);
namespace App\Market\Domain;
use App\Market\Domain\ValueObjects\Category;
use App\Shared\Domain\Entity;
use DateTimeInterface;
final class Item extends Entity
{
protected string $name;
protected float $price;
protected Category $category;
protected bool $isSalable = tr... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Exceptions/InsufficientMoneyException.php | src/Market/Domain/Exceptions/InsufficientMoneyException.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Exceptions;
use App\Shared\Exceptions\AppException;
class InsufficientMoneyException extends AppException
{
protected string $errorMessage = 'Jogador não tem dinheiro suficiente para esta compra';
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Exceptions/CreatePurchaseException.php | src/Market/Domain/Exceptions/CreatePurchaseException.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Exceptions;
use App\Shared\Exceptions\AppException;
class CreatePurchaseException extends AppException
{
protected string $errorMessage = 'Não foi possível fazer a compra.';
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Exceptions/MartItemNotFoundException.php | src/Market/Domain/Exceptions/MartItemNotFoundException.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Exceptions;
use App\Shared\Exceptions\AppValidationException;
class MartItemNotFoundException extends AppValidationException
{
protected string $errorMessage = 'Item do Mercado não foi encontrado';
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Exceptions/InvalidItemCategoryException.php | src/Market/Domain/Exceptions/InvalidItemCategoryException.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Exceptions;
use DomainException;
use Throwable;
class InvalidItemCategoryException extends DomainException
{
public function __construct(string $name, $code = 0, Throwable $previous = null)
{
parent::__construct("Categoria de Item '{$name}' ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/ValueObjects/Category.php | src/Market/Domain/ValueObjects/Category.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\ValueObjects;
use App\Market\Domain\Exceptions\InvalidItemCategoryException;
use JsonSerializable;
final class Category implements JsonSerializable
{
public const DEFAULT = 'DEFAULT';
public const POKEBALL = 'POKEBALL';
private string $name;
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Factory/CartFactory.php | src/Market/Domain/Factory/CartFactory.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Factory;
use App\Market\Domain\Cart;
use App\Player\Domain\Factory\PlayerFactory;
use DateTimeImmutable;
final class CartFactory
{
public static function create(array $values = []): Cart
{
$cart = new Cart();
$cart->setCreatedAt(new ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Factory/CartItemFactory.php | src/Market/Domain/Factory/CartItemFactory.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Factory;
use App\Market\Domain\CartItem;
final class CartItemFactory
{
public static function create(array $values = []): CartItem
{
$item = new CartItem();
if (empty($values)) {
return $item;
}
if (isse... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Domain/Factory/ItemFactory.php | src/Market/Domain/Factory/ItemFactory.php | <?php
declare(strict_types=1);
namespace App\Market\Domain\Factory;
use App\Market\Domain\Item;
use App\Market\Domain\ValueObjects\Category;
use DateTimeImmutable;
final class ItemFactory
{
public static function create(array $values = []): Item
{
$item = new Item();
if (empty($values)) {
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/GetItemAction.php | src/Market/Adapters/Http/GetItemAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\Contracts\ItemRepository;
use App\Shared\Adapters\Http\PayloadAction;
final class GetItemAction extends PayloadAction
{
private ItemRepository $repository;
public function __construct(ItemRepository $repository)
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/DeleteItemAction.php | src/Market/Adapters/Http/DeleteItemAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\DeleteItem\DeleteItem;
use App\Market\UseCases\DeleteItem\InputBoundary;
use App\Shared\Adapters\Http\PayloadAction;
final class DeleteItemAction extends PayloadAction
{
private DeleteItem $useCase;
public function _... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/CreateItemAction.php | src/Market/Adapters/Http/CreateItemAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\CreateItem\CreateItem;
use App\Market\UseCases\CreateItem\InputBoundary;
use App\Shared\Adapters\Http\PayloadAction;
final class CreateItemAction extends PayloadAction
{
private CreateItem $useCase;
public function _... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/ItemsListAction.php | src/Market/Adapters/Http/ItemsListAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\Contracts\MarketRepository;
use App\Shared\Adapters\Http\PayloadAction;
class ItemsListAction extends PayloadAction
{
private MarketRepository $marketRepository;
public function __construct(MarketRepository $marketRe... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/UpdateItemAction.php | src/Market/Adapters/Http/UpdateItemAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\UpdateItem\InputBoundary;
use App\Market\UseCases\UpdateItem\UpdateItem;
use App\Shared\Adapters\Http\PayloadAction;
final class UpdateItemAction extends PayloadAction
{
private UpdateItem $useCase;
public function _... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Http/PurchaseAction.php | src/Market/Adapters/Http/PurchaseAction.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Http;
use App\Market\UseCases\Purchase\InputBoundary;
use App\Market\UseCases\Purchase\Purchase;
use App\Shared\Adapters\Http\PayloadAction;
class PurchaseAction extends PayloadAction
{
private Purchase $useCase;
public function __construct(Purch... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Repository/ItemRepository.php | src/Market/Adapters/Repository/ItemRepository.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Repository;
use App\Market\Domain\Factory\ItemFactory;
use App\Market\Domain\Item;
use App\Market\UseCases\Contracts\ItemRepository as ItemRepositoryInterface;
use App\Shared\Adapters\Contracts\QueryBuilder\DeleteStatement;
use App\Shared\Adapters\Contract... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/Adapters/Repository/MarketRepository.php | src/Market/Adapters/Repository/MarketRepository.php | <?php
declare(strict_types=1);
namespace App\Market\Adapters\Repository;
use App\Market\Domain\Cart;
use App\Market\Domain\Exceptions\CreatePurchaseException;
use App\Market\Domain\Exceptions\InsufficientMoneyException;
use App\Market\Domain\Exceptions\MartItemNotFoundException;
use App\Market\Domain\Factory\ItemFac... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/CreateItem/InputBoundary.php | src/Market/UseCases/CreateItem/InputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\CreateItem;
use App\Shared\Helpers\DTO;
final class InputBoundary extends DTO
{
protected string $name;
protected float $price;
protected string $category;
protected bool $isSalable = true;
/**
* @return string
*/
public... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/CreateItem/OutputBoundary.php | src/Market/UseCases/CreateItem/OutputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\CreateItem;
use App\Shared\Helpers\DTO;
final class OutputBoundary extends DTO
{
protected int $id;
protected string $name;
protected float $price;
protected string $category;
protected string $createdAt;
protected bool $isSalable ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/CreateItem/CreateItem.php | src/Market/UseCases/CreateItem/CreateItem.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\CreateItem;
use App\Market\Domain\Factory\ItemFactory;
use App\Market\UseCases\Contracts\ItemRepository;
final class CreateItem
{
private ItemRepository $repository;
public function __construct(ItemRepository $repository)
{
$this->rep... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Contracts/ItemRepository.php | src/Market/UseCases/Contracts/ItemRepository.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\Contracts;
use App\Market\Domain\Item;
interface ItemRepository
{
public function getById(int $id): ?Item;
public function insert(Item $item): Item;
public function update(Item $item): Item;
public function delete(Item $item): Item;
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Contracts/MarketRepository.php | src/Market/UseCases/Contracts/MarketRepository.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\Contracts;
use App\Market\Domain\Cart;
use App\Market\Domain\Item;
use App\Player\Domain\Player;
interface MarketRepository
{
public function purchase(Cart $cart, Player $player): bool;
public function getMartItem(int $id): ?Item;
public funct... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/DeleteItem/InputBoundary.php | src/Market/UseCases/DeleteItem/InputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\DeleteItem;
use App\Shared\Helpers\DTO;
final class InputBoundary extends DTO
{
protected int $id;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/DeleteItem/OutputBoundary.php | src/Market/UseCases/DeleteItem/OutputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\DeleteItem;
use App\Shared\Helpers\DTO;
final class OutputBoundary extends DTO
{
protected int $id;
protected string $name;
protected float $price;
protected string $category;
protected string $createdAt;
protected bool $isSalable;... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/DeleteItem/DeleteItem.php | src/Market/UseCases/DeleteItem/DeleteItem.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\DeleteItem;
use App\Market\Domain\Factory\ItemFactory;
use App\Market\UseCases\Contracts\ItemRepository;
final class DeleteItem
{
private ItemRepository $repository;
public function __construct(ItemRepository $repository)
{
$this->rep... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Purchase/InputBoundary.php | src/Market/UseCases/Purchase/InputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\Purchase;
use App\Shared\Helpers\DTO;
final class InputBoundary extends DTO
{
protected int $playerId;
protected array $items;
/**
* @return int
*/
public function getPlayerId(): int
{
return $this->playerId;
}
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Purchase/OutputBoundary.php | src/Market/UseCases/Purchase/OutputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\Purchase;
use App\Shared\Helpers\DTO;
final class OutputBoundary extends DTO
{
protected array $player;
/**
* @return array
*/
public function getPlayer(): array
{
return $this->player;
}
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Purchase/PurchaseValidator.php | src/Market/UseCases/Purchase/PurchaseValidator.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\Purchase;
use App\Shared\Application\ValidationErrorEnum;
use App\Shared\Adapters\Contracts\ValidatorTool;
final class PurchaseValidator
{
private ValidatorTool $v;
public function __construct(ValidatorTool $validatorTool)
{
$this->v ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/Purchase/Purchase.php | src/Market/UseCases/Purchase/Purchase.php | <?php
namespace App\Market\UseCases\Purchase;
use App\Market\UseCases\Contracts\MarketRepository;
use App\Market\Domain\Factory\CartItemFactory;
use App\Player\UseCases\Contracts\PlayerRepository;
use App\Market\Domain\Factory\CartFactory;
use App\Shared\Exceptions\AppValidationException;
final class Purchase
{
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/UpdateItem/UpdateItem.php | src/Market/UseCases/UpdateItem/UpdateItem.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\UpdateItem;
use App\Market\Domain\Factory\ItemFactory;
use App\Market\UseCases\Contracts\ItemRepository;
final class UpdateItem
{
private ItemRepository $repository;
public function __construct(ItemRepository $repository)
{
$this->rep... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/UpdateItem/InputBoundary.php | src/Market/UseCases/UpdateItem/InputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\UpdateItem;
use App\Shared\Helpers\DTO;
final class InputBoundary extends DTO
{
protected int $id;
protected string $name;
protected float $price;
protected string $category;
protected bool $isSalable = true;
/**
* @return in... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Market/UseCases/UpdateItem/OutputBoundary.php | src/Market/UseCases/UpdateItem/OutputBoundary.php | <?php
declare(strict_types=1);
namespace App\Market\UseCases\UpdateItem;
use App\Shared\Helpers\DTO;
final class OutputBoundary extends DTO
{
protected int $id;
protected string $name;
protected float $price;
protected string $category;
protected string $createdAt;
protected bool $isSalable ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Application/ValidationErrorEnum.php | src/Shared/Application/ValidationErrorEnum.php | <?php
declare(strict_types=1);
namespace App\Shared\Application;
use App\Shared\Helpers\Enum;
final class ValidationErrorEnum extends Enum
{
public const REQUIRED = 'required';
public const EMPTY = 'empty';
public const MIN_LENGTH = 'min-length';
public const NOT_INTEGER = 'not-integer';
public ... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Exceptions/AppExceptionBase.php | src/Shared/Exceptions/AppExceptionBase.php | <?php
declare(strict_types=1);
namespace App\Shared\Exceptions;
interface AppExceptionBase
{
public const TYPE_INTERNAL_ERROR = 'INTERNAL_ERROR';
public const TYPE_INVALID_INTEGRATION = 'INVALID_INTEGRATION';
public const TYPE_INVALID_INPUT = 'INVALID_INPUT';
public function getDetails(): array;
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Exceptions/InvalidGenderException.php | src/Shared/Exceptions/InvalidGenderException.php | <?php
declare(strict_types=1);
namespace App\Shared\Exceptions;
use InvalidArgumentException;
use Throwable;
class InvalidGenderException extends InvalidArgumentException
{
public function __construct($message = "Gênero Inválido", $code = 0, Throwable $previous = null)
{
parent::__construct($message... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Exceptions/AppException.php | src/Shared/Exceptions/AppException.php | <?php
declare(strict_types=1);
namespace App\Shared\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
use Exception;
use Throwable;
abstract class AppException extends Exception implements AppExceptionBase
{
protected array $details;
protected string $type = AppExceptionBase::TYPE_INTERNAL_ERROR;
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Exceptions/RuntimeException.php | src/Shared/Exceptions/RuntimeException.php | <?php
declare(strict_types=1);
namespace App\Shared\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
class RuntimeException extends AppException
{
protected string $type = AppExceptionBase::TYPE_INTERNAL_ERROR;
protected string $errorMessage = 'Ocorreu um erro inesperado';
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Exceptions/AppValidationException.php | src/Shared/Exceptions/AppValidationException.php | <?php
declare(strict_types=1);
namespace App\Shared\Exceptions;
use App\Shared\Exceptions\AppExceptionBase;
class AppValidationException extends AppException
{
protected string $type = AppExceptionBase::TYPE_INVALID_INPUT;
protected string $errorMessage = 'Erro de Validação na Aplicação';
} | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Helpers/DTO.php | src/Shared/Helpers/DTO.php | <?php
declare(strict_types=1);
namespace App\Shared\Helpers;
abstract class DTO
{
private function __construct(array $data)
{
foreach ($data as $key => $value) {
if (mb_strstr($key, '_') !== false) {
$key = lcfirst(str_replace('_', '', ucwords($key, '_')));
}
... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Helpers/Enum.php | src/Shared/Helpers/Enum.php | <?php
declare(strict_types=1);
namespace App\Shared\Helpers;
use ReflectionClass;
abstract class Enum
{
private function __construct()
{}
public static function items(): array
{
$reflection = new ReflectionClass(static::class);
return $reflection->getConstants();
}
}
| php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Helpers/StringHelper.php | src/Shared/Helpers/StringHelper.php | <?php
declare(strict_types=1);
namespace App\Shared\Helpers;
final class StringHelper
{
public static function slugify(string $text): string
{
$text = preg_replace('~[^\pL\d]+~u', '-', $text);
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
$text = preg_replace('~[^-\w]+~', '', $... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
dersonsena/clean-arch-pokemon | https://github.com/dersonsena/clean-arch-pokemon/blob/c187b9dafff57a34b2683634ae71b907859be0e0/src/Shared/Domain/Entity.php | src/Shared/Domain/Entity.php | <?php
declare(strict_types=1);
namespace App\Shared\Domain;
use DateTimeInterface;
use JsonSerializable;
abstract class Entity implements JsonSerializable
{
protected int $id;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $i... | php | MIT | c187b9dafff57a34b2683634ae71b907859be0e0 | 2026-01-05T02:15:07.389392Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.