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\Project; | |
use RecursiveCallbackFilterIterator; | |
use RecursiveDirectoryIterator; | |
use RecursiveIteratorIterator; | |
use SplFileInfo; | |
use Tests\Constraints; | |
use Tests\TestCase; |
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 Illuminate\Contracts\Debug\ExceptionHandler; | |
trait InteractsWithExceptionReports | |
{ | |
protected function expectsExceptionReport( | |
string|Closure $expected, | |
?string $message = null | |
) { |
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 | |
if (!function_exists('http_response_code')) { | |
function http_response_code($code = null) | |
{ | |
static $defaultCode = 200; | |
if (null != $code) { | |
switch ($code) { | |
case 100: $text = 'Continue'; break; // RFC2616 |
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\Support; | |
use InvalidArgumentException; | |
class Bytes | |
{ | |
// Most modern systems use base-1000 rather than base-1024 for file size now | |
protected const BASE = 1000; |
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 | |
$value = '4 mb'; | |
$units = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; | |
$aliases = ['k' => 1, 'kiB' => 1, 'm' => 2, 'MiB' => 2, 'g' => 3, 'GiB' => 3, 't' => 4, 'TiB' => 4, 'PiB' => 5, 'EiB' => 6, 'ZiB' => 7, 'YiB' => 8]; | |
preg_match('/([0-9,.]+)\s*([a-z]+)/i', $value, $matches); | |
[$_, $size, $unit] = $matches; |
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 Grammar from './Grammar.js'; | |
import Connection from './Connection.js'; | |
const operators = [ | |
'=', '<', '>', '<=', '>=', '<>', '!=', '<=>', | |
'like', 'like binary', 'not like', 'ilike', | |
'&', '|', '^', '<<', '>>', '&~', 'is', 'is not', | |
'rlike', 'not rlike', 'regexp', 'not regexp', | |
'~', '~*', '!~', '!~*', 'similar to', | |
'not similar to', 'not ilike', '~~*', '!~~*', |
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
<code_scheme name="Laravel" version="173"> | |
<option name="OTHER_INDENT_OPTIONS"> | |
<value> | |
<option name="USE_TAB_CHARACTER" value="true" /> | |
<option name="KEEP_INDENTS_ON_EMPTY_LINES" value="true" /> | |
</value> | |
</option> | |
<option name="LINE_SEPARATOR" value=" " /> | |
<CssCodeStyleSettings> | |
<option name="HEX_COLOR_LOWER_CASE" value="true" /> |
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 Illuminate\Support\Collection; | |
class Snapshots | |
{ | |
protected static ?self $instance = null; | |
public static function instance(): self | |
{ |
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
<div class="tailwind" x-data="{ age: 0, name: '', coppa: false }"> | |
<div class="border rounded-lg my-12 max-w-md"> | |
<div class="p-6"> | |
<h1 | |
class="mt-0" | |
x-show="$wizard.current().title !== ''" | |
x-text="$wizard.current().title" | |
></h1> | |
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
<form x-data="{ name: '', age: null, coppa: false }"> | |
<h1 x-text="$wizard.title"></h1> | |
<div x-wizard:step> | |
This step can be completed without doing anything. It's | |
just informational. | |
</div> | |
<div |