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
df40910d1e010d33d42cb450edca0e4e9da5ee67.json
Fix some docblocks
src/Illuminate/Database/Eloquent/Relations/MorphPivot.php
@@ -124,7 +124,7 @@ public function newQueryForRestoration($ids) /** * Get a new query to restore multiple models by their queueable IDs. * - * @param array<int> $ids + * @param array $ids * @return \Illuminate\Database\Eloquent\Builder */ protected function newQueryForColl...
true
Other
laravel
framework
df40910d1e010d33d42cb450edca0e4e9da5ee67.json
Fix some docblocks
src/Illuminate/Database/Migrations/Migrator.php
@@ -622,7 +622,7 @@ protected function note($message) /** * Fire the given event for the migration. * - * @param \Illuminate\Contracts\Database\Events\Migration $event + * @param \Illuminate\Contracts\Database\Events\MigrationEvent $event * @return void */ public function fir...
true
Other
laravel
framework
df40910d1e010d33d42cb450edca0e4e9da5ee67.json
Fix some docblocks
src/Illuminate/Database/Seeder.php
@@ -108,7 +108,7 @@ public function setCommand(Command $command) /** * Run the database seeds. * - * @return dynamic + * @return mixed * * @throws \InvalidArgumentException */
true
Other
laravel
framework
eb73a500f8bf3a42c3ca80845484589796ae5a55.json
Improve ForeignKeyDefinition meta class
src/Illuminate/Database/Schema/ForeignKeyDefinition.php
@@ -5,10 +5,12 @@ use Illuminate\Support\Fluent; /** - * @method ForeignKeyDefinition references(string $table) Specify the referenced table - * @method ForeignKeyDefinition on(string $column) Specify the referenced column + * @method ForeignKeyDefinition references(string|array $columns) Specify the referenced col...
false
Other
laravel
framework
469cd39793e3c514ac6e6472c065786b8802f4d9.json
add the `resource` method to the Gate contract this would need to be notes in the 5.9 upgrade guide (probably as a low priority).
src/Illuminate/Contracts/Auth/Access/Gate.php
@@ -126,4 +126,14 @@ public function forUser($user); * @return array */ public function abilities(); + + /** + * Define abilities for a resource. + * + * @param string $name + * @param string $class + * @param array|null $abilities + * @return $this + */ + p...
false
Other
laravel
framework
5c129ba119b6fce2a723cbe00e6dece0d4199c6b.json
call container instance directly
src/Illuminate/Notifications/Messages/MailMessage.php
@@ -4,6 +4,7 @@ use Traversable; use Illuminate\Mail\Markdown; +use Illuminate\Container\Container; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Renderable; @@ -281,6 +282,8 @@ protected function arrayOfAddresses($address) */ public function render() { - re...
false
Other
laravel
framework
841a28067b03979603e41dd80729cb8581a91e95.json
Fix a styling issue.
src/Illuminate/Database/Schema/Builder.php
@@ -4,9 +4,9 @@ use Closure; use LogicException; +use RuntimeException; use Doctrine\DBAL\Types\Type; use Illuminate\Database\Connection; -use RuntimeException; class Builder {
false
Other
laravel
framework
5cd131b48b5e8ba4ce36106ce9feaaf57889b1d1.json
Apply fixes from StyleCI (#28374)
src/Illuminate/Database/ConfigurationUrlParser.php
@@ -80,7 +80,7 @@ protected function getDriver($url) $alias = $url['scheme'] ?? null; if (! $alias) { - return null; + return; } return static::$driverAliases[$alias] ?? $alias;
false
Other
laravel
framework
a43424de299ec02e9e08a05c78d460ec1d054cd3.json
Move debug methods to the base query builder
src/Illuminate/Database/Eloquent/Builder.php
@@ -1293,16 +1293,6 @@ public function getMacro($name) return Arr::get($this->localMacros, $name); } - /** - * Debug the current query builder instance. - * - * @return void - */ - public function dd() - { - dd($this->toSql(), $this->getBindings()); - } - /** ...
true
Other
laravel
framework
a43424de299ec02e9e08a05c78d460ec1d054cd3.json
Move debug methods to the base query builder
src/Illuminate/Database/Query/Builder.php
@@ -2999,4 +2999,24 @@ public function __call($method, $parameters) static::throwBadMethodCallException($method); } + + /** + * Debug the current query builder instance. + * + * @return void + */ + public function dump() + { + dump($this->toSql(), $this->getBindings()); +...
true
Other
laravel
framework
7c75c1321bc4e29bf8c7b11fb2e3b83466549b96.json
Fix dispatcher issue.
src/Illuminate/Database/Migrations/Migrator.php
@@ -4,11 +4,11 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Illuminate\Events\Dispatcher; use Illuminate\Support\Collection; use Illuminate\Console\OutputStyle; use Illuminate\Filesystem\Filesystem; use Illuminate\Database\ConnectionResolverInterface as Resolver; -use Illuminate\Events\Dispat...
false
Other
laravel
framework
dc4ee4d34ff174c95b748ccfef271effe1b370d2.json
Add events to migrations
src/Illuminate/Database/MigrationServiceProvider.php
@@ -51,7 +51,11 @@ protected function registerMigrator() $this->app->singleton('migrator', function ($app) { $repository = $app['migration.repository']; - return new Migrator($repository, $app['db'], $app['files']); + $migrator = new Migrator($repository, $app['db'], $app['...
true
Other
laravel
framework
dc4ee4d34ff174c95b748ccfef271effe1b370d2.json
Add events to migrations
src/Illuminate/Database/Migrations/Migrator.php
@@ -8,9 +8,17 @@ use Illuminate\Console\OutputStyle; use Illuminate\Filesystem\Filesystem; use Illuminate\Database\ConnectionResolverInterface as Resolver; +use Illuminate\Events\Dispatcher; class Migrator { + /** + * The event dispatcher instance. + * + * @var \Illuminate\Contracts\Events\Dispatc...
true
Other
laravel
framework
200c0c0cff33f58c38377d7e16cd01122cfc5715.json
Add the `dd` method to the query builder
src/Illuminate/Database/Eloquent/Builder.php
@@ -13,6 +13,7 @@ use Illuminate\Database\Concerns\BuildsQueries; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; +use Illuminate\Database\Eloquent\Concerns\HasDebugMethods; /** * @property-read HigherOrderBuilderProxy $orWhere @@ -21,7 +22,7 @@ */ ...
true
Other
laravel
framework
200c0c0cff33f58c38377d7e16cd01122cfc5715.json
Add the `dd` method to the query builder
src/Illuminate/Database/Eloquent/Concerns/HasDebugMethods.php
@@ -0,0 +1,16 @@ +<?php + +namespace Illuminate\Database\Eloquent\Concerns; + +trait HasDebugMethods +{ + /** + * Debug the current query builder instance. + * + * @return void + */ + public function dd() + { + dd($this->toSql(), $this->getBindings()); + } +}
true
Other
laravel
framework
4c26157dac948f83e7ec252520760e66dd26ad85.json
Add missing period at the end of a paragraph.
README.md
@@ -20,7 +20,7 @@ Laravel is a web application framework with expressive, elegant syntax. We belie - [Robust background job processing](https://laravel.com/docs/queues). - [Real-time event broadcasting](https://laravel.com/docs/broadcasting). -Laravel is accessible, yet powerful, providing tools needed for large, r...
false
Other
laravel
framework
1b568d02e6e17e324e462a5259c67528767cbcbb.json
Add docblocs and change self to static.
src/Illuminate/Database/UrlParser.php
@@ -8,10 +8,16 @@ use function array_merge; use function preg_replace; use Illuminate\Support\Arr; +use InvalidArgumentException; class UrlParser { - private static $driverAliases = [ + /** + * The drivers aliases map. + * + * @var array + */ + protected static $driverAliases = [ ...
false
Other
laravel
framework
95d7e8250a728674962abeb2f09f0eebe31ac292.json
Apply @driesvints suggestions from code review. Co-Authored-By: mathieutu <oss@mathieutu.dev>
src/Illuminate/Database/DatabaseManager.php
@@ -151,7 +151,9 @@ protected function configuration($name) throw new InvalidArgumentException("Database [{$name}] not configured."); } - return $this->app->make(UrlParser::class)->parseDatabaseConfigWithUrl($config); + $urlParser = new UrlParser; + + return $urlParser->pars...
true
Other
laravel
framework
95d7e8250a728674962abeb2f09f0eebe31ac292.json
Apply @driesvints suggestions from code review. Co-Authored-By: mathieutu <oss@mathieutu.dev>
src/Illuminate/Database/UrlParser.php
@@ -22,14 +22,14 @@ class UrlParser /** * @var array */ - private $parsedUrl; + protected $parsedUrl; public static function getDriverAliases(): array { return self::$driverAliases; } - public static function addDriverAlias(string $alias, string $driver) + public...
true
Other
laravel
framework
95d7e8250a728674962abeb2f09f0eebe31ac292.json
Apply @driesvints suggestions from code review. Co-Authored-By: mathieutu <oss@mathieutu.dev>
tests/Database/DatabaseConnectionFactoryTest.php
@@ -13,7 +13,6 @@ class DatabaseConnectionFactoryTest extends TestCase { - /** @var DB */ protected $db; protected function setUp(): void
true
Other
laravel
framework
7604cfb4d6104999b05a15f2215e21252c8c2cc2.json
Fix recursive replacements in Str::replaceArray()
src/Illuminate/Support/Str.php
@@ -327,11 +327,15 @@ public static function random($length = 16) */ public static function replaceArray($search, array $replace, $subject) { - foreach ($replace as $value) { - $subject = static::replaceFirst($search, $value, $subject); + $segments = explode($search, $subject); ...
true
Other
laravel
framework
7604cfb4d6104999b05a15f2215e21252c8c2cc2.json
Fix recursive replacements in Str::replaceArray()
tests/Support/SupportStrTest.php
@@ -248,6 +248,7 @@ public function testReplaceArray() $this->assertEquals('foo/bar/baz/?', Str::replaceArray('?', ['foo', 'bar', 'baz'], '?/?/?/?')); $this->assertEquals('foo/bar', Str::replaceArray('?', ['foo', 'bar', 'baz'], '?/?')); $this->assertEquals('?/?/?', Str::replaceArray('x', ['fo...
true
Other
laravel
framework
c3c58f89451a92b95796b0df76b6de041636c709.json
Apply fixes from StyleCI (#28337)
src/Illuminate/Auth/Console/AuthMakeCommand.php
@@ -126,7 +126,7 @@ protected function compileControllerStub() protected function getViewPath($path) { return implode(DIRECTORY_SEPARATOR, [ - config('view.paths')[0] ?? resource_path('views'), $path + config('view.paths')[0] ?? resource_path('views'), $path, ]); }...
false
Other
laravel
framework
f7dc3f4e6a1fcb6fede971ab22427ff6d7cfa0ce.json
Add some more tests.
tests/Database/DatabaseConnectionFactoryTest.php
@@ -13,6 +13,7 @@ class DatabaseConnectionFactoryTest extends TestCase { + /** @var DB */ protected $db; protected function setUp(): void @@ -48,17 +49,47 @@ protected function tearDown(): void public function testConnectionCanBeCreated() { - $this->assertInstanceOf(PDO::class, $th...
true
Other
laravel
framework
f7dc3f4e6a1fcb6fede971ab22427ff6d7cfa0ce.json
Add some more tests.
tests/Database/DatabaseUrlParserTest.php
@@ -301,7 +301,7 @@ public function databaseUrls() 'Full example from doc with url overwriting parameters' => [ [ - 'url' => 'pgsql://root:pass@db/local', + 'url' => 'mysql://root:pass@db/local', 'driver' => 'mysql', ...
true
Other
laravel
framework
c91d6a515f68d7860d313627416a7158078830e3.json
Parse Database Url when creating connection.
src/Illuminate/Database/DatabaseManager.php
@@ -151,7 +151,7 @@ protected function configuration($name) throw new InvalidArgumentException("Database [{$name}] not configured."); } - return $config; + return $this->app->make(UrlParser::class)->parseDatabaseConfigWithUrl($config); } /**
true
Other
laravel
framework
c91d6a515f68d7860d313627416a7158078830e3.json
Parse Database Url when creating connection.
tests/Database/DatabaseConnectionFactoryTest.php
@@ -24,6 +24,10 @@ protected function setUp(): void 'database' => ':memory:', ]); + $this->db->addConnection([ + 'url' => 'sqlite:///:memory:', + ], 'url'); + $this->db->addConnection([ 'driver' => 'sqlite', 'read' => [ @@ -48,6 +52,8 @...
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Auth/EloquentUserProvider.php
@@ -65,7 +65,7 @@ public function retrieveByToken($identifier, $token) $model = $model->where($model->getAuthIdentifierName(), $identifier)->first(); if (! $model) { - return null; + return; } $rememberToken = $model->getRememberToken();
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
@@ -133,7 +133,7 @@ protected function whenLoaded($relationship, $value = null, $default = null) } if ($this->resource->{$relationship} === null) { - return null; + return; } return value($value);
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Console/Scheduling/CacheOverlappingStrategyTest.php
@@ -7,7 +7,7 @@ use Illuminate\Console\Scheduling\Event; use Illuminate\Console\Scheduling\CacheMutex; -class CacheMutexTest extends TestCase +class CacheOverlappingStrategyTest extends TestCase { /** * @var CacheMutex
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Notifications/NotificationMailMessageTest.php
@@ -5,7 +5,7 @@ use PHPUnit\Framework\TestCase; use Illuminate\Notifications\Messages\MailMessage; -class NotificationsMailMessageTest extends TestCase +class NotificationMailMessageTest extends TestCase { public function setUp() {
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/Blade/BladeEndSectionTest.php
@@ -2,7 +2,7 @@ namespace Illuminate\Tests\View\Blade; -class BladeStopTest extends AbstractBladeTestCase +class BladeEndSectionTest extends AbstractBladeTestCase { public function testStopSectionsAreCompiled() {
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/Blade/BladeIfIEmptyStatementsTest.php
@@ -2,7 +2,7 @@ namespace Illuminate\Tests\View\Blade; -class BladeIfEmptyStatementsTest extends AbstractBladeTestCase +class BladeIfIEmptyStatementsTest extends AbstractBladeTestCase { public function testIfStatementsAreCompiled() {
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/ViewFileViewFinderTest.php
@@ -5,7 +5,7 @@ use Mockery as m; use PHPUnit\Framework\TestCase; -class ViewFinderTest extends TestCase +class ViewFileViewFinderTest extends TestCase { public function tearDown() {
true
Other
laravel
framework
cfbaea07d799bbb8ae5791ddaca738adcc46092e.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/fixtures/section-exception-layout.php
@@ -1 +1 @@ -<?php echo $__env->yieldContent('content'); ?> +<?php echo $__env->yieldContent('content');
true
Other
laravel
framework
1e4b8a50d5075eb6693b908c57e75d87aadb3537.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/fixtures/section-exception-layout.php
@@ -1 +1,3 @@ -<?php echo $__env->yieldContent('content'); +<?php + +echo $__env->yieldContent('content');
false
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Auth/Access/Gate.php
@@ -527,7 +527,6 @@ protected function resolveAuthCallback($user, $ability, array $arguments) } return function () { - return null; }; } @@ -653,7 +652,7 @@ protected function resolvePolicyCallback($user, $ability, array $arguments, $pol protected function callPolicyB...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Auth/EloquentUserProvider.php
@@ -68,7 +68,7 @@ public function retrieveByToken($identifier, $token) )->first(); if (! $retrievedModel) { - return null; + return; } $rememberToken = $retrievedModel->getRememberToken();
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php
@@ -294,8 +294,6 @@ protected function retrieveUser($request, $channel) return $user; } } - - return null; } /**
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Cache/ArrayStore.php
@@ -24,7 +24,7 @@ class ArrayStore extends TaggableStore public function get($key) { if (! isset($this->storage[$key])) { - return null; + return; } $item = $this->storage[$key]; @@ -34,7 +34,7 @@ public function get($key) if ($expiresAt !== 0 && $th...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Cache/DynamoDbStore.php
@@ -151,7 +151,6 @@ public function many(array $keys) $now = Carbon::now(); return array_merge(collect(array_flip($keys))->map(function () { - return null; })->all(), collect($response['Responses'][$this->table])->mapWithKeys(function ($response) use ($now) { if ($th...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Cache/NullStore.php
@@ -21,7 +21,6 @@ class NullStore extends TaggableStore */ public function get($key) { - return null; } /**
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Database/Eloquent/Collection.php
@@ -141,7 +141,7 @@ public function loadMissing($relations) * @param array $path * @return void */ - protected function loadMissingRelation(Collection $models, array $path) + protected function loadMissingRelation(self $models, array $path) { $relation = array_shift($path);
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss
@@ -1,17 +1,16 @@ - // Body $body-bg: #f8fafc; // Typography -$font-family-sans-serif: "Nunito", sans-serif; +$font-family-sans-serif: 'Nunito', sans-serif; $font-size-base: 0.9rem; $line-height-base: 1.6; // Colors $blue: #3490dc; $indigo: #6574cd; $purple: #9561e2; -$pink: #f66D9b; +$pink: #f66d9b; $red...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss
@@ -1,4 +1,3 @@ - // Fonts @import url('https://fonts.googleapis.com/css?family=Nunito'); @@ -9,6 +8,6 @@ @import '~bootstrap/scss/bootstrap'; .navbar-laravel { - background-color: #fff; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); ...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
@@ -167,7 +167,7 @@ protected function whenLoaded($relationship, $value = null, $default = null) } if ($this->resource->{$relationship} === null) { - return null; + return; } return value($value);
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Mail/resources/views/html/themes/default.css
@@ -1,13 +1,15 @@ /* Base */ -body, body *:not(html):not(style):not(br):not(tr):not(code) { - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; +body, +body *:not(html):not(style):not(br):not(tr):not(code) { ...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
src/Illuminate/Queue/DatabaseQueue.php
@@ -199,8 +199,6 @@ public function pop($queue = null) if ($job = $this->getNextAvailableJob($queue)) { return $this->marshalJob($queue, $job); } - - return null; }); }
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Auth/AuthAccessGateTest.php
@@ -31,7 +31,6 @@ public function test_basic_closures_can_be_defined() public function test_before_can_take_an_array_callback_as_object() { $gate = new Gate(new Container, function () { - return null; }); $gate->before([new AccessGateTestBeforeCallback, 'allowEverything...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Database/DatabaseEloquentBuilderTest.php
@@ -1286,27 +1286,27 @@ class EloquentBuilderTestModelSelfRelatedStub extends Model public function parentFoo() { - return $this->belongsTo(EloquentBuilderTestModelSelfRelatedStub::class, 'parent_id', 'id', 'parent'); + return $this->belongsTo(self::class, 'parent_id', 'id', 'parent'); } ...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Database/DatabaseEloquentIntegrationTest.php
@@ -1600,17 +1600,17 @@ class EloquentTestUser extends Eloquent public function friends() { - return $this->belongsToMany(EloquentTestUser::class, 'friends', 'user_id', 'friend_id'); + return $this->belongsToMany(self::class, 'friends', 'user_id', 'friend_id'); } public function fr...
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Integration/Database/EloquentCollectionLoadMissingTest.php
@@ -99,7 +99,7 @@ class Comment extends Model public function parent() { - return $this->belongsTo(Comment::class); + return $this->belongsTo(self::class); } public function revisions()
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Integration/Database/EloquentModelLoadMissingTest.php
@@ -54,7 +54,7 @@ class Comment extends Model public function parent() { - return $this->belongsTo(Comment::class); + return $this->belongsTo(self::class); } }
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/Integration/Support/Fixtures/NullableManager.php
@@ -13,6 +13,5 @@ class NullableManager extends Manager */ public function getDefaultDriver() { - return null; } }
true
Other
laravel
framework
4ead2b347a909d990fd26cb33069070b09f802a2.json
Apply fixes from StyleCI [ci skip] [skip ci]
tests/View/fixtures/section-exception-layout.php
@@ -1 +1 @@ -<?php echo $__env->yieldContent('content'); ?> +<?php echo $__env->yieldContent('content');
true
Other
laravel
framework
a71b6683440be1285e62d69c3e933244b9277620.json
Add styleci config
.styleci.yml
@@ -0,0 +1,4 @@ +php: + preset: laravel +js: true +css: true
false
Other
laravel
framework
e83ae1de159776599d2c8d4f63a40bf5188472f4.json
Update auth stubs with @error blade directive
src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub
@@ -15,27 +15,27 @@ <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> <div class="col-md-6"> - <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-in...
true
Other
laravel
framework
e83ae1de159776599d2c8d4f63a40bf5188472f4.json
Update auth stubs with @error blade directive
src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub
@@ -21,13 +21,13 @@ <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> <div class="col-md-6"> - <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-in...
true
Other
laravel
framework
e83ae1de159776599d2c8d4f63a40bf5188472f4.json
Update auth stubs with @error blade directive
src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub
@@ -17,27 +17,27 @@ <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label> <div class="col-md-6"> - <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-in...
true
Other
laravel
framework
e83ae1de159776599d2c8d4f63a40bf5188472f4.json
Update auth stubs with @error blade directive
src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub
@@ -15,41 +15,41 @@ <label for="name" class="col-md-4 col-form-label text-md-right">{{ __('Name') }}</label> <div class="col-md-6"> - <input id="name" type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}...
true
Other
laravel
framework
c7a46f0c13b7f6b764c55bb741672bc557eada80.json
Apply fixes from StyleCI (#28264)
tests/Queue/QueueWorkerTest.php
@@ -243,7 +243,6 @@ public function test_job_based_max_retries() $this->assertNull($job->failedWith); } - public function test_job_based_failed_delay() { $job = new WorkerFakeJob(function ($job) { @@ -259,7 +258,6 @@ public function test_job_based_failed_delay() $this->assert...
false
Other
laravel
framework
46dd880e745421afb5e5f3a703096c3346e56b0f.json
implement method support
src/Illuminate/Queue/Queue.php
@@ -124,7 +124,7 @@ protected function createObjectPayload($job, $queue) 'displayName' => $this->getDisplayName($job), 'job' => 'Illuminate\Queue\CallQueuedHandler@call', 'maxTries' => $job->tries ?? null, - 'delay' => $job->delay ?? null, + 'delay' => $this-...
true
Other
laravel
framework
46dd880e745421afb5e5f3a703096c3346e56b0f.json
implement method support
tests/Queue/QueueWorkerTest.php
@@ -243,6 +243,23 @@ public function test_job_based_max_retries() $this->assertNull($job->failedWith); } + + public function test_job_based_failed_delay() + { + $job = new WorkerFakeJob(function ($job) { + throw new \Exception('Something went wrong.'); + }); + + $jo...
true
Other
laravel
framework
e9831b3b683c2135834ba5650f81ac531af7a244.json
Add wherePivotIn Test
tests/Integration/Database/EloquentBelongsToManyTest.php
@@ -524,13 +524,13 @@ public function test_where_pivot_on_string() $post = Post::create(['title' => Str::random()]); DB::table('posts_tags')->insert([ - ['post_id' => $post->id, 'tag_id' => $tag->id, 'flag' => 'empty'], + ['post_id' => $post->id, 'tag_id' => $tag->id, 'flag' =>...
false
Other
laravel
framework
2d40c94d4db099df09fec943ef3bbced03b97b78.json
Add wherePivot Tests
tests/Integration/Database/EloquentBelongsToManyTest.php
@@ -518,6 +518,38 @@ public function test_can_touch_related_models() $this->assertNotEquals('2017-10-10 10:10:10', Tag::find(300)->updated_at); } + public function test_where_pivot_on_string() + { + $tag = Tag::create(['name' => Str::random()]); + $post = Post::create(['title' => Str...
false
Other
laravel
framework
1bcad051b668b06ba3366560242d4f112e3a1860.json
Fix a styling issue.
src/Illuminate/Database/Schema/Builder.php
@@ -324,7 +324,7 @@ public function blueprintResolver(Closure $resolver) * * @param string $class * @param string $name - * @param string $type + * @param string $type * @return void * * @throws \Doctrine\DBAL\DBALException
true
Other
laravel
framework
1bcad051b668b06ba3366560242d4f112e3a1860.json
Fix a styling issue.
src/Illuminate/Database/Schema/MySqlBuilder.php
@@ -10,8 +10,7 @@ class MySqlBuilder extends Builder /** * MySqlBuilder constructor. * - * @param Connection $connection - * + * @param \Illuminate\Database\Connection $connection * @throws \Doctrine\DBAL\DBALException */ public function __construct(Connection $connecti...
true
Other
laravel
framework
1bcad051b668b06ba3366560242d4f112e3a1860.json
Fix a styling issue.
src/Illuminate/Database/Schema/Types/TinyInteger.php
@@ -18,7 +18,7 @@ class TinyInteger extends Type * Gets the SQL declaration snippet for a field of this type. * * @param array $fieldDeclaration - * @param AbstractPlatform $platform + * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform * @return string */ publi...
true
Other
laravel
framework
db8419641c6ccdc7d6e4673267027aba92868b53.json
Fix a styling issue.
tests/Integration/Database/SchemaBuilderTest.php
@@ -3,11 +3,11 @@ namespace Illuminate\Tests\Integration\Database\SchemaTest; use Doctrine\DBAL\Types\Type; -use Illuminate\Database\Schema\Grammars\SQLiteGrammar; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\T...
false
Other
laravel
framework
6cece2455c5894f4bd6202747fce244cc6c693f2.json
Apply fixes from StyleCI (#28222)
src/Illuminate/Routing/RedirectController.php
@@ -24,7 +24,7 @@ public function __invoke(Request $request, UrlGenerator $url) $destination = $parameters->pop(); $route = (new Route('GET', $destination, [ - 'as' => 'laravel_route_redirect_destination' + 'as' => 'laravel_route_redirect_destination', ]))->bind($reque...
false
Other
laravel
framework
de5d0c4830edf3ac3c697e6c7d31e63c9309e4da.json
Fix a styling issue.
src/Illuminate/Database/Schema/Types/TinyInteger.php
@@ -61,4 +61,4 @@ public function getName() { return self::NAME; } -} \ No newline at end of file +}
false
Other
laravel
framework
c97a8572eca62441705d7d39af3ecae000c35386.json
Fix a styling issue.
src/Illuminate/Database/Schema/Builder.php
@@ -3,8 +3,8 @@ namespace Illuminate\Database\Schema; use Closure; -use Doctrine\DBAL\Types\Type; use LogicException; +use Doctrine\DBAL\Types\Type; use Illuminate\Database\Connection; class Builder @@ -337,7 +337,7 @@ public function registerCustomDBALType($class, $name, $type) if (! Type::hasType(...
true
Other
laravel
framework
c97a8572eca62441705d7d39af3ecae000c35386.json
Fix a styling issue.
src/Illuminate/Database/Schema/Types/TinyInteger.php
@@ -2,8 +2,8 @@ namespace Illuminate\Database\Schema\Types; -use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\Type; +use Doctrine\DBAL\Platforms\AbstractPlatform; class TinyInteger extends Type {
true
Other
laravel
framework
c97a8572eca62441705d7d39af3ecae000c35386.json
Fix a styling issue.
tests/Integration/Database/SchemaBuilderTest.php
@@ -3,10 +3,10 @@ namespace Illuminate\Tests\Integration\Database\SchemaTest; use Doctrine\DBAL\Types\Type; -use Illuminate\Database\Schema\Types\TinyInteger; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Schema\Types\...
true
Other
laravel
framework
7c0d0f6baea9c89255e5da5a7df5ec0a0c5d9b82.json
Fix a styling issue.
src/Illuminate/Database/Schema/Builder.php
@@ -334,9 +334,10 @@ public function registerCustomDBALType($class, $name, $type) if (! $this->connection->isDoctrineAvailable()) { return; } - + if (! Type::hasType($name)) { Type::addType($name, $class); + $this->connection ...
false
Other
laravel
framework
eb5de12c443b10c8eb4936a5d09977adc43a2a54.json
Fix a styling issue.
src/Illuminate/Database/Schema/Builder.php
@@ -334,6 +334,7 @@ public function registerCustomDBALType($class, $name, $type) if (! $this->connection->isDoctrineAvailable()) { return; } + if (! Type::hasType($name)) { Type::addType($name, $class); $this->connection
false
Other
laravel
framework
f4b4844682f05c0740b1c8f94e16c332b8cd5933.json
Add getViews method to return views
src/Illuminate/View/FileViewFinder.php
@@ -319,4 +319,14 @@ public function getExtensions() { return $this->extensions; } + + /** + * Get registered views. + * + * @return array + */ + public function getViews() + { + return $this->views; + } }
false
Other
laravel
framework
4b9d3e78e6de2d7439eeecb3f1115e8048e64f90.json
handle duplicates method in eloquent collections
src/Illuminate/Database/Eloquent/Collection.php
@@ -305,6 +305,19 @@ public function diff($items) return $diff; } + /** + * Get the comparison function to detect duplicates. + * + * @param bool $strict + * @return \Closure + */ + protected function duplicateComparator($strict) + { + return function ($a, $b) { + ...
true
Other
laravel
framework
4b9d3e78e6de2d7439eeecb3f1115e8048e64f90.json
handle duplicates method in eloquent collections
src/Illuminate/Support/Collection.php
@@ -420,12 +420,7 @@ public function duplicates($callback = null, $strict = false) $uniqueItems = $items->unique(null, $strict); - $compare = $strict ? function ($a, $b) { - return $a === $b; - } - : function ($a, $b) { - return $a == $b; - }; + $com...
true
Other
laravel
framework
4b9d3e78e6de2d7439eeecb3f1115e8048e64f90.json
handle duplicates method in eloquent collections
tests/Database/DatabaseEloquentCollectionTest.php
@@ -245,6 +245,28 @@ public function testCollectionDiffsWithGivenCollection() $this->assertEquals(new Collection([$one]), $c1->diff($c2)); } + public function testCollectionReturnsDuplicateBasedOnlyOnKeys() + { + $one = new TestEloquentCollectionModel(); + $two = new TestEloquentColl...
true
Other
laravel
framework
eabf73c99cd4d7fc8c767cd707884608e70215f7.json
Add static `rename` method to facade docblocks This method is statically accessible from the schema facade. But IDE's are not recognizing it.
src/Illuminate/Support/Facades/Schema.php
@@ -7,6 +7,7 @@ * @method static \Illuminate\Database\Schema\Builder drop(string $table) * @method static \Illuminate\Database\Schema\Builder dropIfExists(string $table) * @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback) + * @method static \Illuminate\Database\Schema\Bui...
false
Other
laravel
framework
039a9745315f50e69d41b96a18e5b6131e8e164a.json
add unit tests
tests/Integration/Database/QueryBuilderTest.php
@@ -36,12 +36,14 @@ public function testWhereDate() public function testWhereDay() { $this->assertSame(1, DB::table('posts')->whereDay('created_at', '02')->count()); + $this->assertSame(1, DB::table('posts')->whereDay('created_at', 2)->count()); $this->assertSame(1, DB::table('posts')...
false
Other
laravel
framework
73e63ed88ab1fdd39d24f3f2a2b5d32d9eb3b30d.json
Fix issue #28184
src/Illuminate/Database/Query/Builder.php
@@ -1198,6 +1198,8 @@ public function whereDay($column, $operator, $value = null, $boolean = 'and') $value = $value->format('d'); } + $value = str_pad($value, 2, '0', STR_PAD_LEFT); + return $this->addDateBasedWhere('Day', $column, $operator, $value, $boolean); } @@ -1237,...
false
Other
laravel
framework
dc4d98966c4ab4cce090b4feba5cb7f61d5b3f79.json
add duplicates method to collection
src/Illuminate/Support/Collection.php
@@ -407,6 +407,49 @@ public function diffKeysUsing($items, callable $callback) return new static(array_diff_ukey($this->items, $this->getArrayableItems($items), $callback)); } + /** + * Retrieve duplicate items from the collection. + * + * @param callable|null $callback + * @param ...
true
Other
laravel
framework
dc4d98966c4ab4cce090b4feba5cb7f61d5b3f79.json
add duplicates method to collection
tests/Support/SupportCollectionTest.php
@@ -745,6 +745,60 @@ public function testDiffAssocUsing() $this->assertEquals(['b' => 'brown', 'c' => 'blue', 'red'], $c1->diffAssocUsing($c2, 'strcasecmp')->all()); } + public function testDuplicates() + { + $duplicates = Collection::make([1, 2, 1, 'laravel', null, 'laravel', 'php', null])...
true
Other
laravel
framework
dc8e71e174952f6810a9846a208395a17eee7569.json
track the exit code of scheduled event commands
src/Illuminate/Console/Scheduling/Event.php
@@ -143,6 +143,13 @@ class Event */ public $mutex; + /** + * The command exit status code. + * + * @var int + */ + public $exitCode; + /** * Create a new event instance. * @@ -208,7 +215,7 @@ protected function runCommandInForeground(Container $container) { ...
false
Other
laravel
framework
6dd859397c614349f87fda660827900ab4363522.json
Add view path to end of compiled blade view This re-adds the functionality that was added in https://github.com/laravel/framework/pull/27544 and https://github.com/laravel/framework/pull/27976 and removed again in https://github.com/laravel/framework/commit/33ce7bbb6a7f536036b58b66cc760fbb9eda80de. The main differenc...
src/Illuminate/View/Compilers/BladeCompiler.php
@@ -122,6 +122,10 @@ public function compile($path = null) $this->files->get($this->getPath()) ); + if (! empty($this->getPath())) { + $contents .= "<?php /**PATH {$this->getPath()} ENDPATH**/ ?>"; + } + $this->files->put( ...
true
Other
laravel
framework
6dd859397c614349f87fda660827900ab4363522.json
Add view path to end of compiled blade view This re-adds the functionality that was added in https://github.com/laravel/framework/pull/27544 and https://github.com/laravel/framework/pull/27976 and removed again in https://github.com/laravel/framework/commit/33ce7bbb6a7f536036b58b66cc760fbb9eda80de. The main differenc...
tests/View/ViewBladeCompilerTest.php
@@ -49,15 +49,15 @@ public function testCompileCompilesFileAndReturnsContents() { $compiler = new BladeCompiler($files = $this->getFiles(), __DIR__); $files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World'); - $files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('...
true
Other
laravel
framework
621ca8a3fd8fe9ea35ed97d80ae7d2a0de79d08a.json
Apply fixes from StyleCI (#28114)
tests/View/ViewBladeCompilerTest.php
@@ -49,15 +49,15 @@ public function testCompileCompilesFileAndReturnsContents() { $compiler = new BladeCompiler($files = $this->getFiles(), __DIR__); $files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World'); - $files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('...
false
Other
laravel
framework
33ce7bbb6a7f536036b58b66cc760fbb9eda80de.json
remove path hint
src/Illuminate/View/Compilers/BladeCompiler.php
@@ -122,10 +122,6 @@ public function compile($path = null) $this->files->get($this->getPath()) ); - if (! empty($this->getPath())) { - $contents .= "\n<?php /* {$this->getPath()} */ ?>"; - } - $this->files->put( $this->ge...
true
Other
laravel
framework
33ce7bbb6a7f536036b58b66cc760fbb9eda80de.json
remove path hint
tests/View/ViewBladeCompilerTest.php
@@ -49,15 +49,15 @@ public function testCompileCompilesFileAndReturnsContents() { $compiler = new BladeCompiler($files = $this->getFiles(), __DIR__); $files->shouldReceive('get')->once()->with('foo')->andReturn('Hello World'); - $files->shouldReceive('put')->once()->with(__DIR__.'/'.sha1('...
true
Other
laravel
framework
8587940d2f13e79e0ae4bed72cc744662742ef8b.json
Apply fixes from StyleCI (#28084)
tests/Foundation/Fixtures/EventDiscovery/Events/EventOne.php
@@ -2,4 +2,6 @@ namespace Illuminate\Tests\Foundation\Fixtures\EventDiscovery\Events; -class EventOne {} +class EventOne +{ +}
true
Other
laravel
framework
8587940d2f13e79e0ae4bed72cc744662742ef8b.json
Apply fixes from StyleCI (#28084)
tests/Foundation/Fixtures/EventDiscovery/Events/EventTwo.php
@@ -2,4 +2,6 @@ namespace Illuminate\Tests\Foundation\Fixtures\EventDiscovery\Events; -class EventTwo {} +class EventTwo +{ +}
true
Other
laravel
framework
7ea01d451274e7851e6f3292a84d078cdd06a12a.json
Improve tests for arguments in ability checks Use `assertSame` because `assertEquals` doesn't compare object references. Add assertions that the arguments are passed to the after callbacks.
tests/Auth/AuthAccessGateTest.php
@@ -348,11 +348,16 @@ public function test_a_single_argument_can_be_passed_when_checking_abilities() }); $gate->define('foo', function ($user, $x) use ($dummy) { - $this->assertEquals($dummy, $x); + $this->assertSame($dummy, $x); return true; }); + ...
false
Other
laravel
framework
7d24f9183fcd2bb7159470a9454fe74fd88e12f5.json
add replicating model event
src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
@@ -96,7 +96,7 @@ public function getObservableEvents() return array_merge( [ 'retrieved', 'creating', 'created', 'updating', 'updated', - 'saving', 'saved', 'restoring', 'restored', + 'saving', 'saved', 'restoring', 'restored', 'replicating', ...
true
Other
laravel
framework
7d24f9183fcd2bb7159470a9454fe74fd88e12f5.json
add replicating model event
src/Illuminate/Database/Eloquent/Model.php
@@ -1175,6 +1175,8 @@ public function replicate(array $except = null) $instance->setRawAttributes($attributes); $instance->setRelations($this->relations); + + $instance->fireModelEvent('replicating', false); }); }
true
Other
laravel
framework
7d24f9183fcd2bb7159470a9454fe74fd88e12f5.json
add replicating model event
tests/Database/DatabaseEloquentModelTest.php
@@ -1507,6 +1507,18 @@ public function testReplicateCreatesANewModelInstanceWithSameAttributeValues() $this->assertNull($replicated->updated_at); } + public function testReplicatingEventIsFiredWhenReplicatingModel() + { + $model = new EloquentModelStub; + + $model->setEventDispatcher...
true
Other
laravel
framework
e965a0a8b94fd79303eb2b1846605d4a9bc56be0.json
Add Env class
src/Illuminate/Support/Env.php
@@ -0,0 +1,55 @@ +<?php + +namespace Illuminate\Support; + +use PhpOption\Option; +use Dotenv\Environment\DotenvFactory; +use Dotenv\Environment\Adapter\PutenvAdapter; +use Dotenv\Environment\Adapter\EnvConstAdapter; +use Dotenv\Environment\Adapter\ServerConstAdapter; + +class Env +{ + /** + * Gets the value of ...
true
Other
laravel
framework
e965a0a8b94fd79303eb2b1846605d4a9bc56be0.json
Add Env class
src/Illuminate/Support/helpers.php
@@ -1,14 +1,11 @@ <?php -use PhpOption\Option; use Illuminate\Support\Arr; +use Illuminate\Support\Env; use Illuminate\Support\Optional; use Illuminate\Support\Collection; -use Dotenv\Environment\DotenvFactory; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Support\HigherOrderTapProxy; -use Dotenv\En...
true
Other
laravel
framework
e965a0a8b94fd79303eb2b1846605d4a9bc56be0.json
Add Env class
tests/Support/SupportHelpersTest.php
@@ -6,6 +6,7 @@ use ArrayAccess; use Mockery as m; use RuntimeException; +use Illuminate\Support\Env; use PHPUnit\Framework\TestCase; use Illuminate\Support\Optional; use Illuminate\Contracts\Support\Htmlable; @@ -531,6 +532,7 @@ public function testEnv() { $_SERVER['foo'] = 'bar'; $this->a...
true