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
b2d997dcfb73347670e6261f6d6cae3980aa9181.json
Bring the pluralization rules back
tests/Translation/TranslationTranslatorTest.php
@@ -78,7 +78,7 @@ public function testChoiceMethodProperlyLoadsAndRetrievesItem() $t = $this->getMockBuilder('Illuminate\Translation\Translator')->setMethods(['get'])->setConstructorArgs([$this->getLoader(), 'en'])->getMock(); $t->expects($this->once())->method('get')->with($this->equalTo('foo'), $this->equalTo(['replace']), $this->equalTo('en'))->will($this->returnValue('line')); $t->setSelector($selector = m::mock('Illuminate\Translation\MessageSelector')); - $selector->shouldReceive('choose')->once()->with('line', 10)->andReturn('choiced'); + $selector->shouldReceive('choose')->once()->with('line', 10, 'en')->andReturn('choiced'); $t->choice('foo', 10, ['replace']); } @@ -88,7 +88,7 @@ public function testChoiceMethodProperlyCountsCollectionsAndLoadsAndRetrievesIte $t = $this->getMockBuilder('Illuminate\Translation\Translator')->setMethods(['get'])->setConstructorArgs([$this->getLoader(), 'en'])->getMock(); $t->expects($this->exactly(2))->method('get')->with($this->equalTo('foo'), $this->equalTo(['replace']), $this->equalTo('en'))->will($this->returnValue('line')); $t->setSelector($selector = m::mock('Illuminate\Translation\MessageSelector')); - $selector->shouldReceive('choose')->twice()->with('line', 3)->andReturn('choiced'); + $selector->shouldReceive('choose')->twice()->with('line', 3, 'en')->andReturn('choiced'); $values = ['foo', 'bar', 'baz']; $t->choice('foo', $values, ['replace']);
true
Other
laravel
framework
eb5496887245acf4d2d68ed35aff69a356c09773.json
Add missing require. (#17824)
src/Illuminate/Notifications/composer.json
@@ -19,6 +19,7 @@ "illuminate/bus": "5.4.*", "illuminate/container": "5.4.*", "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", "illuminate/mail": "5.4.*", "illuminate/queue": "5.4.*", "illuminate/support": "5.4.*",
true
Other
laravel
framework
eb5496887245acf4d2d68ed35aff69a356c09773.json
Add missing require. (#17824)
src/Illuminate/Queue/composer.json
@@ -18,6 +18,7 @@ "illuminate/console": "5.4.*", "illuminate/container": "5.4.*", "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20", "symfony/debug": "~3.2",
true
Other
laravel
framework
eb5496887245acf4d2d68ed35aff69a356c09773.json
Add missing require. (#17824)
src/Illuminate/Session/composer.json
@@ -16,6 +16,7 @@ "require": { "php": ">=5.6.4", "illuminate/contracts": "5.4.*", + "illuminate/filesystem": "5.4.*", "illuminate/support": "5.4.*", "nesbot/carbon": "~1.20", "symfony/finder": "~3.2",
true
Other
laravel
framework
a6523520642f265a36323555bbc2270f138af8d5.json
Apply fixes from StyleCI (#17814)
src/Illuminate/Queue/Queue.php
@@ -151,7 +151,7 @@ protected function createStringPayload($job, $data) return [ 'displayName' => is_string($job) ? explode('@', $job)[0] : null, 'job' => $job, 'maxTries' => null, - 'timeout' => null, 'data' => $data + 'timeout' => null, 'data' => $data, ]; }
false
Other
laravel
framework
6ac7fb8ab221bf93531da408142167c6de94e9ac.json
Add (global) macros to Eloquent/Builder. (#17719)
src/Illuminate/Database/Eloquent/Builder.php
@@ -40,11 +40,18 @@ class Builder protected $eagerLoad = []; /** - * All of the registered builder macros. + * All of the globally registered builder macros. * * @var array */ - protected $macros = []; + protected static $macros = []; + + /** + * All of the locally registered builder macros. + * + * @var array + */ + protected $localMacros = []; /** * A replacement for the typical delete function. @@ -1273,18 +1280,6 @@ public function setModel(Model $model) return $this; } - /** - * Extend the builder with a given callback. - * - * @param string $name - * @param \Closure $callback - * @return void - */ - public function macro($name, Closure $callback) - { - $this->macros[$name] = $callback; - } - /** * Get the given macro by name. * @@ -1293,7 +1288,7 @@ public function macro($name, Closure $callback) */ public function getMacro($name) { - return Arr::get($this->macros, $name); + return Arr::get($this->localMacros, $name); } /** @@ -1305,10 +1300,24 @@ public function getMacro($name) */ public function __call($method, $parameters) { - if (isset($this->macros[$method])) { + if ($method === 'macro') { + $this->localMacros[$parameters[0]] = $parameters[1]; + + return; + } + + if (isset($this->localMacros[$method])) { array_unshift($parameters, $this); - return $this->macros[$method](...$parameters); + return $this->localMacros[$method](...$parameters); + } + + if (isset(static::$macros[$method]) and static::$macros[$method] instanceof Closure) { + return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); + } + + if (isset(static::$macros[$method])) { + return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); } if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { @@ -1324,6 +1333,34 @@ public function __call($method, $parameters) return $this; } + /** + * Dynamically handle calls into the query instance. + * + * @param string $method + * @param array $parameters + * @return mixed + * + * @throws \BadMethodCallException + */ + public static function __callStatic($method, $parameters) + { + if ($method === 'macro') { + static::$macros[$parameters[0]] = $parameters[1]; + + return; + } + + if (! isset(static::$macros[$method])) { + throw new BadMethodCallException("Method {$method} does not exist."); + } + + if (static::$macros[$method] instanceof Closure) { + return call_user_func_array(Closure::bind(static::$macros[$method], null, static::class), $parameters); + } + + return call_user_func_array(static::$macros[$method], $parameters); + } + /** * Force a clone of the underlying query builder when cloning. *
true
Other
laravel
framework
6ac7fb8ab221bf93531da408142167c6de94e9ac.json
Add (global) macros to Eloquent/Builder. (#17719)
tests/Database/DatabaseEloquentBuilderTest.php
@@ -351,7 +351,7 @@ public function testPluckWithoutModelGetterJustReturnTheAttributesFoundInDatabas $this->assertEquals(['bar', 'baz'], $builder->pluck('name')->all()); } - public function testMacrosAreCalledOnBuilder() + public function testLocalMacrosAreCalledOnBuilder() { unset($_SERVER['__test.builder']); $builder = new \Illuminate\Database\Eloquent\Builder(new \Illuminate\Database\Query\Builder( @@ -371,6 +371,15 @@ public function testMacrosAreCalledOnBuilder() unset($_SERVER['__test.builder']); } + public function testGlobalMacrosAreCalledOnBuilder() + { + Builder::macro('foo', function ($bar) { + return $bar; + }); + + $this->assertEquals($this->getBuilder()->foo('bar'), 'bar'); + } + public function testGetModelsProperlyHydratesModels() { $builder = m::mock('Illuminate\Database\Eloquent\Builder[get]', [$this->getMockQueryBuilder()]);
true
Other
laravel
framework
6ac7fb8ab221bf93531da408142167c6de94e9ac.json
Add (global) macros to Eloquent/Builder. (#17719)
tests/Database/DatabaseSoftDeletingScopeTest.php
@@ -25,8 +25,11 @@ public function testApplyingScopeToABuilder() public function testRestoreExtension() { - $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldDeferMissing(); + $builder = new \Illuminate\Database\Eloquent\Builder(new \Illuminate\Database\Query\Builder( + m::mock('Illuminate\Database\ConnectionInterface'), + m::mock('Illuminate\Database\Query\Grammars\Grammar'), + m::mock('Illuminate\Database\Query\Processors\Processor') + )); $scope = new \Illuminate\Database\Eloquent\SoftDeletingScope; $scope->extend($builder); $callback = $builder->getMacro('restore'); @@ -41,8 +44,11 @@ public function testRestoreExtension() public function testWithTrashedExtension() { - $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldDeferMissing(); + $builder = new \Illuminate\Database\Eloquent\Builder(new \Illuminate\Database\Query\Builder( + m::mock('Illuminate\Database\ConnectionInterface'), + m::mock('Illuminate\Database\Query\Grammars\Grammar'), + m::mock('Illuminate\Database\Query\Processors\Processor') + )); $scope = m::mock('Illuminate\Database\Eloquent\SoftDeletingScope[remove]'); $scope->extend($builder); $callback = $builder->getMacro('withTrashed'); @@ -56,8 +62,11 @@ public function testWithTrashedExtension() public function testOnlyTrashedExtension() { - $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldDeferMissing(); + $builder = new \Illuminate\Database\Eloquent\Builder(new \Illuminate\Database\Query\Builder( + m::mock('Illuminate\Database\ConnectionInterface'), + m::mock('Illuminate\Database\Query\Grammars\Grammar'), + m::mock('Illuminate\Database\Query\Processors\Processor') + )); $model = m::mock('Illuminate\Database\Eloquent\Model'); $model->shouldDeferMissing(); $scope = m::mock('Illuminate\Database\Eloquent\SoftDeletingScope[remove]'); @@ -76,8 +85,11 @@ public function testOnlyTrashedExtension() public function testWithoutTrashedExtension() { - $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldDeferMissing(); + $builder = new \Illuminate\Database\Eloquent\Builder(new \Illuminate\Database\Query\Builder( + m::mock('Illuminate\Database\ConnectionInterface'), + m::mock('Illuminate\Database\Query\Grammars\Grammar'), + m::mock('Illuminate\Database\Query\Processors\Processor') + )); $model = m::mock('Illuminate\Database\Eloquent\Model'); $model->shouldDeferMissing(); $scope = m::mock('Illuminate\Database\Eloquent\SoftDeletingScope[remove]');
true
Other
laravel
framework
eeceb4c254b7d52786ef5e5a4f829bc228c2dcb0.json
Apply fixes from StyleCI (#17797)
src/Illuminate/Queue/Jobs/JobName.php
@@ -2,7 +2,6 @@ namespace Illuminate\Queue\Jobs; -use Illuminate\Support\Arr; use Illuminate\Support\Str; class JobName
false
Other
laravel
framework
d9be4bfe0367a8e07eed4931bdabf135292abb1b.json
Remove unneeded code.
src/Illuminate/Queue/Jobs/JobName.php
@@ -31,10 +31,6 @@ public static function resolve($name, $payload) return $payload['displayName']; } - if ($name === 'Illuminate\Queue\CallQueuedHandler@call') { - return Arr::get($payload, 'data.commandName', $name); - } - return $name; } }
false
Other
laravel
framework
ec969797878f2c731034455af2397110732d14c4.json
remove old code
src/Illuminate/Queue/Jobs/JobName.php
@@ -35,10 +35,6 @@ public static function resolve($name, $payload) return Arr::get($payload, 'data.commandName', $name); } - if ($name === 'Illuminate\Events\CallQueuedHandler@call') { - return $payload['data']['class'].'@'.$payload['data']['method']; - } - return $name; } }
false
Other
laravel
framework
3d98ed723da5929992e6ea19ebf1d26afaa5dc52.json
Apply fixes from StyleCI (#17776)
tests/Queue/RedisQueueIntegrationTest.php
@@ -1,7 +1,7 @@ <?php -use Carbon\Carbon; use Mockery as m; +use Carbon\Carbon; use Illuminate\Redis\Database; use Illuminate\Queue\RedisQueue; use Illuminate\Container\Container;
false
Other
laravel
framework
d8b1be22968f4929d1b02ab89b07f1762c78c7ff.json
fix failing tests in 5.3 and 5.4 (#17774)
tests/Queue/RedisQueueIntegrationTest.php
@@ -1,5 +1,6 @@ <?php +use Carbon\Carbon; use Mockery as m; use Illuminate\Redis\Database; use Illuminate\Queue\RedisQueue; @@ -25,6 +26,7 @@ class RedisQueueIntegrationTest extends PHPUnit_Framework_TestCase public function setUp() { + Carbon::setTestNow(); parent::setUp(); $host = getenv('REDIS_HOST') ?: '127.0.0.1'; @@ -63,6 +65,7 @@ public function setUp() public function tearDown() { + Carbon::setTestNow(Carbon::now()); parent::tearDown(); m::close(); if ($this->redis) {
false
Other
laravel
framework
1c75bf80888bbd5c76950395cbded1db5c6d607d.json
add second param
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -220,15 +220,18 @@ public function assertExactJson(array $data) * Assert that the response has a given JSON structure. * * @param array|null $structure + * @param array|null $responseData * @return $this */ - public function assertJsonStructure(array $structure = null) + public function assertJsonStructure(array $structure = null, $responseData = null) { if (is_null($structure)) { return $this->assertJson(); } - $responseData = $this->decodeResponseJson(); + if (is_null($responseData)) { + $responseData = $this->decodeResponseJson(); + } foreach ($structure as $key => $value) { if (is_array($value) && $key === '*') {
false
Other
laravel
framework
da46df36cd6ca2cba2710c8ba577aae377e710d0.json
remove second param from json structure
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -220,18 +220,15 @@ public function assertExactJson(array $data) * Assert that the response has a given JSON structure. * * @param array|null $structure - * @param array|null $responseData * @return $this */ - public function assertJsonStructure(array $structure = null, $responseData = null) + public function assertJsonStructure(array $structure = null) { if (is_null($structure)) { return $this->assertJson(); } - if (is_null($responseData)) { - $responseData = $this->decodeResponseJson(); - } + $responseData = $this->decodeResponseJson(); foreach ($structure as $key => $value) { if (is_array($value) && $key === '*') {
false
Other
laravel
framework
5545fc6de7b5fc69bb67110144ae1a699e53c9a2.json
Remove useless require. (#17766)
src/Illuminate/Config/composer.json
@@ -16,7 +16,6 @@ "require": { "php": ">=5.6.4", "illuminate/contracts": "5.4.*", - "illuminate/filesystem": "5.4.*", "illuminate/support": "5.4.*" }, "autoload": {
false
Other
laravel
framework
404671a623e955f0eb593eb7436fa24dceef2bce.json
allow multiple manifest files for mix helper
src/Illuminate/Foundation/helpers.php
@@ -552,38 +552,42 @@ function method_field($method) /** * Get the path to a versioned Mix file. * - * @param string $path + * @param string $path + * @param string $manifestDir * @return \Illuminate\Support\HtmlString * * @throws \Exception */ - function mix($path) + function mix($path, $manifestDir = '') { static $manifest; - static $shouldHotReload; - if (! $manifest) { - if (! file_exists($manifestPath = public_path('mix-manifest.json'))) { + if ( $manifestDir && ! starts_with($manifestDir, '/')) { + $manifestDir = "/{$manifestDir}"; + } + + if ( ! $manifest) { + if ( ! file_exists($manifestPath = public_path($manifestDir . '/mix-manifest.json'))) { throw new Exception('The Mix manifest does not exist.'); } $manifest = json_decode(file_get_contents($manifestPath), true); } - if (! starts_with($path, '/')) { + if ( ! starts_with($path, '/')) { $path = "/{$path}"; } - if (! array_key_exists($path, $manifest)) { + if ( ! array_key_exists($path, $manifest)) { throw new Exception( - "Unable to locate Mix file: {$path}. Please check your ". + "Unable to locate Mix file: {$path}. Please check your " . 'webpack.mix.js output paths and try again.' ); } - return $shouldHotReload = file_exists(public_path('hot')) - ? new HtmlString("http://localhost:8080{$manifest[$path]}") - : new HtmlString($manifest[$path]); + return file_exists(public_path($manifestDir . '/hot')) + ? new HtmlString("http://localhost:8080{$manifest[$path]}") + : new HtmlString($manifestDir . $manifest[$path]); } }
false
Other
laravel
framework
c3219a630fbf9627538f37107c8427cdb60b949b.json
Add tap method to collection
src/Illuminate/Support/Collection.php
@@ -826,6 +826,18 @@ public function pipe(callable $callback) return $callback($this); } + /** + * Pass the collection to the given callback and return the current instance. + * + * @param callable $callback + * @return $this + */ + public function tap(callable $callback) + { + $callback(new static($this->items)); + return $this; + } + /** * Get and remove the last item from the collection. *
true
Other
laravel
framework
c3219a630fbf9627538f37107c8427cdb60b949b.json
Add tap method to collection
tests/Support/SupportCollectionTest.php
@@ -1882,6 +1882,19 @@ public function testHigherOrderPartition() $this->assertSame(['b' => ['free' => false]], $premium->toArray()); } + + public function testTap() + { + $collection = new Collection([1, 2, 3]); + + $fromTap = []; + $collection = $collection->tap(function ($collection) use (&$fromTap) { + $fromTap = $collection->slice(0, 1)->toArray(); + }); + + $this->assertSame([1], $fromTap); + $this->assertSame([1, 2, 3], $collection->toArray()); + } } class TestSupportCollectionHigherOrderItem
true
Other
laravel
framework
6ca78def627f665ae76a58031b7fc7d836091903.json
update doc block
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -273,7 +273,7 @@ public function decodeResponseJson() } /** - * Alias for the "decodeResponseJson" method. + * Validate and return the decoded response JSON. * * @return array */
false
Other
laravel
framework
c2245992497b78c24ee912e5f6e09625258db5c4.json
Add json alias for decodeResponseJson method
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -272,6 +272,16 @@ public function decodeResponseJson() return $decodedResponse; } + /** + * Alias for the "decodeResponseJson" method. + * + * @return array + */ + public function json() + { + return $this->decodeResponseJson(); + } + /** * Assert that the response view has a given piece of bound data. *
false
Other
laravel
framework
a0ed1d43f1ec9b8027e2a4b4124e176dd8eb8ecf.json
Add raw method to FactoryBuilder
src/Illuminate/Database/Eloquent/FactoryBuilder.php
@@ -142,6 +142,45 @@ public function make(array $attributes = []) }, range(1, $this->amount))); } + /** + * Create an array of raw attribute arrays. + * + * @param array $attributes + * @return mixed + */ + public function raw(array $attributes = []) + { + if ($this->amount === null) { + return $this->getRawAttributes(); + } + + if ($this->amount < 1) { + return []; + } + + return array_map(function () use ($attributes) { + return $this->getRawAttributes($attributes); + }, range(1, $this->amount)); + } + + /** + * Get a raw attributes array for the model. + * + * @param array $attributes + * @return mixed + */ + protected function getRawAttributes(array $attributes = []) + { + $definition = call_user_func( + $this->definitions[$this->class][$this->name], + $this->faker, $attributes + ); + + return $this->callClosureAttributes( + array_merge($this->applyStates($definition, $attributes), $attributes) + ); + } + /** * Make an instance of the model with the given attributes. * @@ -157,14 +196,9 @@ protected function makeInstance(array $attributes = []) throw new InvalidArgumentException("Unable to locate factory with name [{$this->name}] [{$this->class}]."); } - $definition = call_user_func( - $this->definitions[$this->class][$this->name], - $this->faker, $attributes + return new $this->class( + $this->getRawAttributes($attributes) ); - - return new $this->class($this->callClosureAttributes( - array_merge($this->applyStates($definition, $attributes), $attributes) - )); }); }
false
Other
laravel
framework
0745d9dccc8788680be7039470309ff03d844af2.json
Add tests for TestResponse
tests/Foundation/FoundationTestResponseTest.php
@@ -0,0 +1,85 @@ +<?php + +namespace Illuminate\Tests\Foundation; + +use JsonSerializable; +use PHPUnit\Framework\TestCase; +use Illuminate\Foundation\Testing\TestResponse; + +class FoundationTestResponseTest extends TestCase +{ + public function testAssertJsonWithArray() + { + $response = new TestResponse(new JsonSerializableSingleResourceStub); + + $resource = new JsonSerializableSingleResourceStub; + + $response->assertJson($resource->jsonSerialize()); + } + + public function testAssertJsonWithMixed() + { + $response = new TestResponse(new JsonSerializableMixedResourcesStub); + + $resource = new JsonSerializableMixedResourcesStub; + + $response->assertJson($resource->jsonSerialize()); + } + + public function testAssertJsonStructure() + { + $response = new TestResponse(new JsonSerializableMixedResourcesStub); + + // At root + $response->assertJsonStructure(['foo']); + + // Nested + $response->assertJsonStructure(['foobar' => ['foobar_foo', 'foobar_bar']]); + + // Wildcard (repeating structure) + $response->assertJsonStructure(['bars' => ['*' => ['bar', 'foo']]]); + + // Nested after wildcard + $response->assertJsonStructure(['baz' => ['*' => ['foo', 'bar' => ['foo', 'bar']]]]); + + // Wildcard (repeating structure) at root + $response = new TestResponse(new JsonSerializableSingleResourceStub); + $response->assertJsonStructure(['*' => ['foo', 'bar', 'foobar']]); + } +} + +class JsonSerializableMixedResourcesStub implements JsonSerializable +{ + public function jsonSerialize() + { + return [ + 'foo' => 'bar', + 'foobar' => [ + 'foobar_foo' => 'foo', + 'foobar_bar' => 'bar', + ], + 'bars' => [ + ['bar' => 'foo 0', 'foo' => 'bar 0'], + ['bar' => 'foo 1', 'foo' => 'bar 1'], + ['bar' => 'foo 2', 'foo' => 'bar 2'], + ], + 'baz' => [ + ['foo' => 'bar 0', 'bar' => ['foo' => 'bar 0', 'bar' => 'foo 0']], + ['foo' => 'bar 1', 'bar' => ['foo' => 'bar 1', 'bar' => 'foo 1']], + ], + ]; + } +} + +class JsonSerializableSingleResourceStub implements JsonSerializable +{ + public function jsonSerialize() + { + return [ + ['foo' => 'foo 0', 'bar' => 'bar 0', 'foobar' => 'foobar 0'], + ['foo' => 'foo 1', 'bar' => 'bar 1', 'foobar' => 'foobar 1'], + ['foo' => 'foo 2', 'bar' => 'bar 2', 'foobar' => 'foobar 2'], + ['foo' => 'foo 3', 'bar' => 'bar 3', 'foobar' => 'foobar 3'], + ]; + } +}
false
Other
laravel
framework
8403b34a6de212e5cd98d40333fd84d112fbb9f7.json
move shouldKill check
src/Illuminate/Queue/Worker.php
@@ -103,10 +103,6 @@ public function daemon($connectionName, $queue, WorkerOptions $options) $this->registerTimeoutHandler($job, $options); - if ($this->shouldQuit) { - $this->kill(); - } - // If the daemon should run (not in maintenance mode, etc.), then we can run // fire off this job for processing. Otherwise, we will need to sleep the // worker so no more jobs are processed until they should be processed. @@ -191,6 +187,10 @@ protected function pauseWorker(WorkerOptions $options, $lastRestart) */ protected function stopIfNecessary(WorkerOptions $options, $lastRestart) { + if ($this->shouldQuit) { + $this->kill(); + } + if ($this->memoryExceeded($options->memory)) { $this->stop(12); } elseif ($this->queueShouldRestart($lastRestart)) {
false
Other
laravel
framework
7869f6b35f6c1dff7b59551682d27dbd30b2a536.json
Introduce a @prepend for stack
src/Illuminate/View/Compilers/Concerns/CompilesStacks.php
@@ -35,4 +35,25 @@ protected function compileEndpush() { return '<?php $__env->stopPush(); ?>'; } + + /** + * Compile the prepend statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compilePrepend($expression) + { + return "<?php \$__env->startPrepend{$expression}; ?>"; + } + + /** + * Compile the end-prepend statements into valid PHP. + * + * @return string + */ + protected function compileEndprepend() + { + return '<?php $__env->stopPrepend(); ?>'; + } }
true
Other
laravel
framework
7869f6b35f6c1dff7b59551682d27dbd30b2a536.json
Introduce a @prepend for stack
src/Illuminate/View/Concerns/ManagesStacks.php
@@ -13,6 +13,13 @@ trait ManagesStacks */ protected $pushes = []; + /** + * All of the finished, captured prepend sections. + * + * @var array + */ + protected $prepends = []; + /** * The stack of in-progress push sections. * @@ -55,6 +62,41 @@ public function stopPush() }); } + /** + * Start prepending content into a push section. + * + * @param string $section + * @param string $content + * @return void + */ + public function startPrepend($section, $content = '') + { + if ($content === '') { + if (ob_start()) { + $this->pushStack[] = $section; + } + } else { + $this->extendPrepend($section, $content); + } + } + + /** + * Stop prepending content into a push section. + * + * @return string + * @throws \InvalidArgumentException + */ + public function stopPrepend() + { + if (empty($this->pushStack)) { + throw new InvalidArgumentException('Cannot end a prepend stack without first starting one.'); + } + + return tap(array_pop($this->pushStack), function ($last) { + $this->extendPrepend($last, ob_get_clean()); + }); + } + /** * Append content to a given push section. * @@ -75,6 +117,26 @@ protected function extendPush($section, $content) } } + /** + * Prepend content to a given stack. + * + * @param string $section + * @param string $content + * @return void + */ + protected function extendPrepend($section, $content) + { + if (! isset($this->prepends[$section])) { + $this->prepends[$section] = []; + } + + if (! isset($this->prepends[$section][$this->renderCount])) { + $this->prepends[$section][$this->renderCount] = $content; + } else { + $this->prepends[$section][$this->renderCount] = $content.$this->prepends[$section][$this->renderCount]; + } + } + /** * Get the string contents of a push section. * @@ -84,11 +146,21 @@ protected function extendPush($section, $content) */ public function yieldPushContent($section, $default = '') { + if (! isset($this->pushes[$section]) && ! isset($this->prepends[$section])) { + return $default; + } + + $output = ''; + + if (isset($this->prepends[$section])) { + $output .= implode(array_reverse($this->prepends[$section])); + } + if (isset($this->pushes[$section])) { - return implode($this->pushes[$section]); + $output .= implode($this->pushes[$section]); } - return $default; + return $output; } /**
true
Other
laravel
framework
99c6db84fa621a0f8dfa7c30d37ad55705002b9f.json
trim double quotes from section name (#17677)
src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php
@@ -38,7 +38,7 @@ protected function compileExtends($expression) */ protected function compileSection($expression) { - $this->lastSection = trim($expression, "()'"); + $this->lastSection = trim($expression, "()'\""); return "<?php \$__env->startSection{$expression}; ?>"; }
false
Other
laravel
framework
819888ca1776581225d57e00fdc4ba709cbcc5d0.json
Use proper signal.
src/Illuminate/Queue/Worker.php
@@ -459,7 +459,7 @@ protected function listenForSignals() if ($this->supportsAsyncSignals()) { pcntl_async_signals(true); - pcntl_signal(SIGQUIT, function () { + pcntl_signal(SIGTERM, function () { $this->shouldQuit = true; });
false
Other
laravel
framework
89d770f11489a89a034fce52e3c992f20c9de969.json
Update notifications.stub (#17664)
src/Illuminate/Notifications/Console/stubs/notifications.stub
@@ -1,5 +1,6 @@ <?php +use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration;
false
Other
laravel
framework
a25f58690b4ae49869ef7022103381018b14b580.json
Apply fixes from StyleCI (#17631)
src/Illuminate/Redis/Connections/PhpRedisConnection.php
@@ -32,7 +32,7 @@ public function set($key, $value, $expireResolution = null, $expireTTL = null, $ return $this->command('set', [ $key, $value, - $expireResolution ? [$expireResolution, $flag => $expireTTL] : null + $expireResolution ? [$expireResolution, $flag => $expireTTL] : null, ]); } @@ -91,7 +91,7 @@ public function zadd($key, array $membersAndScoresDictionary) public function evalsha($script, $numkeys, ...$arguments) { return $this->command('evalsha', [ - $this->script('load', $script), $arguments, $numkeys + $this->script('load', $script), $arguments, $numkeys, ]); }
false
Other
laravel
framework
8da01fd402aa1f22b61d3471df043afe3fc9f3da.json
Support unlimited post size correctly (#17607)
src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php
@@ -18,7 +18,9 @@ class ValidatePostSize */ public function handle($request, Closure $next) { - if ($request->server('CONTENT_LENGTH') > $this->getPostMaxSize()) { + $max = $this->getPostMaxSize(); + + if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) { throw new PostTooLargeException; }
false
Other
laravel
framework
566df9c8fa31d205813df070a777f6e913b9678c.json
Use app name in markdown email header (#17604)
src/Illuminate/Mail/resources/views/markdown/message.blade.php
@@ -2,7 +2,7 @@ {{-- Header --}} @slot('header') @component('mail::header', ['url' => config('app.url')]) - Product Name + {{ config('app.name') }} @endcomponent @endslot
false
Other
laravel
framework
a10bbfbf21466995d0a8c1843447554700791231.json
Fix "typo" (#17594)
src/Illuminate/Routing/Console/ControllerMakeCommand.php
@@ -75,7 +75,7 @@ protected function buildClass($name) $modelClass = $this->parseModel($this->option('model')); if (! class_exists($modelClass)) { - if ($this->confirm("A {$modelClass} model not exist. Do you want to generate it?", true)) { + if ($this->confirm("A {$modelClass} model does not exist. Do you want to generate it?", true)) { $this->call('make:model', ['name' => $modelClass]); } }
false
Other
laravel
framework
b1d65f54eb5ffd909f2aebc5b718e2e8c5d24c78.json
Allow any implementation of ViewFactory (#17591)
src/Illuminate/Mail/Markdown.php
@@ -5,7 +5,7 @@ use Parsedown; use Illuminate\Support\Arr; use Illuminate\Support\HtmlString; -use Illuminate\View\Factory as ViewFactory; +use Illuminate\Contracts\View\Factory as ViewFactory; use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles; class Markdown
false
Other
laravel
framework
62133950ecc88520e6aca3e5edcf8c9c4b6de8a6.json
Generate model with make:controller
src/Illuminate/Routing/Console/ControllerMakeCommand.php
@@ -74,6 +74,12 @@ protected function buildClass($name) if ($this->option('model')) { $modelClass = $this->parseModel($this->option('model')); + if (! class_exists($modelClass)) { + if ($this->confirm("The model $modelClass does not exist. Do you want to generate it?")) { + $this->call('make:model', ['name' => $modelClass]); + } + } + $replace = [ 'DummyFullModelClass' => $modelClass, 'DummyModelClass' => class_basename($modelClass),
false
Other
laravel
framework
8aacf5ccbd590573ab8c80a656c2a7ae81433dc4.json
fix user and request info not persisting (#17584)
src/Illuminate/Session/DatabaseSessionHandler.php
@@ -177,7 +177,7 @@ protected function getDefaultPayload($data) return $payload; } - return tap($payload, function ($payload) { + return tap($payload, function (&$payload) { $this->addUserInformation($payload) ->addRequestInformation($payload); });
false
Other
laravel
framework
f8fb857c431d34e78fb29c946e5ec8bebfd3e4a3.json
Remove the hot file from versionning (#17571)
.gitignore
@@ -4,4 +4,5 @@ composer.lock .php_cs.cache .DS_Store Thumbs.db -/phpunit.xml \ No newline at end of file +/phpunit.xml +/public/hot
false
Other
laravel
framework
07a8cddf4e898c0d48ec14c37872047a418cc3e2.json
Apply fixes from StyleCI (#17536)
src/Illuminate/Routing/Router.php
@@ -728,7 +728,7 @@ public function pushMiddlewareToGroup($group, $middleware) $this->middlewareGroups[$group] = []; } - if ( ! in_array($middleware, $this->middlewareGroups[$group])) { + if (! in_array($middleware, $this->middlewareGroups[$group])) { $this->middlewareGroups[$group][] = $middleware; }
false
Other
laravel
framework
e68c3d81411fe0e167d851328a66b1d334034469.json
Apply fixes from StyleCI (#17535)
src/Illuminate/Routing/Router.php
@@ -728,7 +728,7 @@ public function pushMiddlewareToGroup($group, $middleware) $this->middlewareGroups[$group] = []; } - if ( ! in_array($middleware, $this->middlewareGroups[$group])) { + if (! in_array($middleware, $this->middlewareGroups[$group])) { $this->middlewareGroups[$group][] = $middleware; }
false
Other
laravel
framework
1054fd2523913e59e980553b5411a22f16ecf817.json
fix bug with pushMiddleware
src/Illuminate/Routing/Router.php
@@ -724,7 +724,11 @@ public function prependMiddlewareToGroup($group, $middleware) */ public function pushMiddlewareToGroup($group, $middleware) { - if (isset($this->middlewareGroups[$group]) && ! in_array($middleware, $this->middlewareGroups[$group])) { + if (! array_key_exists($group, $this->middlewareGroups)) { + $this->middlewareGroups[$group] = []; + } + + if ( ! in_array($middleware, $this->middlewareGroups[$group])) { $this->middlewareGroups[$group][] = $middleware; }
false
Other
laravel
framework
f292260554e1985f8dc1725489b3d5a07c552f7c.json
fix bug with delete reset token (#17524)
src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
@@ -140,14 +140,14 @@ protected function tokenExpired($createdAt) } /** - * Delete a token record by token. + * Delete a token record by user. * - * @param string $token + * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @return void */ - public function delete($token) + public function delete(CanResetPasswordContract $user) { - $this->getTable()->where('token', $token)->delete(); + $this->deleteExisting($user); } /**
true
Other
laravel
framework
f292260554e1985f8dc1725489b3d5a07c552f7c.json
fix bug with delete reset token (#17524)
src/Illuminate/Auth/Passwords/PasswordBroker.php
@@ -98,7 +98,7 @@ public function reset(array $credentials, Closure $callback) // in their persistent storage. Then we'll delete the token and return. $callback($user, $password); - $this->tokens->delete($credentials['token']); + $this->tokens->delete($user); return static::PASSWORD_RESET; }
true
Other
laravel
framework
f292260554e1985f8dc1725489b3d5a07c552f7c.json
fix bug with delete reset token (#17524)
src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
@@ -26,10 +26,10 @@ public function exists(CanResetPasswordContract $user, $token); /** * Delete a token record. * - * @param string $token + * @param \Illuminate\Contracts\Auth\CanResetPassword $user * @return void */ - public function delete($token); + public function delete(CanResetPasswordContract $user); /** * Delete expired tokens.
true
Other
laravel
framework
f292260554e1985f8dc1725489b3d5a07c552f7c.json
fix bug with delete reset token (#17524)
tests/Auth/AuthDatabaseTokenRepositoryTest.php
@@ -88,10 +88,12 @@ public function testDeleteMethodDeletesByToken() { $repo = $this->getRepo(); $repo->getConnection()->shouldReceive('table')->once()->with('table')->andReturn($query = m::mock('StdClass')); - $query->shouldReceive('where')->once()->with('token', 'token')->andReturn($query); + $query->shouldReceive('where')->once()->with('email', 'email')->andReturn($query); $query->shouldReceive('delete')->once(); + $user = m::mock('Illuminate\Contracts\Auth\CanResetPassword'); + $user->shouldReceive('getEmailForPasswordReset')->andReturn('email'); - $repo->delete('token'); + $repo->delete($user); } public function testDeleteExpiredMethodDeletesExpiredTokens()
true
Other
laravel
framework
f292260554e1985f8dc1725489b3d5a07c552f7c.json
fix bug with delete reset token (#17524)
tests/Auth/AuthPasswordBrokerTest.php
@@ -123,7 +123,7 @@ public function testResetRemovesRecordOnReminderTableAndCallsCallback() unset($_SERVER['__password.reset.test']); $broker = $this->getMockBuilder('Illuminate\Auth\Passwords\PasswordBroker')->setMethods(['validateReset', 'getPassword', 'getToken'])->setConstructorArgs(array_values($mocks = $this->getMocks()))->getMock(); $broker->expects($this->once())->method('validateReset')->will($this->returnValue($user = m::mock('Illuminate\Contracts\Auth\CanResetPassword'))); - $mocks['tokens']->shouldReceive('delete')->once()->with('token'); + $mocks['tokens']->shouldReceive('delete')->once()->with($user); $callback = function ($user, $password) { $_SERVER['__password.reset.test'] = compact('user', 'password');
true
Other
laravel
framework
7f36ae486df02fb5f56ac64ddf8488a3a441f308.json
add fire to fake
src/Illuminate/Support/Testing/Fakes/EventFake.php
@@ -154,6 +154,19 @@ public function flush($event) // } + /** + * Fire an event and call the listeners. + * + * @param string|object $event + * @param mixed $payload + * @param bool $halt + * @return array|null + */ + public function fire($event, $payload = [], $halt = false) + { + return $this->dispatch($event, $payload, $halt); + } + /** * Fire an event and call the listeners. *
false
Other
laravel
framework
052e9a51bbbbbe3247d6e080bec2dc222faa3974.json
Add type check before validating URL (#17504)
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -1290,6 +1290,10 @@ protected function validateTimezone($attribute, $value) */ protected function validateUrl($attribute, $value) { + if (! is_string($value)) { + return false; + } + /* * This pattern is derived from Symfony\Component\Validator\Constraints\UrlValidator (2.7.4). *
false
Other
laravel
framework
16e862c1e22795acab869fa01ec5f8bcd7d400b3.json
Send full job back into RedisQueue.
src/Illuminate/Queue/Jobs/RedisJob.php
@@ -82,7 +82,7 @@ public function delete() { parent::delete(); - $this->redis->deleteReserved($this->queue, $this->reserved); + $this->redis->deleteReserved($this->queue, $this); } /** @@ -95,7 +95,7 @@ public function release($delay = 0) { parent::release($delay); - $this->redis->deleteAndRelease($this->queue, $this->reserved, $delay); + $this->redis->deleteAndRelease($this->queue, $this, $delay); } /**
true
Other
laravel
framework
16e862c1e22795acab869fa01ec5f8bcd7d400b3.json
Send full job back into RedisQueue.
src/Illuminate/Queue/RedisQueue.php
@@ -212,19 +212,19 @@ protected function retrieveNextJob($queue) * Delete a reserved job from the queue. * * @param string $queue - * @param string $job + * @param \Illuminate\Queues\Jobs\RedisJob $job * @return void */ public function deleteReserved($queue, $job) { - $this->getConnection()->zrem($this->getQueue($queue).':reserved', $job); + $this->getConnection()->zrem($this->getQueue($queue).':reserved', $job->getReservedJob()); } /** * Delete a reserved job from the reserved queue and release it. * * @param string $queue - * @param string $job + * @param \Illuminate\Queues\Jobs\RedisJob $job * @param int $delay * @return void */ @@ -234,7 +234,7 @@ public function deleteAndRelease($queue, $job, $delay) $this->getConnection()->eval( LuaScripts::release(), 2, $queue.':delayed', $queue.':reserved', - $job, $this->availableAt($delay) + $job->getReservedJob(), $this->availableAt($delay) ); }
true
Other
laravel
framework
16e862c1e22795acab869fa01ec5f8bcd7d400b3.json
Send full job back into RedisQueue.
tests/Queue/QueueRedisJobTest.php
@@ -25,7 +25,7 @@ public function testDeleteRemovesTheJobFromRedis() { $job = $this->getJob(); $job->getRedisQueue()->shouldReceive('deleteReserved')->once() - ->with('default', json_encode(['job' => 'foo', 'data' => ['data'], 'attempts' => 2])); + ->with('default', $job); $job->delete(); } @@ -34,7 +34,7 @@ public function testReleaseProperlyReleasesJobOntoRedis() { $job = $this->getJob(); $job->getRedisQueue()->shouldReceive('deleteAndRelease')->once() - ->with('default', json_encode(['job' => 'foo', 'data' => ['data'], 'attempts' => 2]), 1); + ->with('default', $job, 1); $job->release(1); }
true
Other
laravel
framework
fed36bd7e09658009d36d9dd568f19ddcb75172e.json
add methods for determining if job has failed.
src/Illuminate/Queue/FailingJob.php
@@ -18,6 +18,8 @@ class FailingJob */ public static function handle($connectionName, $job, $e = null) { + $job->markAsFailed(); + if ($job->isDeleted()) { return; }
true
Other
laravel
framework
fed36bd7e09658009d36d9dd568f19ddcb75172e.json
add methods for determining if job has failed.
src/Illuminate/Queue/Jobs/Job.php
@@ -36,6 +36,13 @@ abstract class Job */ protected $released = false; + /** + * Indicates if the job has failed. + * + * @var bool + */ + protected $failed = false; + /** * The name of the connection the job belongs to. */ @@ -113,6 +120,26 @@ public function isDeletedOrReleased() return $this->isDeleted() || $this->isReleased(); } + /** + * Determine if the job has been marked as a failure. + * + * @return bool + */ + public function hasFailed() + { + return $this->failed; + } + + /** + * Mark the job as "failed". + * + * @return void + */ + public function markAsFailed() + { + $this->failed = true; + } + /** * Process an exception that caused the job to fail. * @@ -121,6 +148,8 @@ public function isDeletedOrReleased() */ public function failed($e) { + $this->markAsFailed(); + $payload = $this->payload(); list($class, $method) = JobName::parse($payload['job']);
true
Other
laravel
framework
fed36bd7e09658009d36d9dd568f19ddcb75172e.json
add methods for determining if job has failed.
tests/Queue/QueueWorkerTest.php
@@ -304,6 +304,11 @@ public function attempts() return $this->attempts; } + public function markAsFailed() + { + // + } + public function failed($e) { $this->failedWith = $e; @@ -313,23 +318,4 @@ public function setConnectionName($name) { $this->connectionName = $name; } - - public function testJobSleepsWhenAnExceptionIsThrownForADaemonWorker() - { - $exceptionHandler = m::mock('Illuminate\Contracts\Debug\ExceptionHandler'); - $job = m::mock('Illuminate\Contracts\Queue\Job'); - $job->shouldReceive('fire')->once()->andReturnUsing(function () { - throw new RuntimeException; - }); - $worker = m::mock('Illuminate\Queue\Worker', [$manager = m::mock('Illuminate\Queue\QueueManager')])->makePartial(); - $manager->shouldReceive('connection')->once()->with('connection')->andReturn($connection = m::mock('StdClass')); - $manager->shouldReceive('getName')->andReturn('connection'); - $connection->shouldReceive('pop')->once()->with('queue')->andReturn($job); - $worker->shouldReceive('sleep')->once()->with(3); - - $exceptionHandler->shouldReceive('report')->once(); - - $worker->setDaemonExceptionHandler($exceptionHandler); - $worker->pop('connection', 'queue'); - } }
true
Other
laravel
framework
1a4fe3e5518b87302ccc1ec82ba8e9a13a3a52a1.json
fix bug with force create
src/Illuminate/Database/Eloquent/Builder.php
@@ -827,7 +827,7 @@ public function create(array $attributes = []) */ public function forceCreate(array $attributes) { - $instance = $this->model->newInstance($attributes)->setConnection( + $instance = $this->model->newInstance()->setConnection( $this->query->getConnection()->getName() );
false
Other
laravel
framework
fde66bfae0b37be4ff78f7aa1f1c15d6de602f77.json
Apply fixes from StyleCI (#17492)
tests/Queue/RedisQueueIntegrationTest.php
@@ -1,7 +1,6 @@ <?php use Mockery as m; -use Carbon\Carbon; use Illuminate\Redis\Database; use Illuminate\Queue\RedisQueue; use Illuminate\Container\Container;
false
Other
laravel
framework
c53166e55270dca0d19db280f970d9ba86089ee3.json
Apply fixes from StyleCI (#17491)
tests/Queue/RedisQueueIntegrationTest.php
@@ -1,6 +1,7 @@ <?php use Mockery as m; +use Carbon\Carbon; use Illuminate\Redis\Database; use Illuminate\Queue\RedisQueue; use Illuminate\Container\Container;
false
Other
laravel
framework
51be372c2eed553cecfc73a46804d27fa2ff96ff.json
Apply fixes from StyleCI (#17480)
src/Illuminate/Http/UploadedFile.php
@@ -68,7 +68,7 @@ public function storePubliclyAs($path, $name, $options = []) public function storeAs($path, $name, $options = []) { $options = $this->parseOptions($options); - + $disk = Arr::pull($options, 'disk'); return Container::getInstance()->make(FilesystemFactory::class)->disk($disk)->putFileAs(
false
Other
laravel
framework
37a9617da416d8aec68d01a206c0453f0288c159.json
fix storeAs array issue (#17472)
src/Illuminate/Http/UploadedFile.php
@@ -67,6 +67,8 @@ public function storePubliclyAs($path, $name, $options = []) */ public function storeAs($path, $name, $options = []) { + $options = $this->parseOptions($options); + $disk = Arr::pull($options, 'disk'); return Container::getInstance()->make(FilesystemFactory::class)->disk($disk)->putFileAs(
false
Other
laravel
framework
f21e942ae8a4104ffdf42c231601efe8759c4c10.json
Return migrated jobs for customization.
src/Illuminate/Queue/LuaScripts.php
@@ -97,7 +97,7 @@ public static function migrateExpiredJobs() end end -return true +return val LUA; } }
true
Other
laravel
framework
f21e942ae8a4104ffdf42c231601efe8759c4c10.json
Return migrated jobs for customization.
src/Illuminate/Queue/RedisQueue.php
@@ -174,11 +174,11 @@ protected function migrate($queue) * * @param string $from * @param string $to - * @return void + * @return array */ public function migrateExpiredJobs($from, $to) { - $this->getConnection()->eval( + return $this->getConnection()->eval( LuaScripts::migrateExpiredJobs(), 2, $from, $to, $this->currentTime() ); }
true
Other
laravel
framework
98555a47be612ab464e8fee12f79e439c6042d32.json
Escape inline sections (#17453)
src/Illuminate/View/Concerns/ManagesLayouts.php
@@ -41,7 +41,7 @@ public function startSection($section, $content = null) $this->sectionStack[] = $section; } } else { - $this->extendSection($section, $content); + $this->extendSection($section, e($content)); } }
false
Other
laravel
framework
f6a24ada98c683f49a1606757f7cb0242226057b.json
Add option to inline slot content (#17449)
src/Illuminate/View/Concerns/ManagesComponents.php
@@ -83,14 +83,19 @@ protected function componentData($name) * Start the slot rendering process. * * @param string $name + * @param string|null $content * @return void */ - public function slot($name) + public function slot($name, $content = null) { - if (ob_start()) { - $this->slots[$this->currentComponent()][$name] = ''; - - $this->slotStack[$this->currentComponent()][] = $name; + if ($content !== null) { + $this->slots[$this->currentComponent()][$name] = $content; + } else { + if (ob_start()) { + $this->slots[$this->currentComponent()][$name] = ''; + + $this->slotStack[$this->currentComponent()][] = $name; + } } }
true
Other
laravel
framework
f6a24ada98c683f49a1606757f7cb0242226057b.json
Add option to inline slot content (#17449)
tests/View/ViewFactoryTest.php
@@ -248,11 +248,12 @@ public function testComponentHandling() $factory->getDispatcher()->shouldReceive('fire'); $factory->startComponent('component', ['name' => 'Taylor']); $factory->slot('title'); + $factory->slot('website', 'laravel.com'); echo 'title<hr>'; $factory->endSlot(); echo 'component'; $contents = $factory->renderComponent(); - $this->assertEquals('title<hr> component Taylor', $contents); + $this->assertEquals('title<hr> component Taylor laravel.com', $contents); } public function testTranslation()
true
Other
laravel
framework
f6a24ada98c683f49a1606757f7cb0242226057b.json
Add option to inline slot content (#17449)
tests/View/fixtures/component.php
@@ -1 +1 @@ -<?php echo $title; ?> <?php echo $slot; ?> <?php echo $name; ?> +<?php echo $title; ?> <?php echo $slot; ?> <?php echo $name; ?> <?php echo $website; ?>
true
Other
laravel
framework
327031084cb24584ef7683137d72a260ff62a314.json
Apply fixes from StyleCI (#17434)
src/Illuminate/Broadcasting/BroadcastEvent.php
@@ -6,8 +6,8 @@ use ReflectionProperty; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\Job; -use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Broadcasting\Broadcaster; class BroadcastEvent implements ShouldQueue
false
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Database/Eloquent/Builder.php
@@ -7,7 +7,6 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Pagination\Paginator; -use Illuminate\Database\Query\Expression; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
@@ -3,7 +3,6 @@ namespace Illuminate\Database\Eloquent\Relations\Concerns; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Collection as BaseCollection;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Database/Schema/Grammars/ChangeColumn.php
@@ -6,7 +6,6 @@ use Doctrine\DBAL\Types\Type; use Illuminate\Support\Fluent; use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Schema\Column; use Illuminate\Database\Connection; use Doctrine\DBAL\Schema\Comparator; use Illuminate\Database\Schema\Blueprint;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Database/Schema/Grammars/Grammar.php
@@ -2,10 +2,7 @@ namespace Illuminate\Database\Schema\Grammars; -use Doctrine\DBAL\Types\Type; use Illuminate\Support\Fluent; -use Doctrine\DBAL\Schema\Table; -use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\TableDiff; use Illuminate\Database\Connection; use Illuminate\Database\Query\Expression;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Database/Schema/Grammars/RenameColumn.php
@@ -3,7 +3,6 @@ namespace Illuminate\Database\Schema\Grammars; use Illuminate\Support\Fluent; -use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\TableDiff; use Illuminate\Database\Connection;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Foundation/Http/FormRequest.php
@@ -3,7 +3,6 @@ namespace Illuminate\Foundation\Http; use Illuminate\Http\Request; -use Illuminate\Http\Response; use Illuminate\Http\JsonResponse; use Illuminate\Routing\Redirector; use Illuminate\Contracts\Container\Container;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
@@ -4,7 +4,6 @@ use Mockery; use Exception; -use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract; use Illuminate\Contracts\Events\Dispatcher as EventsDispatcherContract; use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Routing/Router.php
@@ -8,7 +8,6 @@ use Illuminate\Http\Response; use Illuminate\Support\Collection; use Illuminate\Container\Container; -use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Routing\BindingRegistrar;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Validation/Concerns/FormatsMessages.php
@@ -5,9 +5,6 @@ use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Illuminate\Contracts\Container\Container; -use Symfony\Component\HttpFoundation\File\File; -use Illuminate\Contracts\Translation\Translator; use Symfony\Component\HttpFoundation\File\UploadedFile; trait FormatsMessages
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/Validation/Validator.php
@@ -10,7 +10,6 @@ use Illuminate\Support\Fluent; use Illuminate\Support\MessageBag; use Illuminate\Contracts\Container\Container; -use Symfony\Component\HttpFoundation\File\File; use Illuminate\Contracts\Translation\Translator; use Symfony\Component\HttpFoundation\File\UploadedFile; use Illuminate\Contracts\Validation\Validator as ValidatorContract;
true
Other
laravel
framework
b610785600b47aa1ec382d6b3d8d63787f3b2d05.json
Remove unused imports. (#17421)
src/Illuminate/View/Concerns/ManagesEvents.php
@@ -4,8 +4,6 @@ use Closure; use Illuminate\Support\Str; -use Illuminate\Contracts\Events\Dispatcher; -use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\View\View as ViewContract; trait ManagesEvents
true
Other
laravel
framework
cfeb068cbcc032b1575b08f33671cdd144aea49b.json
Move property. (#17411)
src/Illuminate/Console/Scheduling/Schedule.php
@@ -16,6 +16,13 @@ class Schedule */ protected $cache; + /** + * All of the events on the schedule. + * + * @var array + */ + protected $events = []; + /** * Create a new event instance. * @@ -27,13 +34,6 @@ public function __construct(Cache $cache) $this->cache = $cache; } - /** - * All of the events on the schedule. - * - * @var array - */ - protected $events = []; - /** * Add a new callback event to the schedule. *
false
Other
laravel
framework
06551902b332cb952468a8cfaa8fab14f298dc90.json
move method location
src/Illuminate/Database/Eloquent/Builder.php
@@ -410,40 +410,6 @@ public function firstOr($columns = ['*'], Closure $callback = null) return call_user_func($callback); } - /** - * Save a new model and return the instance. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - */ - public function create(array $attributes = []) - { - $instance = $this->model->newInstance($attributes)->setConnection( - $this->query->getConnection()->getName() - ); - - $instance->save(); - - return $instance; - } - - /** - * Save a new model and return the instance. Allow mass-assignment. - * - * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model - */ - public function forceCreate(array $attributes) - { - $instance = $this->model->newInstance($attributes)->setConnection( - $this->query->getConnection()->getName() - ); - - return $this->model->unguarded(function () use ($attributes, $instance) { - return $instance->create($attributes); - }); - } - /** * Get a single column's value from the first result of a query. * @@ -806,6 +772,40 @@ public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'p ]); } + /** + * Save a new model and return the instance. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function create(array $attributes = []) + { + $instance = $this->model->newInstance($attributes)->setConnection( + $this->query->getConnection()->getName() + ); + + $instance->save(); + + return $instance; + } + + /** + * Save a new model and return the instance. Allow mass-assignment. + * + * @param array $attributes + * @return \Illuminate\Database\Eloquent\Model + */ + public function forceCreate(array $attributes) + { + $instance = $this->model->newInstance($attributes)->setConnection( + $this->query->getConnection()->getName() + ); + + return $this->model->unguarded(function () use ($attributes, $instance) { + return $instance->create($attributes); + }); + } + /** * Update a record in the database. *
false
Other
laravel
framework
2b2cde66defa59ffa02ca117262983acae8eda46.json
change method names and vars
src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
@@ -77,9 +77,9 @@ protected function getConfigurationFiles(Application $app) $configPath = realpath($app->configPath()); foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) { - $nesting = $this->getConfigurationNesting($file, $configPath); + $directory = $this->getNestedDirectory($file, $configPath); - $files[$nesting.basename($file->getRealPath(), '.php')] = $file->getRealPath(); + $files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath(); } return $files; @@ -92,14 +92,14 @@ protected function getConfigurationFiles(Application $app) * @param string $configPath * @return string */ - protected function getConfigurationNesting(SplFileInfo $file, $configPath) + protected function getNestedDirectory(SplFileInfo $file, $configPath) { $directory = $file->getPath(); - if ($tree = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) { - $tree = str_replace(DIRECTORY_SEPARATOR, '.', $tree).'.'; + if ($nested = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) { + $nested = str_replace(DIRECTORY_SEPARATOR, '.', $nested).'.'; } - return $tree; + return $nested; } }
false
Other
laravel
framework
ea9b2832d557805cafeecc879a5192b3d5997b04.json
change method names and vars
src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
@@ -77,9 +77,9 @@ protected function getConfigurationFiles(Application $app) $configPath = realpath($app->configPath()); foreach (Finder::create()->files()->name('*.php')->in($configPath) as $file) { - $nesting = $this->getConfigurationNesting($file, $configPath); + $directory = $this->getNestedDirectory($file, $configPath); - $files[$nesting.basename($file->getRealPath(), '.php')] = $file->getRealPath(); + $files[$directory.basename($file->getRealPath(), '.php')] = $file->getRealPath(); } return $files; @@ -92,14 +92,14 @@ protected function getConfigurationFiles(Application $app) * @param string $configPath * @return string */ - protected function getConfigurationNesting(SplFileInfo $file, $configPath) + protected function getNestedDirectory(SplFileInfo $file, $configPath) { $directory = $file->getPath(); - if ($tree = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) { - $tree = str_replace(DIRECTORY_SEPARATOR, '.', $tree).'.'; + if ($nested = trim(str_replace($configPath, '', $directory), DIRECTORY_SEPARATOR)) { + $nested = str_replace(DIRECTORY_SEPARATOR, '.', $nested).'.'; } - return $tree; + return $nested; } }
false
Other
laravel
framework
14d3818f339f1ca928feb19a3a67cd53c8454ba7.json
Fix mail notification for Mailgun (#17376)
src/Illuminate/Notifications/Channels/MailChannel.php
@@ -116,7 +116,7 @@ protected function addressMessage($mailMessage, $notifiable, $message) { $this->addSender($mailMessage, $message); - $mailMessage->bcc($this->getRecipients($notifiable, $message)); + $mailMessage->to($this->getRecipients($notifiable, $message)); } /**
true
Other
laravel
framework
14d3818f339f1ca928feb19a3a67cd53c8454ba7.json
Fix mail notification for Mailgun (#17376)
tests/Notifications/NotificationMailChannelTest.php
@@ -70,7 +70,7 @@ public function testMessageWithSubject() $mock->shouldReceive('subject')->once()->with('test subject'); - $mock->shouldReceive('bcc')->once()->with(['taylor@laravel.com']); + $mock->shouldReceive('to')->once()->with(['taylor@laravel.com']); $mock->shouldReceive('from')->never(); @@ -109,7 +109,7 @@ public function testMessageWithoutSubjectAutogeneratesSubjectFromClassName() $mock->shouldReceive('subject')->once()->with('Notification Mail Channel Test Notification No Subject'); - $mock->shouldReceive('bcc')->once()->with(['taylor@laravel.com']); + $mock->shouldReceive('to')->once()->with(['taylor@laravel.com']); $closure($mock); @@ -148,7 +148,7 @@ public function testMessageWithMultipleSenders() $mock->shouldReceive('to')->never(); - $mock->shouldReceive('bcc')->with(['taylor@laravel.com', 'jeffrey@laracasts.com']); + $mock->shouldReceive('to')->with(['taylor@laravel.com', 'jeffrey@laracasts.com']); $closure($mock); @@ -185,7 +185,7 @@ public function testMessageWithFromAddress() $mock->shouldReceive('subject')->once(); - $mock->shouldReceive('bcc')->once(); + $mock->shouldReceive('to')->once(); $mock->shouldReceive('from')->with('test@mail.com', 'Test Man'); @@ -224,7 +224,7 @@ public function testMessageWithFromAddressAndNoName() $mock->shouldReceive('subject')->once(); - $mock->shouldReceive('bcc')->once(); + $mock->shouldReceive('to')->once(); $mock->shouldReceive('from')->with('test@mail.com', null); @@ -263,7 +263,7 @@ public function testMessageWithReplyToAddress() $mock->shouldReceive('subject')->once(); - $mock->shouldReceive('bcc')->once(); + $mock->shouldReceive('to')->once(); $mock->shouldReceive('replyTo')->with('test@mail.com', 'Test Man'); @@ -302,7 +302,7 @@ public function testMessageWithReplyToAddressAndNoName() $mock->shouldReceive('subject')->once(); - $mock->shouldReceive('bcc')->once(); + $mock->shouldReceive('to')->once(); $mock->shouldReceive('replyTo')->with('test@mail.com', null); @@ -341,7 +341,7 @@ public function testMessageWithPriority() $mock->shouldReceive('subject')->once(); - $mock->shouldReceive('bcc')->once()->with(['taylor@laravel.com']); + $mock->shouldReceive('to')->once()->with(['taylor@laravel.com']); $mock->shouldReceive('setPriority')->once()->with(1);
true
Other
laravel
framework
7d2e774bf959933a5835762a7e6b1e3e45fdd75c.json
Fix BCC sends on Mailgun.
src/Illuminate/Mail/Transport/MailgunTransport.php
@@ -57,9 +57,11 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); + $to = $this->getTo($message); + $message->setBcc([]); - $this->client->post($this->url, $this->payload($message)); + $this->client->post($this->url, $this->payload($message, $to)); $this->sendPerformed($message); @@ -72,7 +74,7 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) * @param \Swift_Mime_Message $message * @return array */ - protected function payload(Swift_Mime_Message $message) + protected function payload(Swift_Mime_Message $message, $to) { return [ 'auth' => [ @@ -82,7 +84,7 @@ protected function payload(Swift_Mime_Message $message) 'multipart' => [ [ 'name' => 'to', - 'contents' => $this->getTo($message), + 'contents' => $to, ], [ 'name' => 'message',
false
Other
laravel
framework
5394b1d537dfbee9e374f164d279389b0fe68f51.json
update doc block
src/Illuminate/Foundation/helpers.php
@@ -555,7 +555,7 @@ function method_field($method) * @param string $path * @return \Illuminate\Support\HtmlString * - * @throws \InvalidArgumentException + * @throws \Exception */ function mix($path) {
false
Other
laravel
framework
9282278a8917f76e4d33d90ef3778bcf46b6cd8c.json
Apply fixes from StyleCI (#17379)
src/Illuminate/Foundation/helpers.php
@@ -577,7 +577,7 @@ function mix($path) if (! array_key_exists($path, $manifest)) { throw new Exception( "Unable to locate Mix file: {$path}. Please check your ". - "webpack.mix.js output paths and try again." + 'webpack.mix.js output paths and try again.' ); }
false
Other
laravel
framework
6ea4997fcf7cf0ae4c18bce9418817ff00e4727f.json
Add mix file for loading versioned mix files.
src/Illuminate/Foundation/helpers.php
@@ -548,6 +548,45 @@ function method_field($method) } } +if (! function_exists('mix')) { + /** + * Get the path to a versioned Mix file. + * + * @param string $path + * @return \Illuminate\Support\HtmlString + * + * @throws \InvalidArgumentException + */ + function mix($path) + { + static $manifest; + static $shouldHotReload; + + if (! $manifest) { + if (! file_exists($manifestPath = public_path('mix-manifest.json'))) { + throw new Exception('The Mix manifest does not exist.'); + } + + $manifest = json_decode(file_get_contents($manifestPath), true); + } + + if (! starts_with($path, '/')) { + $path = "/{$path}"; + } + + if (! array_key_exists($path, $manifest)) { + throw new Exception( + "Unable to locate Mix file: {$path}. Please check your ". + "webpack.mix.js output paths and try again." + ); + } + + return $shouldHotReload = file_exists(public_path('hot')) + ? new HtmlString("http://localhost:8080{$manifest[$path]}") + : new HtmlString(url($manifest[$path])); + } +} + if (! function_exists('old')) { /** * Retrieve an old input item.
false
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Auth/AuthAccessGateTest.php
@@ -2,13 +2,13 @@ namespace Illuminate\Tests\Auth; +use StdClass; use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Illuminate\Auth\Access\Gate; use Illuminate\Container\Container; use Illuminate\Auth\Access\Response; use Illuminate\Auth\Access\HandlesAuthorization; -use StdClass; class GateTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Auth/AuthDatabaseTokenRepositoryTest.php
@@ -2,9 +2,9 @@ namespace Illuminate\Tests\Auth; -use Illuminate\Auth\Passwords\DatabaseTokenRepository; use Mockery as m; use PHPUnit\Framework\TestCase; +use Illuminate\Auth\Passwords\DatabaseTokenRepository; class AuthDatabaseTokenRepositoryTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Auth/AuthDatabaseUserProviderTest.php
@@ -2,9 +2,9 @@ namespace Illuminate\Tests\Auth; -use Illuminate\Auth\DatabaseUserProvider; use Mockery as m; use PHPUnit\Framework\TestCase; +use Illuminate\Auth\DatabaseUserProvider; class AuthDatabaseUserProviderTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Auth/AuthTokenGuardTest.php
@@ -2,9 +2,9 @@ namespace Illuminate\Tests\Auth; +use Mockery; use Illuminate\Http\Request; use Illuminate\Auth\TokenGuard; -use Mockery; use PHPUnit\Framework\TestCase; use Illuminate\Contracts\Auth\UserProvider;
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Auth/AuthorizeMiddlewareTest.php
@@ -2,6 +2,7 @@ namespace Illuminate\Tests\Auth; +use stdClass; use Mockery as m; use Illuminate\Http\Request; use Illuminate\Routing\Router; @@ -14,7 +15,6 @@ use Illuminate\Contracts\Auth\Factory as Auth; use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Contracts\Auth\Access\Gate as GateContract; -use stdClass; class AuthorizeMiddlewareTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Cache/CacheMemcachedConnectorTest.php
@@ -4,8 +4,8 @@ use Memcached; use Mockery as m; -use PHPUnit\Framework\TestCase; use RuntimeException; +use PHPUnit\Framework\TestCase; class CacheMemcachedConnectorTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Cache/CacheTaggedCacheTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Cache; -use DateInterval; use DateTime; +use DateInterval; use Mockery as m; use PHPUnit\Framework\TestCase; use Illuminate\Cache\ArrayStore;
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Container/ContainerTest.php
@@ -2,10 +2,10 @@ namespace Illuminate\Tests\Container; +use stdClass; +use ReflectionException; use PHPUnit\Framework\TestCase; use Illuminate\Container\Container; -use ReflectionException; -use stdClass; class ContainerTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseConnectionFactoryTest.php
@@ -2,13 +2,13 @@ namespace Illuminate\Tests\Database; -use InvalidArgumentException; use Mockery as m; +use ReflectionProperty; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Illuminate\Database\Connection; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Connectors\ConnectionFactory; -use ReflectionProperty; class DatabaseConnectionFactoryTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseConnectionTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Database; -use Mockery as m; use PDO; +use Mockery as m; use PHPUnit\Framework\TestCase; class DatabaseConnectionTest extends TestCase
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseConnectorTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Database; -use Mockery as m; use PDO; +use Mockery as m; use PHPUnit\Framework\TestCase; class DatabaseConnectorTest extends TestCase
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseEloquentBelongsToManyTest.php
@@ -2,15 +2,15 @@ namespace Illuminate\Tests\Database; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\ModelNotFoundException; +use stdClass; use Mockery as m; +use ReflectionClass; use PHPUnit\Framework\TestCase; +use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Collection as BaseCollection; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\Relations\BelongsToMany; -use ReflectionClass; -use stdClass; class DatabaseEloquentBelongsToManyTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseEloquentBuilderTest.php
@@ -2,12 +2,12 @@ namespace Illuminate\Tests\Database; +use StdClass; use Mockery as m; use PHPUnit\Framework\TestCase; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Collection as BaseCollection; -use StdClass; class DatabaseEloquentBuilderTest extends TestCase {
true
Other
laravel
framework
a414265ee94da32004198ffe9a8ec47efb39a827.json
Apply fixes from StyleCI (#17375)
tests/Database/DatabaseEloquentHasManyTest.php
@@ -2,11 +2,11 @@ namespace Illuminate\Tests\Database; +use stdClass; use Mockery as m; use PHPUnit\Framework\TestCase; use Illuminate\Database\Eloquent\Collection; use Illuminate\Database\Eloquent\Relations\HasMany; -use stdClass; class DatabaseEloquentHasManyTest extends TestCase {
true