Skip to content

Instantly share code, notes, and snippets.

View koyablue's full-sized avatar
👾
Thriving

koyablue

👾
Thriving
View GitHub Profile
@koyablue
koyablue / test.php
Last active January 27, 2021 02:50
test
class Sample
{
public function test()
{
echo 'aaaaaaa!!';
}
}
<?php
interface Vehicle
{
public function run();
public function stop();
public function manipulateWindows(string $openOrClose);
<?php
class Controller
{
private $service;
public function __construct(EmailLibInterface $service)
{
$this->service = $service;
}
<?php
class NotificationController
{
private $service;
public function __construct(NotificationServiceInterface $service)
{
$this->service = $service;
}
<?php
interface NotificationServiceInterface
{
public function send(int $notificationCode);
}
class UserNotificationService implements NotificationServiceInterface
{
//略
<?php echo 'Hello world'; php>
<?php
class FileImportController extends Controller
{
public function dummy(FileImportRequest $request)
{
$fileType = $request->file_type;
if ($fileType === config('values.file_type.office_work.value')) {
//do something
<?php
namespace App\Services\FileImport;
use App\Services\FileImport\Interface\FileImporterInterface;
class ImporterFactory
{
public function createImporter(): FileImporterInterface
{
<?php
namespace App\Services\FileImport\Interface;
use App\Models\Dto\FileImportDto;
interface FileImporterInterface
{
/**
* type
<?php
namespace App\Services\FileImport\Importer;
use App\Models\Dto\FileImportDto;
use App\Services\FileImport\Interface\FileImporterInterface;
class OfficeWorkJoblistFileImporter implements FileImporterInterface
{
public static function type(): int