Skip to content

Instantly share code, notes, and snippets.

@kokamvd
kokamvd / ExceptionExample.php
Created October 17, 2022 08:39
Exception example
<?php
namespace App\Containers\AppSection\Branch\Exceptions;
use App\Ship\Parents\Exceptions\Exception as ParentException;
use Symfony\Component\HttpFoundation\Response;
class ExampleException extends ParentException
{
protected $code = Response::HTTP_NOT_FOUND;
@kokamvd
kokamvd / ExampleValidationException.php
Created October 17, 2022 08:50
ExampleValidationException
<?php
namespace App\Containers\AppSection\Branch\Exceptions;
use App\Ship\Parents\Exceptions\ValidationException as ParentValidationException;
class ExampleValidationException extends ParentValidationException
{
protected string $scope = 'E_EXAMPLE';
protected string $textCode = 'E_EXAMPLE_TEXT_CODE';
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};