Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Tests;
use App\Handler\KycHandler;
use PhpAmqpLib\Message\AMQPMessage;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class KYCTest extends KernelTestCase
@sanslan
sanslan / sss.php
Created April 23, 2022 18:38
Test
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class SlotCommand extends Command
{
/**
* The name and signature of the console command.
<?php
class APINormalizer implements NormalizerInterface
{
public function normalize($exception, string $format = null, array $context = [])
{
if($exception instanceof NotFoundHttpException){
return [
'exception'=> [
'message' => $exception->getMessage(),
<?php
/**
There is a code supporting calculation if a car is damaged.
Now it should be extended to support calculating if a painting of car's exterior is damaged (this means, if a painting of any of car details is not OK - for example a door is scratched).
*/
abstract class CarDetail {
protected bool $isBroken;
protected bool $isPaintingDamaged;
function maskify(credit_card){
let credit_card_string = credit_card.toString()
let card_length = credit_card_string.length
if(card_length < 6){
return credit_card_string
}
let card_characters_array = credit_card.split('')
let masked = card_characters_array.map( (char,index) =>{
if(index === 0 || index > card_length -4){
@sanslan
sanslan / multiple_catch.js
Last active December 8, 2021 20:27
multiple catch
const express = require('express')
const app = express()
const port = 3000
const axios = require('axios')
async function get_users1(){
let users =await axios.get('https://jsonplaceholder.typicode.com/users')
return users.data
}