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
async determinarResultado(probabilidadeGanho: number, probabilidadebonus: number, id: number, gamecode: string) { | |
const resultadoAleatorio = Math.random() | |
const callpending = await this.getcall(id, gamecode) | |
let numeroAleatorio = 0 | |
if (callpending.length > 0 && callpending[0].status === "pending" && callpending[0].gamecode === `${gamecode}`) { | |
return { | |
result: "bonus", | |
gamecode: gamecode, | |
json: callpending[0].jsonname, |
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 | |
final class ActivateContractWithProof | |
{ | |
public function __construct( | |
private readonly ContractRepository $contractRepo, | |
private readonly CustomerRepository $customerRepo, | |
private readonly EventDispatcherInterface $eventDispatcher, | |
private readonly Validator $validator, | |
private readonly CacheSystem $cacheSystem |
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
import { Modal } from '@/components/Common/Modal/Modal' | |
import { EssentialInformations, PaymentDetail } from './components' | |
import { useFetchCustomerDetail } from '../../hooks' | |
import { useEffect } from 'react' | |
import { useToast } from '@chakra-ui/react' | |
export const ModalCustomerDetails = ({ isOpen, onClose, id }) => { | |
const toast = useToast() | |
const { dataCustomer, errorCustomer, fetchCustomer, loadingCustomer } = useFetchCustomerDetail() |
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
import React from 'react' | |
import { Button, FieldMessage, TextField } from '@/components/Form' | |
import ReCAPTCHA from 'react-google-recaptcha' | |
import { useForm } from '@/pages/SignIn/hooks' | |
export const SignInForm = ({ loading, handleModalIsOpen }) => { | |
const { handleSubmit, handleChange, setFieldValue, values, errors } = useForm({ | |
onSubmit: values => { | |
console.log({ values }) | |
// const { affiliateId, recaptcha, password } = values |
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 | |
use Swoole\Server as SwooleServer; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
function processMessage(AMQPQueue $queue, int $workerId): void | |
{ | |
// do something here... | |
} |
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 | |
declare(strict_types=1); | |
namespace App\Shared\Adapter\Contracts; | |
/** | |
* Interface Dto | |
*/ | |
interface Dto |
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
import React, { useEffect } from 'react' | |
import ReactApexChart from 'react-apexcharts' | |
import { Header } from '@/components' | |
import { OrderBookTable, LastTradesTable, OperationHistory, BuySellOffers, ArbitrationForm } from './components' | |
import { useBuySellOffersData } from './components/BuyOffersTable/useBuySellOffersData' | |
import { useArbitrationForm } from './components/ArbitrationForm/useArbitrationForm' | |
import { useOperationHistory } from './components/OperationHistory/useOperationHistory' | |
import { useOrderBook } from './components/OrderBookTable/useOrderBook' | |
import { useLastTrades } from './components/LastTradesTable/useLastTrades' |
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\Shared\Infra\Models; | |
use Illuminate\Auth\Authenticatable; | |
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; | |
use Illuminate\Database\Eloquent\Factories\HasFactory; | |
use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject; | |
class User extends ModelBase implements |
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\Shared\Utils; | |
use ArrayAccess; | |
use Countable; | |
use Iterator; | |
use JsonSerializable; | |
use RuntimeException; |
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
// Aqui seria o type dizendo todas as variáveis de estado que | |
// vocês precisarem, aqueles mesmos que vocês fazer com `useState()` | |
type NPSPageContextType = { | |
prop1: array, | |
prop2: number | |
} | |
// Aqui estamos de fato criando o estado e colocando-os dentro do contexto | |
// com seus valores iniciais, que é obrigatório | |
export const NPSPageContext = createContext<NPSPageContextType>({ |
NewerOlder