Dataset Viewer
Auto-converted to Parquet Duplicate
function_name
stringlengths
2
38
file_path
stringlengths
15
82
focal_code
stringlengths
232
4.12k
file_content
stringlengths
930
234k
language
stringclasses
1 value
function_component
dict
metadata
dict
get
Carbon/src/Carbon/AbstractTranslator.php
public static function get(?string $locale = null): static { $locale = $locale ?: 'en'; $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; $count = \count(static::$singletons); // Remember only the last 10 translators created if ($count > 10) {...
<?php declare(strict_types=1); /** * This file is part of the Carbon package. * * (c) Brian Nesbitt <brian@nesbot.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\MessageFormatter\MessageFormatt...
PHP
{ "end_line": 89, "name": "get", "signature": "public static function get(?string $locale = null): static", "start_line": 73 }
{ "class_name": "AbstractTranslator", "class_signature": "class AbstractTranslator", "namespace": "Carbon" }
resetMessages
Carbon/src/Carbon/AbstractTranslator.php
public function resetMessages(?string $locale = null): bool { if ($locale === null) { $this->messages = []; $this->catalogues = []; $this->modifyResources(static function (array $resources): array { foreach ($resources as &$list) { arra...
<?php declare(strict_types=1); /** * This file is part of the Carbon package. * * (c) Brian Nesbitt <brian@nesbot.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\MessageFormatter\MessageFormatt...
PHP
{ "end_line": 191, "name": "resetMessages", "signature": "public function resetMessages(?string $locale = null): bool", "start_line": 154 }
{ "class_name": "AbstractTranslator", "class_signature": "class AbstractTranslator", "namespace": "Carbon" }
prepareParameter
Carbon/src/Carbon/Callback.php
public function prepareParameter(mixed $value, string|int $index = 0): mixed { $type = $this->getParameterType($index); if (!($type instanceof ReflectionNamedType)) { return $value; } $name = $type->getName(); if ($name === CarbonInterface::class) { ...
<?php declare(strict_types=1); /** * This file is part of the Carbon package. * * (c) Brian Nesbitt <brian@nesbot.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Closure; use DateInterval; use DatePer...
PHP
{ "end_line": 78, "name": "prepareParameter", "signature": "public function prepareParameter(mixed $value, string|int $index = 0): mixed", "start_line": 53 }
{ "class_name": "Callback", "class_signature": "class Callback", "namespace": "Carbon" }
shiftTimezone
Carbon/src/Carbon/CarbonInterval.php
public function shiftTimezone(DateTimeZone|string|int $timezone): static { $this->timezoneSetting = $timezone; $this->checkStartAndEnd(); if ($this->startDate) { $this->startDate = $this->startDate ->avoidMutation() ->shiftTimezone($timezone); ...
<?php declare(strict_types=1); /** * This file is part of the Carbon package. * * (c) Brian Nesbitt <brian@nesbot.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Carbon; use Carbon\Constants\UnitValue; use Carbon...
PHP
{ "end_line": 353, "name": "shiftTimezone", "signature": "public function shiftTimezone(DateTimeZone|string|int $timezone): static", "start_line": 333 }
{ "class_name": "CarbonInterval", "class_signature": "class CarbonInterval implements CarbonConverterInterface, UnitValue", "namespace": "Carbon" }
createFromFormat
Carbon/src/Carbon/CarbonInterval.php
"public static function createFromFormat(string $format, ?string $interval): static\n {\n (...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{"end_line":764,"name":"createFromFormat","signature":"public static function createFromFormat(strin(...TRUNCATED)
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
diff
Carbon/src/Carbon/CarbonInterval.php
"public static function diff($start, $end = null, bool $absolute = false, array $skip = []): static\(...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{"end_line":1132,"name":"diff","signature":"public static function diff($start, $end = null, bool $a(...TRUNCATED)
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
make
Carbon/src/Carbon/CarbonInterval.php
"public static function make($interval, $unit = null, bool $skipCopy = false): ?self\n {\n (...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{"end_line":1240,"name":"make","signature":"public static function make($interval, $unit = null, boo(...TRUNCATED)
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
get
Carbon/src/Carbon/CarbonInterval.php
"public function get(Unit|string $name): int|float|string|null\n {\n $name = Unit::toName((...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{"end_line":1344,"name":"get","signature":"public function get(Unit|string $name): int|float|string|(...TRUNCATED)
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
set
Carbon/src/Carbon/CarbonInterval.php
"public function set($name, $value = null): static\n {\n $properties = \\is_array($name) ?(...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{"end_line":1461,"name":"set","signature":"public function set($name, $value = null): static","start(...TRUNCATED)
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
isEmpty
Carbon/src/Carbon/CarbonInterval.php
"public function isEmpty(): bool\n {\n return $this->years === 0 &&\n $this->mo(...TRUNCATED)
"<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) B(...TRUNCATED)
PHP
{ "end_line": 1506, "name": "isEmpty", "signature": "public function isEmpty(): bool", "start_line": 1496 }
{"class_name":"CarbonInterval","class_signature":"class CarbonInterval implements CarbonConverterInt(...TRUNCATED)
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
2