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 | |
function number2words(int $number): string | |
{ | |
if ($number < 20) { | |
return ones2words($number); | |
} elseif ($number < 100) { | |
return tens2words($number); | |
} elseif ($number < 1000) { | |
return hundreds2words($number); |
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 Tests\Asserts; | |
use App\Domain\Stock\Enum\StocktakingStatus; | |
use App\Domain\Stock\Resource\StorageBatchResource; | |
use Carbon\Carbon; | |
use DateTimeInterface; | |
use Illuminate\Testing\Fluent\AssertableJson; | |
use OutOfBoundsException; |
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\Exceptions; | |
use ArrayIterator; | |
use Closure; | |
use Countable; | |
use Exception; | |
use Illuminate\Support\Collection; | |
use IteratorAggregate; |
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\PHPStan\Rules; | |
use Illuminate\Database\Eloquent\Builder as EloquentBuilder; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Query\Builder; | |
use Illuminate\Support\Facades\DB; | |
use PhpParser\Node; | |
use PhpParser\Node\Expr\MethodCall; |
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 Carbon\Carbon; | |
use Carbon\CarbonPeriod; | |
use Illuminate\Support\Collection; | |
$period = collect(CarbonPeriod::since(Carbon::parse('-1year'))->days(1)->until(Carbon::now())) | |
->concat(CarbonPeriod::since(Carbon::parse('-1week'))->hours(1)->until(Carbon::now())) | |
->concat(CarbonPeriod::since(Carbon::parse('-1day'))->minutes(30)->until(Carbon::now())); |
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\Eloquent\Concerns; | |
use Illuminate\Database\Eloquent\Model as IlluminateModel; | |
use Illuminate\Support\Arr; | |
use Vinkla\Hashids\Facades\Hashids; | |
trait HasHashId | |
{ |
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 Astrotomic\FogTradeSdk\Attributes; | |
use Attribute; | |
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY)] | |
class CastToData | |
{ | |
public function __construct( |
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\View\Components; | |
use Astrotomic\Imgix\Facades\Imgix; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Collection; | |
use Illuminate\Support\Facades\File; | |
use Illuminate\Support\Str; |
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 YAML = require('yaml'); | |
const fs = require('fs-extra'); | |
const path = require('path'); | |
const glob = require('glob'); | |
const fetch = require('node-fetch'); | |
const puppeteer = require('puppeteer'); | |
const slugify = require('slugify'); | |
const { exec } = require("child_process"); | |
const nunjucks = require('nunjucks'); |
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 Hospitable\Avalara\DTOs; | |
use Carbon\CarbonInterface; | |
use Hospitable\Avalara\Collections\Collection; | |
use Illuminate\Contracts\Support\Arrayable; | |
use Illuminate\Contracts\Support\Jsonable; | |
use JsonSerializable; | |
use ReflectionClass; |