language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | laravel | framework | 06ddd7c7f350d4b4b9cfacf04b87d57f76c7d909.json | Apply fixes from StyleCI (#34533) | src/Illuminate/Database/Eloquent/Relations/MorphTo.php | @@ -152,8 +152,8 @@ protected function gatherKeysByType($type, $keyType)
return $keyType !== 'string'
? array_keys($this->dictionary[$type])
: array_map(function ($modelId) {
- return (string) $modelId;
- }, array_keys($thi... | false |
Other | laravel | framework | 9fd47f396505ddaa9c1bb0104e0c185b08476f58.json | Add perHour and perDay methods to RateLimiting
I have found my self using rate-limiting with hours and days quite often, in API subscriptions to be precise. | src/Illuminate/Cache/RateLimiting/Limit.php | @@ -58,6 +58,30 @@ public static function perMinute($maxAttempts)
return new static('', $maxAttempts);
}
+ /**
+ * Create a new rate limit using hours as decay time.
+ *
+ * @param int $maxAttempts
+ * @param int $decayHours
+ * @return static
+ */
+ public static funct... | false |
Other | laravel | framework | 87e6a786fe83b738eb42e16374e24f78ddb1a8af.json | Fix misspelling: dont -> don't | CHANGELOG-8.x.md | @@ -13,7 +13,7 @@
- Fixed problems with dots in validator ([#34355](https://github.com/laravel/framework/pull/34355))
- Maintenance mode: Fix empty Retry-After header ([#34412](https://github.com/laravel/framework/pull/34412))
- Fixed bug with error handling in closure scheduled tasks ([#34420](https://github.com/la... | false |
Other | laravel | framework | b084985496bc4ea227d77e17d7105c3b317b0467.json | Use letter abbreviation over undescore
Co-authored-by: Dries Vints <dries@vints.io> | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -915,7 +915,7 @@ protected function asDateTime($value)
// that is returned back out to the developers after we convert it here.
try {
$date = Date::createFromFormat($format, $value);
- } catch (InvalidArgumentException $_) {
+ } catch (InvalidArgumentException $e) {
... | false |
Other | laravel | framework | 56a0a254ab639d793ddec71c38bb4870744ce3f0.json | Use only root type in exception catch | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -916,7 +916,7 @@ protected function asDateTime($value)
// that is returned back out to the developers after we convert it here.
try {
$date = Date::createFromFormat($format, $value);
- } catch (InvalidFormatException | InvalidArgumentException $_) {
+ } catch (InvalidArgu... | false |
Other | laravel | framework | 647d226715f9600e0e61f36f33e1465eff535524.json | Add test to show the handle of special formats | tests/Database/DatabaseEloquentIntegrationTest.php | @@ -1413,6 +1413,34 @@ public function testTimestampsUsingOldSqlServerDateFormatFallbackToDefaultParsin
$this->assertFalse(Date::hasFormat('2017-11-14 08:23:19.734', $model->getDateFormat()));
}
+ public function testSpecialFormats()
+ {
+ $model = new EloquentTestUser;
+ $model->set... | false |
Other | laravel | framework | 94ad84680a190dc8a213a0a3947f4c3419bd06e2.json | Fix error catch to handle older Carbon versions | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -15,6 +15,7 @@
use Illuminate\Support\Collection as BaseCollection;
use Illuminate\Support\Facades\Date;
use Illuminate\Support\Str;
+use InvalidArgumentException;
use LogicException;
trait HasAttributes
@@ -915,7 +916,7 @@ protected function asDateTime($value)
// that is returned back out to the dev... | false |
Other | laravel | framework | 9c6653e43d374ca301e68c77a760cb9f62377b59.json | Allow modifiers in createFromFormat() | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -3,6 +3,7 @@
namespace Illuminate\Database\Eloquent\Concerns;
use Carbon\CarbonInterface;
+use Carbon\Exceptions\InvalidFormatException;
use DateTimeInterface;
use Illuminate\Contracts\Database\Eloquent\Castable;
use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes;
@@ -912,11 +913,13 @@ protecte... | false |
Other | laravel | framework | 285ef1c4b039f846c6683b2ccb80c3fb1b234aec.json | Fix docblocks again | src/Illuminate/Log/Events/MessageLogged.php | @@ -29,7 +29,7 @@ class MessageLogged
* Create a new event instance.
*
* @param string $level
- * @param mixed $message
+ * @param string $message
* @param array $context
* @return void
*/ | true |
Other | laravel | framework | 285ef1c4b039f846c6683b2ccb80c3fb1b234aec.json | Fix docblocks again | src/Illuminate/Log/Logger.php | @@ -197,7 +197,7 @@ public function listen(Closure $callback)
* Fires a log event.
*
* @param string $level
- * @param mixed $message
+ * @param string $message
* @param array $context
* @return void
*/ | true |
Other | laravel | framework | 4dc48a5d4811ae57466c982c3235120524dfb174.json | remove redundant use for Str from factory stub | src/Illuminate/Database/Console/Factories/stubs/factory.stub | @@ -3,7 +3,6 @@
namespace {{ factoryNamespace }};
use Illuminate\Database\Eloquent\Factories\Factory;
-use Illuminate\Support\Str;
use {{ namespacedModel }};
class {{ model }}Factory extends Factory | false |
Other | laravel | framework | 6b14a77eec4f70ae86fbf3570c5318c296caa8dc.json | Allow schema path on fresh (#34419) | src/Illuminate/Database/Console/Migrations/FreshCommand.php | @@ -48,6 +48,7 @@ public function handle()
'--database' => $database,
'--path' => $this->input->getOption('path'),
'--realpath' => $this->input->getOption('realpath'),
+ '--schema-path' => $this->input->getOption('schema-path'),
'--force' => true,
... | false |
Other | laravel | framework | 4f9300bfa4ea5103f16d9d9a05b933fb21cb83fb.json | Allow schema path on fresh | src/Illuminate/Database/Console/Migrations/FreshCommand.php | @@ -48,6 +48,7 @@ public function handle()
'--database' => $database,
'--path' => $this->input->getOption('path'),
'--realpath' => $this->input->getOption('realpath'),
+ '--schema-path' => $this->input->getOption('schema-path'),
'--force' => true,
... | false |
Other | laravel | framework | fb3f45aa0142764c5c29b97e8bcf8328091986e9.json | add method for marking password confirmed | src/Illuminate/Session/Store.php | @@ -637,6 +637,16 @@ public function setPreviousUrl($url)
$this->put('_previous.url', $url);
}
+ /**
+ * Specify that the user has confirmed their password.
+ *
+ * @return void
+ */
+ public function passwordConfirmed()
+ {
+ $this->put('auth.password_confirmed_at', time... | false |
Other | laravel | framework | 03e1373af9cf47e6d3378f19387d7ecf17a6b27b.json | Add doc blocks for HTTP facade assertions (#34393) | src/Illuminate/Support/Facades/Http.php | @@ -37,6 +37,11 @@
* @method static \Illuminate\Http\Client\Response put(string $url, array $data = [])
* @method static \Illuminate\Http\Client\Response send(string $method, string $url, array $options = [])
* @method static \Illuminate\Http\Client\ResponseSequence fakeSequence(string $urlPattern = '*')
+ * @met... | false |
Other | laravel | framework | 2d1d96272a94bce123676ed742af2d80ba628ba4.json | fix dots in attribute names | src/Illuminate/View/DynamicComponent.php | @@ -54,7 +54,7 @@ public function __construct(string $component)
public function render()
{
$template = <<<'EOF'
-<?php extract(collect($attributes->getAttributes())->mapWithKeys(function ($value, $key) { return [Illuminate\Support\Str::camel(str_replace(':', ' ', $key)) => $value]; })->all(), EXTR_S... | true |
Other | laravel | framework | 2d1d96272a94bce123676ed742af2d80ba628ba4.json | fix dots in attribute names | tests/Integration/View/BladeTest.php | @@ -30,7 +30,7 @@ public function test_rendering_a_dynamic_component()
{
$view = View::make('uses-panel-dynamically', ['name' => 'Taylor'])->render();
- $this->assertEquals('<div class="ml-2" wire:model="foo">
+ $this->assertEquals('<div class="ml-2" wire:model="foo" wire:model.lazy="bar">... | true |
Other | laravel | framework | 2d1d96272a94bce123676ed742af2d80ba628ba4.json | fix dots in attribute names | tests/Integration/View/templates/uses-panel-dynamically.blade.php | @@ -1,3 +1,3 @@
-<x-dynamic-component component="panel" class="ml-2" :name="$name" wire:model="foo">
+<x-dynamic-component component="panel" class="ml-2" :name="$name" wire:model="foo" wire:model.lazy="bar">
Panel contents
</x-dynamic-component> | true |
Other | laravel | framework | 0361686e40835a1f48674cf884d67609018d64b4.json | Update minimal.blade.php (#34379) | src/Illuminate/Foundation/Exceptions/views/minimal.blade.php | @@ -31,6 +31,7 @@
<div class="ml-4 text-lg text-gray-500 uppercase tracking-wider">
@yield('message')
</div>
+ </div>
</div>
</div>
</body> | false |
Other | laravel | framework | 602731ab8cc22f721f3777926022c24d519fb8c0.json | Move extension to $path | src/Illuminate/Foundation/Console/ComponentMakeCommand.php | @@ -54,7 +54,7 @@ public function handle()
protected function writeView()
{
$path = $this->viewPath(
- str_replace('.', '/', 'components.'.$this->getView())
+ str_replace('.', '/', 'components.'.$this->getView()).'.blade.php'
);
if (! $this->files->isDirector... | false |
Other | laravel | framework | ecb516445b06a15600f29e51738a409c2b9827ec.json | Show warning if view already exists | src/Illuminate/Foundation/Console/ComponentMakeCommand.php | @@ -61,6 +61,11 @@ protected function writeView()
$this->files->makeDirectory(dirname($path), 0777, true, true);
}
+ if ($this->files->exists($path) && ! $this->option('force')) {
+ $this->warn('View already exists');
+ return;
+ }
+
file_put_contents... | false |
Other | laravel | framework | ded87415833e3708b4994a4abe8c53575d17f24a.json | fix problems with dots in validator (#34355)
Co-authored-by: Taylor Otwell <taylorotwell@gmail.com> | src/Illuminate/Validation/Validator.php | @@ -314,22 +314,29 @@ protected function replacePlaceholders($data)
$originalData = [];
foreach ($data as $key => $value) {
- if (is_array($value)) {
- $value = $this->replacePlaceholders($value);
- }
-
- $key = str_replace(
- [$this->do... | true |
Other | laravel | framework | ded87415833e3708b4994a4abe8c53575d17f24a.json | fix problems with dots in validator (#34355)
Co-authored-by: Taylor Otwell <taylorotwell@gmail.com> | tests/Validation/ValidationValidatorTest.php | @@ -4932,6 +4932,51 @@ public function message()
$this->assertSame('validation.string', $v->errors()->get('name')[2]);
}
+ public function testCustomValidationObjectWithDotKeysIsCorrectlyPassedValue()
+ {
+ $v = new Validator(
+ $this->getIlluminateArrayTranslator(),
+ ... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/Log.php | @@ -14,6 +14,8 @@
* @method static void log($level, string $message, array $context = [])
* @method static void notice(string $message, array $context = [])
* @method static void warning(string $message, array $context = [])
+ * @method static void write(string $level, string $message, array $context = [])
+ * @m... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/Mail.php | @@ -14,14 +14,18 @@
* @method static bool hasQueued(string $mailable)
* @method static bool hasSent(string $mailable)
* @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, \Illuminate\Contracts\Mail\Mailable|string|array $view, string $queue = null)
+ * @method static mixed laterOn(string $que... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/Redirect.php | @@ -17,6 +17,7 @@
* @method static \Illuminate\Http\RedirectResponse to(string $path, int $status = 302, array $headers = [], bool $secure = null)
* @method static \Illuminate\Routing\UrlGenerator getUrlGenerator()
* @method static void setSession(\Illuminate\Session\Store $session)
+ * @method static void setInt... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/Route.php | @@ -36,6 +36,10 @@
* @method static void pattern(string $key, string $pattern)
* @method static void resources(array $resources)
* @method static void substituteImplicitBindings(\Illuminate\Support\Facades\Route $route)
+ * @method static boolean uses(...$patterns)
+ * @method static boolean is(...$patterns)
+ * ... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/URL.php | @@ -7,6 +7,7 @@
* @method static bool hasValidSignature(\Illuminate\Http\Request $request, bool $absolute = true)
* @method static string action(string $action, $parameters = [], bool $absolute = true)
* @method static string asset(string $path, bool $secure = null)
+ * @method static string secureAsset(string $p... | true |
Other | laravel | framework | 7f8ac4f4abee41215b7f421f0dc491c844aea7b9.json | add some missing phpDocs for facades (#34352) | src/Illuminate/Support/Facades/Validator.php | @@ -7,6 +7,7 @@
* @method static void extend(string $rule, \Closure|string $extension, string $message = null)
* @method static void extendImplicit(string $rule, \Closure|string $extension, string $message = null)
* @method static void replacer(string $rule, \Closure|string $replacer)
+ * @method static array val... | true |
Other | laravel | framework | e472489a2f231fe264c11699a056eb2204ea594e.json | Allow int value (#34349) | src/Illuminate/Validation/Rules/DatabaseRule.php | @@ -77,7 +77,7 @@ public function resolveTableName($table)
* Set a "where" constraint on the query.
*
* @param \Closure|string $column
- * @param array|string|null $value
+ * @param array|string|int|null $value
* @return $this
*/
public function where($column, $value = n... | false |
Other | laravel | framework | 0920c23efb9d7042d074729f2f70acbfec629c14.json | handle array hosts | src/Illuminate/Database/Schema/MySqlSchemaState.php | @@ -95,7 +95,7 @@ protected function baseDumpCommand()
protected function baseVariables(array $config)
{
return [
- 'LARAVEL_LOAD_HOST' => $config['host'],
+ 'LARAVEL_LOAD_HOST' => is_array($config['host']) ? $config['host'][0] : $config['host'],
'LARAVEL_LOAD_PORT'... | false |
Other | laravel | framework | 9e4a866cfb0420f4ea6cb4e86b1fbd97a4b8c264.json | fix broken feature | src/Illuminate/Database/Seeder.php | @@ -24,14 +24,14 @@ abstract class Seeder
protected $command;
/**
- * Seed the given connection from the given path.
+ * Run the given seeder class.
*
* @param array|string $class
* @param bool $silent
- * @param mixed ...$parameters
+ * @param array $parameters
... | true |
Other | laravel | framework | 9e4a866cfb0420f4ea6cb4e86b1fbd97a4b8c264.json | fix broken feature | tests/Database/DatabaseSeederTest.php | @@ -87,7 +87,7 @@ public function testSendParamsOnCallMethodWithDeps()
$seeder = new TestDepsSeeder;
$seeder->setContainer($container);
- $seeder->__invoke('test1', 'test2');
+ $seeder->__invoke(['test1', 'test2']);
$container->shouldHaveReceived('call')->once()->with([$seed... | true |
Other | laravel | framework | 452826b8f17ff07fcbba99523bb15b015b2d94f8.json | fix style ci errors | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -57,6 +57,7 @@
use Illuminate\Foundation\Console\ViewClearCommand;
use Illuminate\Notifications\Console\NotificationTableCommand;
use Illuminate\Queue\Console\BatchesTableCommand;
+use Illuminate\Queue\Console\ClearCommand as QueueClearCommand;
use Illuminate\Queue\Console\FailedTableCommand;
use Illuminate\Que... | true |
Other | laravel | framework | 452826b8f17ff07fcbba99523bb15b015b2d94f8.json | fix style ci errors | src/Illuminate/Queue/Console/ClearCommand.php | @@ -47,7 +47,7 @@ public function handle()
$queueName = $this->getQueue($connection);
$queue = ($this->laravel['queue'])->connection($connection);
- if($queue instanceof ClearableQueue) {
+ if ($queue instanceof ClearableQueue) {
$count = $queue->clear($queueName);
... | true |
Other | laravel | framework | 452826b8f17ff07fcbba99523bb15b015b2d94f8.json | fix style ci errors | src/Illuminate/Queue/DatabaseQueue.php | @@ -2,8 +2,8 @@
namespace Illuminate\Queue;
-use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Queue\ClearableQueue;
+use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Database\Connection;
use Illuminate\Queue\Jobs\DatabaseJob;
use Illuminate\Queue\Jobs\Databas... | true |
Other | laravel | framework | 452826b8f17ff07fcbba99523bb15b015b2d94f8.json | fix style ci errors | src/Illuminate/Queue/RedisQueue.php | @@ -2,8 +2,8 @@
namespace Illuminate\Queue;
-use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Queue\ClearableQueue;
+use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Queue\Jobs\RedisJob;
use Illuminate\Support\... | true |
Other | laravel | framework | efcb7e9ef40cbcc087331fec997853926219d72e.json | Return response from named limiter (#34325)
If a named limiter returns a Response object, the `handleRequestUsingNamedLimiter` tried to return the unset variable `$limit`.
Instead, it should return the actual response created by the named limiter. | src/Illuminate/Routing/Middleware/ThrottleRequests.php | @@ -85,7 +85,7 @@ protected function handleRequestUsingNamedLimiter($request, Closure $next, $limi
$limiterResponse = call_user_func($limiter, $request);
if ($limiterResponse instanceof Response) {
- return $limit;
+ return $limiterResponse;
} elseif ($limiterResponse ... | false |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Contracts/Queue/ClearableQueue.php | @@ -0,0 +1,14 @@
+<?php
+
+namespace Illuminate\Contracts\Queue;
+
+interface ClearableQueue
+{
+ /**
+ * Clear all jobs from the queue.
+ *
+ * @param string $queue
+ * @return int
+ */
+ public function clear($queue);
+} | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -65,6 +65,7 @@
use Illuminate\Queue\Console\RestartCommand as QueueRestartCommand;
use Illuminate\Queue\Console\RetryBatchCommand as QueueRetryBatchCommand;
use Illuminate\Queue\Console\RetryCommand as QueueRetryCommand;
+use Illuminate\Queue\Console\ClearCommand as QueueClearCommand;
use Illuminate\Queue\Consol... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Queue/Console/ClearCommand.php | @@ -0,0 +1,73 @@
+<?php
+
+namespace Illuminate\Queue\Console;
+
+use Illuminate\Console\Command;
+use Illuminate\Console\ConfirmableTrait;
+use Illuminate\Contracts\Queue\ClearableQueue;
+use ReflectionClass;
+
+class ClearCommand extends Command
+{
+ use ConfirmableTrait;
+
+ /**
+ * The console command nam... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Queue/DatabaseQueue.php | @@ -303,6 +303,19 @@ protected function markJobAsReserved($job)
return $job;
}
+ /**
+ * Clear all jobs from the queue.
+ *
+ * @param string $queue
+ * @return int
+ */
+ public function clear($queue)
+ {
+ return $this->database->table($this->table)
+ ... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Queue/LuaScripts.php | @@ -20,6 +20,24 @@ public static function size()
LUA;
}
+ /**
+ * Get the Lua script for clearing the queue.
+ *
+ * KEYS[1] - The name of the primary queue
+ * KEYS[2] - The name of the "delayed" queue
+ * KEYS[3] - The name of the "reserved" queue
+ *
+ * @return string
+ */... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | src/Illuminate/Queue/RedisQueue.php | @@ -3,11 +3,12 @@
namespace Illuminate\Queue;
use Illuminate\Contracts\Queue\Queue as QueueContract;
+use Illuminate\Contracts\Queue\ClearableQueue;
use Illuminate\Contracts\Redis\Factory as Redis;
use Illuminate\Queue\Jobs\RedisJob;
use Illuminate\Support\Str;
-class RedisQueue extends Queue implements QueueC... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | tests/Queue/QueueDatabaseQueueIntegrationTest.php | @@ -147,6 +147,35 @@ public function testPoppedJobsIncrementAttempts()
$this->assertEquals(1, $popped_job->attempts(), 'The "attempts" attribute of the Job object was not updated by pop!');
}
+ /**
+ * Test that the queue can be cleared.
+ */
+ public function testThatQueueCanBeCleared()
+... | true |
Other | laravel | framework | f34af246d57c51b320f9c5331936399daa9ee364.json | Add ability and command to clear queues | tests/Queue/RedisQueueIntegrationTest.php | @@ -414,6 +414,25 @@ public function testDelete($driver)
$this->assertNull($this->queue->pop());
}
+ /**
+ * @dataProvider redisDriverProvider
+ *
+ * @param string $driver
+ */
+ public function testClear($driver)
+ {
+ $this->setQueue($driver);
+
+ $job1 = new ... | true |
Other | laravel | framework | 9c61a908a1813c9508f4f88134e03f301f8b6293.json | fix styleci errors | src/Illuminate/Database/Console/Migrations/MigrateCommand.php | @@ -6,7 +6,6 @@
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\SchemaLoaded;
use Illuminate\Database\Migrations\Migrator;
-use Illuminate\Database\SQLiteConnection;
use Illuminate\Database\SqlServerConnection;
class MigrateCommand extends BaseCommand | true |
Other | laravel | framework | 9c61a908a1813c9508f4f88134e03f301f8b6293.json | fix styleci errors | src/Illuminate/Database/SQLiteConnection.php | @@ -9,7 +9,6 @@
use Illuminate\Database\Schema\SQLiteBuilder;
use Illuminate\Database\Schema\SqliteSchemaState;
use Illuminate\Filesystem\Filesystem;
-use RuntimeException;
class SQLiteConnection extends Connection
{ | true |
Other | laravel | framework | 9c61a908a1813c9508f4f88134e03f301f8b6293.json | fix styleci errors | src/Illuminate/Database/Schema/SqliteSchemaState.php | @@ -2,10 +2,6 @@
namespace Illuminate\Database\Schema;
-use Exception;
-use Illuminate\Support\Str;
-use Symfony\Component\Process\Process;
-
class SqliteSchemaState extends SchemaState
{
/** | true |
Other | laravel | framework | 93f461344051e8d44c4a50748b7bdc0eae18bcac.json | fix bug in dynamic attributes | src/Illuminate/View/ComponentAttributeBag.php | @@ -219,7 +219,7 @@ public function setAttributes(array $attributes)
unset($attributes['attributes']);
- $attributes = $parentBag->merge($attributes);
+ $attributes = $parentBag->merge($attributes)->getAttributes();
}
$this->attributes = $attributes; | false |
Other | laravel | framework | 4a953728f5e085342d793372329ae534e5885724.json | add new factory method | src/Illuminate/Database/Eloquent/Factories/HasFactory.php | @@ -12,8 +12,20 @@ trait HasFactory
*/
public static function factory(...$parameters)
{
- return Factory::factoryForModel(get_called_class())
+ $factory = static::newFactory() ?: Factory::factoryForModel(get_called_class());
+
+ return $factory
->count(is_numeri... | false |
Other | laravel | framework | 3af5110208e2f50865a31298375c9122ccccad12.json | create Faker when a Factory is created (#34298)
when we create a new Factory object, let's resolve the Faker instance and assign it to the local `$faker` property.
this allows us to access it everywhere in the Factory, including states, without the need for a closure. | src/Illuminate/Database/Eloquent/Factories/Factory.php | @@ -126,6 +126,7 @@ public function __construct($count = null,
$this->afterMaking = $afterMaking ?: new Collection;
$this->afterCreating = $afterCreating ?: new Collection;
$this->connection = $connection;
+ $this->faker = $this->withFaker();
}
/**
@@ -346,8 +347,6 @@ prote... | false |
Other | laravel | framework | 8723739746a53442a5ec5bdebe649f8a4d9dd3c2.json | fix problems with dots in validator | src/Illuminate/Validation/Validator.php | @@ -314,22 +314,29 @@ protected function replacePlaceholders($data)
$originalData = [];
foreach ($data as $key => $value) {
- if (is_array($value)) {
- $value = $this->replacePlaceholders($value);
- }
-
- $key = str_replace(
- [$this->do... | true |
Other | laravel | framework | 8723739746a53442a5ec5bdebe649f8a4d9dd3c2.json | fix problems with dots in validator | tests/Validation/ValidationValidatorTest.php | @@ -4932,6 +4932,51 @@ public function message()
$this->assertSame('validation.string', $v->errors()->get('name')[2]);
}
+ public function testCustomValidationObjectWithDotKeysIsCorrectlyPassedValue()
+ {
+ $v = new Validator(
+ $this->getIlluminateArrayTranslator(),
+ ... | true |
Other | laravel | framework | 7b4d0f793ea59c2e3fb743d0fcbcfa0f1e3b0bc2.json | Update DatabaseUuidFailedJobProvider.php (#34251) | src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php | @@ -89,7 +89,12 @@ public function all()
*/
public function find($id)
{
- return $this->getTable()->where('uuid', $id)->first();
+ if ($record = $this->getTable()->where('uuid', $id)->first()) {
+ $record->id = $record->uuid;
+ unset($record->uuid);
+ }
+
+ ... | false |
Other | laravel | framework | c7186e09204cb3ed72ab24fe9f25a6450c2512bb.json | fix bugs with factory creation | src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php | @@ -66,7 +66,14 @@ protected function buildClass($name)
$model = class_basename($namespaceModel);
+ if (Str::startsWith($namespaceModel, 'App\\Models')) {
+ $namespace = Str::beforeLast('Database\\Factories\\'.Str::after($namespaceModel, 'App\\Models\\'), '\\');
+ } else {
+ ... | true |
Other | laravel | framework | c7186e09204cb3ed72ab24fe9f25a6450c2512bb.json | fix bugs with factory creation | src/Illuminate/Database/Console/Factories/stubs/factory.stub | @@ -1,6 +1,6 @@
<?php
-namespace Database\Factories;
+namespace {{ factoryNamespace }};
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str; | true |
Other | laravel | framework | c7186e09204cb3ed72ab24fe9f25a6450c2512bb.json | fix bugs with factory creation | src/Illuminate/Foundation/Console/ModelMakeCommand.php | @@ -72,7 +72,7 @@ public function handle()
*/
protected function createFactory()
{
- $factory = Str::studly(class_basename($this->argument('name')));
+ $factory = Str::studly($this->argument('name'));
$this->call('make:factory', [
'name' => "{$factory}Factory", | true |
Other | laravel | framework | 13751a187834fabe515c14fb3ac1dc008fd23f37.json | add links property to JSON pagination responses | src/Illuminate/Pagination/LengthAwarePaginator.php | @@ -94,6 +94,36 @@ public function render($view = null, $data = [])
]));
}
+ /**
+ * Get the paginator links as a collection (for JSON responses).
+ *
+ * @return \Illuminate\Support\Collection
+ */
+ protected function linkCollection()
+ {
+ return collect($this->element... | false |
Other | laravel | framework | 75e792d61871780f75ecb4eb170826b0ba2f305e.json | respect local env | src/Illuminate/Foundation/Console/ServeCommand.php | @@ -93,7 +93,9 @@ public function handle()
protected function startProcess()
{
$process = new Process($this->serverCommand(), null, collect($_ENV)->mapWithKeys(function ($value, $key) {
- return [$key => false];
+ return $key === 'APP_ENV'
+ ? [$key => $value]... | false |
Other | laravel | framework | 5bf30a553a1478ae8d8b3f6791286c7936a19ed5.json | update doc block | src/Illuminate/Routing/Route.php | @@ -852,7 +852,7 @@ public function named(...$patterns)
/**
* Set the handler for the route.
*
- * @param \Closure|string $action
+ * @param \Closure|array|string $action
* @return $this
*/
public function uses($action) | false |
Other | laravel | framework | 9d54a3bbdf32d185a68e2261be1eca95ac071729.json | remove temp variable | src/Illuminate/Database/Schema/MySqlSchemaState.php | @@ -117,11 +117,9 @@ protected function executeDumpProcess(Process $process, $output, array $variable
$process->mustRun($output, $variables);
} catch (Exception $e) {
if (Str::contains($e->getMessage(), 'column_statistics')) {
- $process = Process::fromShellCommandLine(... | false |
Other | laravel | framework | d67be1305bef418d9bdeb8192177202f9d705699.json | update schema state | src/Illuminate/Database/Schema/MySqlSchemaState.php | @@ -2,6 +2,10 @@
namespace Illuminate\Database\Schema;
+use Exception;
+use Illuminate\Support\Str;
+use Symfony\Component\Process\Process;
+
class MySqlSchemaState extends SchemaState
{
/**
@@ -12,9 +16,9 @@ class MySqlSchemaState extends SchemaState
*/
public function dump($path)
{
- ... | false |
Other | laravel | framework | e0d58c60ac09317b1024955af3cf4bcdc29c2330.json | Correct PHPDoc return type (#34167) | src/Illuminate/Database/Eloquent/Collection.php | @@ -335,7 +335,7 @@ public function intersect($items)
*
* @param string|callable|null $key
* @param bool $strict
- * @return static|\Illuminate\Support\Collection
+ * @return static
*/
public function unique($key = null, $strict = false)
{ | false |
Other | laravel | framework | 3d4a013ec226b7163ade27eae03dcd705b55c968.json | Apply fixes from StyleCI (#34175) | src/Illuminate/Database/Schema/Blueprint.php | @@ -1595,7 +1595,7 @@ public function getChangedColumns()
}
/**
- * Determine if the blueprint has auto increment columns
+ * Determine if the blueprint has auto increment columns.
*
* @return bool
*/ | false |
Other | laravel | framework | a4f7e9bfd2a7d9453ea2b142aa486b2ba29df7e1.json | Apply fixes from StyleCI (#34174) | tests/Database/DatabaseMySqlSchemaGrammarTest.php | @@ -63,7 +63,7 @@ public function testAutoIncrementStartingValue()
$this->assertCount(2, $statements);
$this->assertSame("create table `users` (`id` int unsigned not null auto_increment primary key, `email` varchar(255) not null) default character set utf8 collate 'utf8_unicode_ci'", $statements[0])... | false |
Other | laravel | framework | e8977adcd4e9c624b4e90ad84e4395481b0c8ea7.json | Improve assertions for classes on Auth folder | tests/Auth/AuthAccessGateTest.php | @@ -328,7 +328,7 @@ public function testCurrentUserThatIsOnGateAlwaysInjectedIntoClosureCallbacks()
$gate = $this->getBasicGate();
$gate->define('foo', function ($user) {
- $this->assertEquals(1, $user->id);
+ $this->assertSame(1, $user->id);
return true;
... | true |
Other | laravel | framework | e8977adcd4e9c624b4e90ad84e4395481b0c8ea7.json | Improve assertions for classes on Auth folder | tests/Auth/AuthDatabaseUserProviderTest.php | @@ -28,7 +28,7 @@ public function testRetrieveByIDReturnsUserWhenUserIsFound()
$user = $provider->retrieveById(1);
$this->assertInstanceOf(GenericUser::class, $user);
- $this->assertEquals(1, $user->getAuthIdentifier());
+ $this->assertSame(1, $user->getAuthIdentifier());
$thi... | true |
Other | laravel | framework | e8977adcd4e9c624b4e90ad84e4395481b0c8ea7.json | Improve assertions for classes on Auth folder | tests/Auth/AuthPasswordBrokerTest.php | @@ -26,7 +26,7 @@ public function testIfUserIsNotFoundErrorRedirectIsReturned()
$broker = $this->getMockBuilder(PasswordBroker::class)->setMethods(['getUser', 'makeErrorRedirect'])->setConstructorArgs(array_values($mocks))->getMock();
$broker->expects($this->once())->method('getUser')->willReturn(null... | true |
Other | laravel | framework | e8977adcd4e9c624b4e90ad84e4395481b0c8ea7.json | Improve assertions for classes on Auth folder | tests/Auth/AuthTokenGuardTest.php | @@ -27,10 +27,10 @@ public function testUserCanBeRetrievedByQueryStringVariable()
$user = $guard->user();
- $this->assertEquals(1, $user->id);
+ $this->assertSame(1, $user->id);
$this->assertTrue($guard->check());
$this->assertFalse($guard->guest());
- $this->assertEq... | true |
Other | laravel | framework | 6061e9351c2e440fa51a7889a7558d63a81c0143.json | Apply fixes from StyleCI (#34152) | src/Illuminate/Foundation/Console/ServeCommand.php | @@ -113,8 +113,8 @@ protected function serverCommand()
return [
(new PhpExecutableFinder)->find(false),
'-S',
- $this->host() . ':' . $this->port(),
- base_path('server.php')
+ $this->host().':'.$this->port(),
+ base_path('server.php'),
... | false |
Other | laravel | framework | e0766cfd81a164bd5f0a0070216400b430d30185.json | Apply fixes from StyleCI (#34149) | src/Illuminate/Database/Schema/Blueprint.php | @@ -7,8 +7,8 @@
use Illuminate\Database\Connection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Query\Expression;
-use Illuminate\Database\SQLiteConnection;
use Illuminate\Database\Schema\Grammars\Grammar;
+use Illuminate\Database\SQLiteConnection;
use Illuminate\Support\Fluent;
use Illuminate... | false |
Other | laravel | framework | 29e4df7497bf0224ff82d6772ee7f109424990dc.json | add foreign id for methodgs | src/Illuminate/Database/Schema/Blueprint.php | @@ -5,9 +5,10 @@
use BadMethodCallException;
use Closure;
use Illuminate\Database\Connection;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Query\Expression;
-use Illuminate\Database\Schema\Grammars\Grammar;
use Illuminate\Database\SQLiteConnection;
+use Illuminate\Database\Schema\Grammars\Gramm... | false |
Other | laravel | framework | 82c3db492f0421e874aef8e097ac052c30b65f67.json | Remove incorrect return | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -616,7 +616,7 @@ public function aliasComponent($path, $alias = null)
*/
public function include($path, $alias = null)
{
- return $this->aliasInclude($path, $alias);
+ $this->aliasInclude($path, $alias);
}
/** | false |
Other | laravel | framework | 8af4f77d4c60f6d616e00c6c37eea731543f792d.json | Apply fixes from StyleCI (#34116) | src/Illuminate/Encryption/EncryptionServiceProvider.php | @@ -5,7 +5,6 @@
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Opis\Closure\SerializableClosure;
-use RuntimeException;
class EncryptionServiceProvider extends ServiceProvider
{ | false |
Other | laravel | framework | c0d7d3283abe6fb045920ae2ad06d288e9923772.json | Remove app assignment | src/Illuminate/Support/Manager.php | @@ -44,7 +44,6 @@ abstract class Manager
*/
public function __construct(Container $container)
{
- $this->app = $container;
$this->container = $container;
$this->config = $container->make('config');
} | false |
Other | laravel | framework | fcad5ec272c9406e2afa9f1fde25271920ca6e24.json | Remove deprecated method (#34099) | src/Illuminate/Collections/Traits/EnumeratesValues.php | @@ -723,21 +723,6 @@ public function uniqueStrict($key = null)
return $this->unique($key, true);
}
- /**
- * Take items in the collection until the given condition is met.
- *
- * This is an alias to the "takeUntil" method.
- *
- * @param mixed $value
- * @return static
- ... | false |
Other | laravel | framework | d338d13eec3ae899250ef4685fbeb85a198f7d2d.json | Remove additional comma | src/Illuminate/View/Concerns/ManagesComponents.php | @@ -114,7 +114,7 @@ protected function componentData()
$this->componentData[count($this->componentStack)],
['slot' => $defaultSlot],
$this->slots[count($this->componentStack)],
- ['__laravel_slots' => $slots],
+ ['__laravel_slots' => $slots]
);
... | false |
Other | laravel | framework | 27065599b5bb4f701de5e7f256bf863141b1d06a.json | Remove unnecessary comma | src/Illuminate/View/Concerns/ManagesComponents.php | @@ -114,7 +114,7 @@ protected function componentData()
$this->componentData[count($this->componentStack)],
['slot' => $defaultSlot],
$this->slots[count($this->componentStack)],
- ['__laravel_slots' => $slots],
+ ['__laravel_slots' => $slots]
);
... | false |
Other | laravel | framework | 5eed08c6a2cae6e897192b041076ac49c0192502.json | update model stub | src/Illuminate/Foundation/Console/stubs/model.stub | @@ -2,9 +2,10 @@
namespace {{ namespace }};
+use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class {{ class }} extends Model
{
- //
+ use HasFactory;
} | false |
Other | laravel | framework | 850c91f9a9f9e96a01bb3a3a891cdc2330937cf5.json | use tailwind by default | src/Illuminate/Pagination/AbstractPaginator.php | @@ -112,14 +112,14 @@ abstract class AbstractPaginator implements Htmlable
*
* @var string
*/
- public static $defaultView = 'pagination::bootstrap-4';
+ public static $defaultView = 'pagination::tailwind';
/**
* The default "simple" pagination view.
*
* @var string
... | false |
Other | laravel | framework | cadad245ff1d5e294ef6d3f312d66dc63f728619.json | prefix seeders automatically if necessary | src/Illuminate/Database/Console/Seeds/SeedCommand.php | @@ -83,6 +83,10 @@ protected function getSeeder()
{
$class = $this->input->getOption('class');
+ if (strpos($class, '\\') === false) {
+ $class = 'Database\\Seeders\\'.$class;
+ }
+
if ($class === 'Database\\Seeders\\DatabaseSeeder' &&
! class_exists($class... | false |
Other | laravel | framework | eb3c9e25a5bc2a96777e5e643ce0f612e4a544d9.json | implement array access | src/Illuminate/Testing/AssertableJsonString.php | @@ -2,13 +2,14 @@
namespace Illuminate\Testing;
+use ArrayAccess;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Testing\Assert as PHPUnit;
use JsonSerializable;
-class AssertableJsonString
+class AssertableJsonString implements ArrayAccess
... | false |
Other | laravel | framework | 06fa47c09419eacd7c82bfedaca41a0956ae6dc9.json | Add support for streamed reads (#34001) | src/Illuminate/Filesystem/FilesystemManager.php | @@ -208,8 +208,10 @@ public function createS3Driver(array $config)
$options = $config['options'] ?? [];
+ $streamReads = $config['stream_reads'] ?? false;
+
return $this->adapt($this->createFlysystem(
- new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options),... | false |
Other | laravel | framework | 384109ac016e651cb1da84f56b659b4097148139.json | Apply fixes from StyleCI (#33995) | src/Illuminate/Collections/Collection.php | @@ -1092,7 +1092,6 @@ public function chunkWhile(callable $callback)
$previous = $current;
}
-
$chunks[] = new static($chunk);
return new static($chunks); | false |
Other | laravel | framework | e422cedb76bfb689ea3873b37fdb8e4af9d81f79.json | add guard method | src/Illuminate/Session/Middleware/AuthenticateSession.php | @@ -35,12 +35,14 @@ public function __construct(AuthFactory $auth)
*/
public function handle($request, Closure $next)
{
+ $guard = $this->guard();
+
if (! $request->hasSession() || ! $request->user()) {
return $next($request);
}
- if ($this->auth->viaRememb... | false |
Other | laravel | framework | 7161c83d4f4a28300eb5d1e739c25e3fd7ec5deb.json | Allow nested errors in json assertion (#33989) | src/Illuminate/Testing/TestResponse.php | @@ -729,7 +729,7 @@ public function assertJsonValidationErrors($errors, $responseKey = 'errors')
PHPUnit::assertNotEmpty($errors, 'No validation errors were provided.');
- $jsonErrors = $this->json()[$responseKey] ?? [];
+ $jsonErrors = Arr::get($this->json(), $responseKey) ?? [];
... | true |
Other | laravel | framework | 7161c83d4f4a28300eb5d1e739c25e3fd7ec5deb.json | Allow nested errors in json assertion (#33989) | tests/Testing/TestResponseTest.php | @@ -611,6 +611,20 @@ public function testAssertJsonValidationErrorsCustomErrorsName()
$testResponse->assertJsonValidationErrors('foo', 'data');
}
+ public function testAssertJsonValidationErrorsCustomNestedErrorsName()
+ {
+ $data = [
+ 'status' => 'ok',
+ 'data' => ['... | true |
Other | laravel | framework | 0a3faed03e24cb5d633abc6cd53781b395952fd7.json | update factory count | src/Illuminate/Database/Eloquent/Factories/HasFactory.php | @@ -13,7 +13,7 @@ trait HasFactory
public static function factory(...$parameters)
{
return Factory::factoryForModel(get_called_class())
- ->count(is_numeric($parameters[0] ?? null) ? $parameters[0] : 1)
+ ->count(is_numeric($parameters[0] ?? null) ? $parameters[0... | false |
Other | laravel | framework | 46686ae80466bcdf6d9fe1931aeb1408f1f1f72a.json | simulate exit code for closure scheduled tasks | src/Illuminate/Console/Scheduling/CallbackEvent.php | @@ -5,6 +5,7 @@
use Illuminate\Contracts\Container\Container;
use InvalidArgumentException;
use LogicException;
+use Exception;
class CallbackEvent extends Event
{
@@ -76,12 +77,18 @@ public function run(Container $container)
$response = is_object($this->callback)
? $contain... | true |
Other | laravel | framework | 46686ae80466bcdf6d9fe1931aeb1408f1f1f72a.json | simulate exit code for closure scheduled tasks | tests/Console/Scheduling/CallbackEventTest.php | @@ -0,0 +1,61 @@
+<?php
+
+namespace Illuminate\Tests\Console\Scheduling;
+
+use Illuminate\Console\Scheduling\CallbackEvent;
+use Illuminate\Console\Scheduling\EventMutex;
+use Mockery as m;
+use Orchestra\Testbench\TestCase;
+use Exception;
+
+class CallbackEventTest extends TestCase
+{
+ protected function tearDo... | true |
Other | laravel | framework | e90b88bccf104aa90c307e0bcac74688365677b9.json | Remove deprecated method (#33865) | src/Illuminate/Database/Eloquent/Model.php | @@ -345,8 +345,6 @@ public function fill(array $attributes)
$totallyGuarded = $this->totallyGuarded();
foreach ($this->fillableFromArray($attributes) as $key => $value) {
- $key = $this->removeTableFromKey($key);
-
// The developers may choose to place some attributes in the ... | false |
Other | laravel | framework | 6cc389c9dbd5bf7337826a25f6f09cabfdbf58e8.json | Apply fixes from StyleCI (#33864) | src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php | @@ -3,7 +3,6 @@
namespace Illuminate\Database\Eloquent\Concerns;
use Illuminate\Support\Str;
-use LogicException;
trait GuardsAttributes
{ | false |
Other | laravel | framework | 25a313ae4de467b0eacc9d8c427704caed23fda7.json | remove old guarded protection | src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php | @@ -250,17 +250,4 @@ protected function fillableFromArray(array $attributes)
return $attributes;
}
-
- /**
- * Ensure the model has a valid guarded configuration.
- *
- * @return void
- */
- protected function ensureModelHasValidGuardState()
- {
- if (! empty($this->getGu... | true |
Other | laravel | framework | 25a313ae4de467b0eacc9d8c427704caed23fda7.json | remove old guarded protection | src/Illuminate/Database/Eloquent/Model.php | @@ -342,8 +342,6 @@ public static function isIgnoringTouch($class = null)
*/
public function fill(array $attributes)
{
- // $this->ensureModelHasValidGuardState();
-
$totallyGuarded = $this->totallyGuarded();
foreach ($this->fillableFromArray($attributes) as $key => $value) { | true |
Other | laravel | framework | a586ad4cf9bfac7ef3602fa770e96af4316c5ca4.json | Handle argon failures robustly (#33856) | src/Illuminate/Hashing/ArgonHasher.php | @@ -60,13 +60,13 @@ public function __construct(array $options = [])
*/
public function make($value, array $options = [])
{
- $hash = password_hash($value, $this->algorithm(), [
+ $hash = @password_hash($value, $this->algorithm(), [
'memory_cost' => $this->memory($options),
... | true |
Other | laravel | framework | a586ad4cf9bfac7ef3602fa770e96af4316c5ca4.json | Handle argon failures robustly (#33856) | tests/Hashing/HasherTest.php | @@ -51,6 +51,9 @@ public function testBasicArgon2idHashing()
$this->assertSame('argon2id', password_get_info($value)['algoName']);
}
+ /**
+ * @depends testBasicBcryptHashing
+ */
public function testBasicBcryptVerification()
{
$this->expectException(RuntimeException::class... | true |
Other | laravel | framework | 7cd8ca8a308dbc4a31a979fdb0e6684a836da86e.json | Implement LockProvider on DatabaseStore (#33844) | src/Illuminate/Cache/DatabaseStore.php | @@ -4,14 +4,15 @@
use Closure;
use Exception;
+use Illuminate\Contracts\Cache\LockProvider;
use Illuminate\Contracts\Cache\Store;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Database\PostgresConnection;
use Illuminate\Database\QueryException;
use Illuminate\Support\InteractsWithTime;
use Illum... | false |
Other | laravel | framework | d30bc52df0d290dec11c3822f26a89335d15d815.json | Apply fixes from StyleCI (#33861) | src/Illuminate/View/ComponentAttributeBag.php | @@ -117,7 +117,7 @@ public function whereStartsWith($string)
return Str::startsWith($key, $string);
});
}
-
+
/**
* Return a bag of attributes with keys that do not start with the given value / pattern.
* | false |
Other | laravel | framework | 5682bdbc2a14cd982c50981dadfe0df4634084da.json | Support Collection#countBy($key) (#33852) | src/Illuminate/Support/LazyCollection.php | @@ -248,9 +248,9 @@ public function crossJoin(...$arrays)
*/
public function countBy($countBy = null)
{
- if (is_null($countBy)) {
- $countBy = $this->identity();
- }
+ $countBy = is_null($countBy)
+ ? $this->identity()
+ : $this->valueRetriever($cou... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.