This file contains 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\Tests; | |
use App\Handler\KycHandler; | |
use PhpAmqpLib\Message\AMQPMessage; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | |
class KYCTest extends KernelTestCase |
This file contains 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; | |
class SlotCommand extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains 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 | |
class APINormalizer implements NormalizerInterface | |
{ | |
public function normalize($exception, string $format = null, array $context = []) | |
{ | |
if($exception instanceof NotFoundHttpException){ | |
return [ | |
'exception'=> [ | |
'message' => $exception->getMessage(), |
This file contains 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 | |
/** | |
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; |
This file contains 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
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){ |
This file contains 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
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 | |
} |