This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use App\TradingPair; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Support\Facades\Http; | |
| use JsonMapper\Cache\ArrayCache; | |
| use JsonMapper\Enums\TextNotation; | |
| use JsonMapper\JsonMapper; | |
| use JsonMapper\Middleware\CaseConversion; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use App\TradingPair; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\Http; | |
| use AutoMapperPlus\Configuration\AutoMapperConfig; | |
| use AutoMapperPlus\AutoMapper; | |
| use AutoMapperPlus\NameConverter\NamingConvention\CamelCaseNamingConvention; | |
| use AutoMapperPlus\NameConverter\NamingConvention\SnakeCaseNamingConvention; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Support\Facades\Http; | |
| use Symfony\Component\Serializer\Encoder\JsonEncoder; | |
| use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; | |
| use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; | |
| use Symfony\Component\Serializer\Serializer; | |
| use Symfony\Component\Serializer\NameConverter\CamelCaseToSnakeCaseNameConverter; | |
| class TradingPair { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Monolog\{ Logger, Processor, Handler}; | |
| class ElasticSearchLogCommand extends Command | |
| { | |
| /** @var string */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| echo (DatetimeImmutable ::createFromFormat ('U', 1540686600, new DateTimeZone('UTC'))) | |
| ->setTimeZone(new DateTimeZone('Europe/Amsterdam')) | |
| ->format('d-m-Y H:i:s (e P)'); | |
| // 28-10-2018 02:30:00 (Europe/Amsterdam +02:00) | |
| echo (DatetimeImmutable ::createFromFormat ('U', 1540690200, new DateTimeZone('UTC'))) | |
| ->setTimeZone(new DateTimeZone('Europe/Amsterdam')) | |
| ->format('d-m-Y H:i:s (e P)'); | |
| // 28-10-2018 02:30:00 (Europe/Amsterdam +01:00) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Option 1 | |
| public function onTodoWasMarkedAsDone(TodoWasMarkedAsDone $event) | |
| { | |
| $this->connection->update( | |
| Table::TODO, | |
| [ | |
| 'status' => $event->newStatus()->toString() | |
| ], | |
| [ | |
| 'id' => $event->todoId()->toString() |