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
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentMorphToGlobalScopesTest.php
@@ -14,7 +14,7 @@ */ class EloquentMorphToGlobalScopesTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentMorphToLazyEagerLoadingTest.php
@@ -13,7 +13,7 @@ */ class EloquentMorphToLazyEagerLoadingTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentMorphToSelectTest.php
@@ -12,7 +12,7 @@ */ class EloquentMorphToSelectTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentMorphToTouchesTest.php
@@ -13,7 +13,7 @@ */ class EloquentMorphToTouchesTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentPaginateTest.php
@@ -11,7 +11,7 @@ */ class EloquentPaginateTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentPivotSerializationTest.php
@@ -14,7 +14,7 @@ */ class EloquentPivotSerializationTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentPushTest.php
@@ -11,7 +11,7 @@ */ class EloquentPushTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentTouchParentWithGlobalScopeTest.php
@@ -13,7 +13,7 @@ */ class EloquentTouchParentWithGlobalScopeTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentUpdateTest.php
@@ -26,7 +26,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentWhereHasTest.php
@@ -12,7 +12,7 @@ */ class EloquentWhereHasTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentWhereTest.php
@@ -11,7 +11,7 @@ */ class EloquentWhereTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/EloquentWithCountTest.php
@@ -11,7 +11,7 @@ */ class EloquentWithCountTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Database/QueryBuilderTest.php
@@ -12,7 +12,7 @@ */ class QueryBuilderTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Foundation/Testing/Concerns/InteractsWithAuthenticationTest.php
@@ -23,7 +23,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Http/Middleware/VerifyCsrfTokenExceptTest.php
@@ -11,7 +11,7 @@ class VerifyCsrfTokenExceptTest extends TestCase private $stub; private $request; - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Http/ThrottleRequestsTest.php
@@ -14,7 +14,7 @@ */ class ThrottleRequestsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); Carbon::setTestNow(null);
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Http/ThrottleRequestsWithRedisTest.php
@@ -16,7 +16,7 @@ class ThrottleRequestsWithRedisTest extends TestCase { use InteractsWithRedis; - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); Carbon::setTestNow(null);
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Mail/SendingMailWithLocaleTest.php
@@ -18,7 +18,7 @@ */ class SendingMailWithLocaleTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); @@ -46,7 +46,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function setUp(): void + protected function setUp(): void { parent::setUp(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Notifications/SendingMailNotificationsTest.php
@@ -23,7 +23,7 @@ class SendingMailNotificationsTest extends TestCase public $mailer; public $markdown; - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); @@ -54,7 +54,7 @@ protected function getEnvironmentSetUp($app) }); } - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Notifications/SendingNotificationsWithLocaleTest.php
@@ -53,7 +53,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Queue/CallQueuedHandlerTest.php
@@ -17,7 +17,7 @@ */ class CallQueuedHandlerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { parent::tearDown();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Queue/JobChainingTest.php
@@ -29,7 +29,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function tearDown(): void + protected function tearDown(): void { JobChainingTestFirstJob::$ran = false; JobChainingTestSecondJob::$ran = false;
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Queue/ModelSerializationTest.php
@@ -34,7 +34,7 @@ protected function getEnvironmentSetUp($app) ]); } - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Integration/Validation/ValidatorTest.php
@@ -12,7 +12,7 @@ class ValidatorTest extends DatabaseTestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Log/LogLoggerTest.php
@@ -13,7 +13,7 @@ class LogLoggerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Mail/MailMailerTest.php
@@ -18,7 +18,7 @@ class MailMailerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Mail/MailMarkdownTest.php
@@ -9,7 +9,7 @@ class MailMarkdownTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Mail/MailMessageTest.php
@@ -20,15 +20,15 @@ class MailMessageTest extends TestCase */ protected $message; - public function setUp(): void + protected function setUp(): void { parent::setUp(); $this->swift = m::mock(Swift_Mime_Message::class); $this->message = new Message($this->swift); } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Mail/MailableQueuedTest.php
@@ -19,7 +19,7 @@ class MailableQueuedTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Notifications/NotificationBroadcastChannelTest.php
@@ -13,7 +13,7 @@ class NotificationBroadcastChannelTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Notifications/NotificationChannelManagerTest.php
@@ -18,7 +18,7 @@ class NotificationChannelManagerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Notifications/NotificationDatabaseChannelTest.php
@@ -10,7 +10,7 @@ class NotificationDatabaseChannelTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Notifications/NotificationRoutesNotificationsTest.php
@@ -11,7 +11,7 @@ class NotificationRoutesNotificationsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Notifications/NotificationSendQueuedNotificationTest.php
@@ -9,7 +9,7 @@ class NotificationSendQueuedNotificationTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Pagination/LengthAwarePaginatorTest.php
@@ -17,13 +17,13 @@ class LengthAwarePaginatorTest extends TestCase */ private $options; - public function setUp(): void + protected function setUp(): void { $this->options = ['onEachSide' => 5]; $this->p = new LengthAwarePaginator($array = ['item1', 'item2', 'item3', 'item4'], 4, 2, 2, $this->options); } - public function tearDown(): void + protected function tearDown(): void { unset($this->p); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueBeanstalkdJobTest.php
@@ -15,7 +15,7 @@ class QueueBeanstalkdJobTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueBeanstalkdQueueTest.php
@@ -12,7 +12,7 @@ class QueueBeanstalkdQueueTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueDatabaseQueueIntegrationTest.php
@@ -27,7 +27,7 @@ class QueueDatabaseQueueIntegrationTest extends TestCase */ protected $container; - public function setUp(): void + protected function setUp(): void { $db = new DB; @@ -95,7 +95,7 @@ protected function schema() * * @return void */ - public function tearDown(): void + protected function tearDown(): void { $this->schema()->drop('jobs'); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueDatabaseQueueUnitTest.php
@@ -12,7 +12,7 @@ class QueueDatabaseQueueUnitTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueListenerTest.php
@@ -10,7 +10,7 @@ class QueueListenerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueManagerTest.php
@@ -10,7 +10,7 @@ class QueueManagerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueRedisJobTest.php
@@ -11,7 +11,7 @@ class QueueRedisJobTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueRedisQueueTest.php
@@ -11,7 +11,7 @@ class QueueRedisQueueTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueSqsJobTest.php
@@ -12,7 +12,7 @@ class QueueSqsJobTest extends TestCase { - public function setUp(): void + protected function setUp(): void { $this->key = 'AMAZONSQSKEY'; $this->secret = 'AmAz0n+SqSsEcReT+aLpHaNuM3R1CsTr1nG'; @@ -50,7 +50,7 @@ public function setUp(): void ]; } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueSqsQueueTest.php
@@ -13,12 +13,12 @@ class QueueSqsQueueTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); } - public function setUp(): void + protected function setUp(): void { // Use Mockery to mock the SqsClient $this->sqs = m::mock(SqsClient::class);
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueSyncQueueTest.php
@@ -13,7 +13,7 @@ class QueueSyncQueueTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/QueueWorkerTest.php
@@ -23,7 +23,7 @@ class QueueWorkerTest extends TestCase public $events; public $exceptionHandler; - public function setUp(): void + protected function setUp(): void { $this->events = m::spy(Dispatcher::class); $this->exceptionHandler = m::spy(ExceptionHandler::class); @@ -34,7 +34,7 @@ public function setUp(): void $container->instance(ExceptionHandler::class, $this->exceptionHandler); } - public function tearDown(): void + protected function tearDown(): void { Container::setInstance(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Queue/RedisQueueIntegrationTest.php
@@ -20,14 +20,14 @@ class RedisQueueIntegrationTest extends TestCase */ private $queue; - public function setUp(): void + protected function setUp(): void { Carbon::setTestNow(Carbon::now()); parent::setUp(); $this->setUpRedis(); } - public function tearDown(): void + protected function tearDown(): void { Carbon::setTestNow(null); parent::tearDown();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Redis/ConcurrentLimiterTest.php
@@ -15,7 +15,7 @@ class ConcurrentLimiterTest extends TestCase { use InteractsWithRedis; - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Redis/DurationLimiterTest.php
@@ -15,7 +15,7 @@ class DurationLimiterTest extends TestCase { use InteractsWithRedis; - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Redis/RedisConnectionTest.php
@@ -14,7 +14,7 @@ class RedisConnectionTest extends TestCase { use InteractsWithRedis; - public function setUp(): void + protected function setUp(): void { parent::setUp(); $this->setUpRedis(); @@ -28,7 +28,7 @@ public function setUp(): void } } - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); $this->tearDownRedis();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Routing/RouteCollectionTest.php
@@ -14,7 +14,7 @@ class RouteCollectionTest extends TestCase */ protected $routeCollection; - public function setUp(): void + protected function setUp(): void { parent::setUp();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Routing/RouteRegistrarTest.php
@@ -17,14 +17,14 @@ class RouteRegistrarTest extends TestCase */ protected $router; - public function setUp(): void + protected function setUp(): void { parent::setUp(); $this->router = new Router(m::mock(Dispatcher::class), Container::getInstance()); } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Routing/RoutingRedirectorTest.php
@@ -19,7 +19,7 @@ class RoutingRedirectorTest extends TestCase protected $session; protected $redirect; - public function setUp(): void + protected function setUp(): void { $this->headers = m::mock(HeaderBag::class); @@ -45,7 +45,7 @@ public function setUp(): void $this->redirect->setSession($this->session); } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Session/EncryptedSessionStoreTest.php
@@ -11,7 +11,7 @@ class EncryptedSessionStoreTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Session/SessionStoreTest.php
@@ -13,7 +13,7 @@ class SessionStoreTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Session/SessionTableCommandTest.php
@@ -14,7 +14,7 @@ class SessionTableCommandTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportCapsuleManagerTraitTest.php
@@ -13,7 +13,7 @@ class SupportCapsuleManagerTraitTest extends TestCase { use CapsuleManagerTrait; - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportCarbonTest.php
@@ -17,14 +17,14 @@ class SupportCarbonTest extends TestCase */ protected $now; - public function setUp(): void + protected function setUp(): void { parent::setUp(); Carbon::setTestNow($this->now = Carbon::create(2017, 6, 27, 13, 14, 15, 'UTC')); } - public function tearDown(): void + protected function tearDown(): void { Carbon::setTestNow(); Carbon::serializeUsing(null);
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportFacadeTest.php
@@ -11,13 +11,13 @@ class SupportFacadeTest extends TestCase { - public function setUp(): void + protected function setUp(): void { Facade::clearResolvedInstances(); FacadeStub::setFacadeApplication(null); } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportFacadesEventTest.php
@@ -27,7 +27,7 @@ protected function setUp(): void Facade::setFacadeApplication($container); } - public function tearDown(): void + protected function tearDown(): void { Event::clearResolvedInstances();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportHelpersTest.php
@@ -14,7 +14,7 @@ class SupportHelpersTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportMacroableTest.php
@@ -9,7 +9,7 @@ class SupportMacroableTest extends TestCase { private $macroable; - public function setUp(): void + protected function setUp(): void { $this->macroable = $this->createObjectForTrait(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportMessageBagTest.php
@@ -9,7 +9,7 @@ class SupportMessageBagTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Support/SupportServiceProviderTest.php
@@ -9,7 +9,7 @@ class SupportServiceProviderTest extends TestCase { - public function setUp(): void + protected function setUp(): void { ServiceProvider::$publishes = []; ServiceProvider::$publishGroups = []; @@ -21,7 +21,7 @@ public function setUp(): void $two->boot(); } - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Translation/TranslationFileLoaderTest.php
@@ -9,7 +9,7 @@ class TranslationFileLoaderTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Translation/TranslationTranslatorTest.php
@@ -11,7 +11,7 @@ class TranslationTranslatorTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Validation/ValidationDatabasePresenceVerifierTest.php
@@ -11,7 +11,7 @@ class ValidationDatabasePresenceVerifierTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Validation/ValidationExistsRuleTest.php
@@ -18,7 +18,7 @@ class ValidationExistsRuleTest extends TestCase * * @return void */ - public function setUp(): void + protected function setUp(): void { $db = new DB; @@ -159,7 +159,7 @@ protected function getConnectionResolver() * * @return void */ - public function tearDown(): void + protected function tearDown(): void { $this->schema('default')->drop('users'); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Validation/ValidationFactoryTest.php
@@ -11,7 +11,7 @@ class ValidationFactoryTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/Validation/ValidationValidatorTest.php
@@ -26,7 +26,7 @@ class ValidationValidatorTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { Carbon::setTestNow(); m::close();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/Blade/AbstractBladeTestCase.php
@@ -11,13 +11,13 @@ abstract class AbstractBladeTestCase extends TestCase { protected $compiler; - public function setUp(): void + protected function setUp(): void { $this->compiler = new BladeCompiler(m::mock(Filesystem::class), __DIR__); parent::setUp(); } - public function tearDown(): void + protected function tearDown(): void { m::close();
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/Blade/BladeElseAuthStatementsTest.php
@@ -9,7 +9,7 @@ class BladeElseAuthStatementsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/Blade/BladeElseGuestStatementsTest.php
@@ -9,7 +9,7 @@ class BladeElseGuestStatementsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/Blade/BladeIfAuthStatementsTest.php
@@ -9,7 +9,7 @@ class BladeIfAuthStatementsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/Blade/BladeIfGuestStatementsTest.php
@@ -9,7 +9,7 @@ class BladeIfGuestStatementsTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewBladeCompilerTest.php
@@ -10,7 +10,7 @@ class ViewBladeCompilerTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewCompilerEngineTest.php
@@ -9,7 +9,7 @@ class ViewCompilerEngineTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewFactoryTest.php
@@ -23,7 +23,7 @@ class ViewFactoryTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewFileViewFinderTest.php
@@ -10,7 +10,7 @@ class ViewFileViewFinderTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewPhpEngineTest.php
@@ -8,7 +8,7 @@ class ViewPhpEngineTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
222800c2658647619ed9cbf608faaae277a1c8a1.json
Use proper method visibility
tests/View/ViewTest.php
@@ -16,7 +16,7 @@ class ViewTest extends TestCase { - public function tearDown(): void + protected function tearDown(): void { m::close(); }
true
Other
laravel
framework
76c64672bf5de65cf1514cbe051d0207f9469c87.json
fix docblock to be consistent with implementation
src/Illuminate/Contracts/Foundation/Application.php
@@ -83,15 +83,15 @@ public function boot(); /** * Register a new boot listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booting($callback); /** * Register a new "booted" listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booted($callback);
false
Other
laravel
framework
ecb57fe678c3dcb0547053bc3429f49d09b03fad.json
Replace deprecated shouldDeferMissing usages
tests/Database/DatabaseSoftDeletingScopeTest.php
@@ -76,7 +76,7 @@ public function testOnlyTrashedExtension() m::mock(Processor::class) )); $model = m::mock(Model::class); - $model->shouldDeferMissing(); + $model->makePartial(); $scope = m::mock(SoftDeletingScope::class.'[remove]'); $scope->extend($builder); $callback = $builder->getMacro('onlyTrashed'); @@ -99,7 +99,7 @@ public function testWithoutTrashedExtension() m::mock(Processor::class) )); $model = m::mock(Model::class); - $model->shouldDeferMissing(); + $model->makePartial(); $scope = m::mock(SoftDeletingScope::class.'[remove]'); $scope->extend($builder); $callback = $builder->getMacro('withoutTrashed');
true
Other
laravel
framework
ecb57fe678c3dcb0547053bc3429f49d09b03fad.json
Replace deprecated shouldDeferMissing usages
tests/Database/DatabaseSoftDeletingTraitTest.php
@@ -17,7 +17,7 @@ public function tearDown() public function testDeleteSetsSoftDeletedColumn() { $model = m::mock(DatabaseSoftDeletingTraitStub::class); - $model->shouldDeferMissing(); + $model->makePartial(); $model->shouldReceive('newModelQuery')->andReturn($query = m::mock(stdClass::class)); $query->shouldReceive('where')->once()->with('id', 1)->andReturn($query); $query->shouldReceive('update')->once()->with([ @@ -32,7 +32,7 @@ public function testDeleteSetsSoftDeletedColumn() public function testRestore() { $model = m::mock(DatabaseSoftDeletingTraitStub::class); - $model->shouldDeferMissing(); + $model->makePartial(); $model->shouldReceive('fireModelEvent')->with('restoring')->andReturn(true); $model->shouldReceive('save')->once(); $model->shouldReceive('fireModelEvent')->with('restored', false)->andReturn(true); @@ -45,7 +45,7 @@ public function testRestore() public function testRestoreCancel() { $model = m::mock(DatabaseSoftDeletingTraitStub::class); - $model->shouldDeferMissing(); + $model->makePartial(); $model->shouldReceive('fireModelEvent')->with('restoring')->andReturn(false); $model->shouldReceive('save')->never();
true
Other
laravel
framework
eed706256bb778ec30ac93bf07f79913a423ba53.json
Use dev-phpunit8 for testing
composer.json
@@ -83,7 +83,7 @@ "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.8.*", + "orchestra/testbench-core": "dev-phpunit8 as 3.8.x-dev", "pda/pheanstalk": "^3.0", "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1",
false
Other
laravel
framework
1079ef9e1e22dc605e1486e7063d6a563f7c87ec.json
Remove duplicate code
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
@@ -415,16 +415,6 @@ public function prepareBindingsForUpdate(array $bindings, array $values) ); } - /** - * Determine if the grammar supports savepoints. - * - * @return bool - */ - public function supportsSavepoints() - { - return true; - } - /** * Compile the SQL statement to define a savepoint. *
false
Other
laravel
framework
35df766a03233f41dfd9293c39a92618170f5dda.json
add test for booting callbacks
tests/Foundation/FoundationApplicationTest.php
@@ -221,24 +221,58 @@ public function testAfterBootstrappingAddsClosure() public function testBootingCallbacks() { - $app = new Application; + $application = new Application; $counter = 0; - $closure = function ($app) use (&$counter) { + $closure = function ($app) use (&$counter, $application) { $counter++; - $this->assertInstanceOf(Application::class, $app); + $this->assertSame($application, $app); }; - $closure2 = function ($app) use (&$counter) { + $closure2 = function ($app) use (&$counter, $application) { $counter++; - $this->assertInstanceOf(Application::class, $app); + $this->assertSame($application, $app); }; - $app->booting($closure); - $app->booting($closure2); - $app->boot(); + $application->booting($closure); + $application->booting($closure2); + + $application->boot(); + $this->assertEquals(2, $counter); } + + public function testBootedCallbacks() + { + $application = new Application; + + $counter = 0; + $closure = function ($app) use (&$counter, $application) { + $counter++; + $this->assertSame($application, $app); + }; + + $closure2 = function ($app) use (&$counter, $application) { + $counter++; + $this->assertSame($application, $app); + }; + + $closure3 = function ($app) use (&$counter, $application) { + $counter++; + $this->assertSame($application, $app); + }; + + $application->booting($closure); + $application->booted($closure); + $application->booted($closure2); + $application->boot(); + + $this->assertEquals(3, $counter); + + $application->booted($closure3); + + $this->assertEquals(4, $counter); + } } class ApplicationBasicServiceProviderStub extends ServiceProvider
false
Other
laravel
framework
60cea2f3cb5c813e990bafacc02de674d79b52e5.json
change doc blocks to be more descriptive
src/Illuminate/Foundation/Application.php
@@ -55,14 +55,14 @@ class Application extends Container implements ApplicationContract, HttpKernelIn /** * The array of booting callbacks. * - * @var array + * @var callable[] */ protected $bootingCallbacks = []; /** * The array of booted callbacks. * - * @var array + * @var callable[] */ protected $bootedCallbacks = []; @@ -823,7 +823,7 @@ protected function bootProvider(ServiceProvider $provider) /** * Register a new boot listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booting($callback) @@ -834,7 +834,7 @@ public function booting($callback) /** * Register a new "booted" listener. * - * @param mixed $callback + * @param callable $callback * @return void */ public function booted($callback) @@ -849,7 +849,7 @@ public function booted($callback) /** * Call the booting callbacks for the application. * - * @param array $callbacks + * @param callable[] $callbacks * @return void */ protected function fireAppCallbacks(array $callbacks)
false
Other
laravel
framework
aa8f695cb18edb950938591593f0e0e5bfc3d7b1.json
Add test for booting callbacks
tests/Foundation/FoundationApplicationTest.php
@@ -218,6 +218,27 @@ public function testAfterBootstrappingAddsClosure() $app->afterBootstrapping(RegisterFacades::class, $closure); $this->assertArrayHasKey(0, $app['events']->getListeners('bootstrapped: Illuminate\Foundation\Bootstrap\RegisterFacades')); } + + public function testBootingCallbacks() + { + $app = new Application; + + $counter = 0; + $closure = function ($app) use (&$counter) { + $counter++; + $this->assertInstanceOf(Application::class, $app); + }; + + $closure2 = function ($app) use (&$counter) { + $counter++; + $this->assertInstanceOf(Application::class, $app); + }; + + $app->booting($closure); + $app->booting($closure2); + $app->boot(); + $this->assertEquals(2, $counter); + } } class ApplicationBasicServiceProviderStub extends ServiceProvider
false
Other
laravel
framework
f4ee68ab64297404a6d354130e8f5e5155ed7c02.json
Add a getter for the tag set
src/Illuminate/Cache/TaggedCache.php
@@ -84,6 +84,16 @@ public function taggedItemKey($key) return sha1($this->tags->getNamespace()).':'.$key; } + /** + * Get the tag set instance. + * + * @return \Illuminate\Cache\TagSet + */ + public function getTags() + { + return $this->tags; + } + /** * Fire an event for this cache instance. *
false
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Database/DatabaseConnectionFactoryTest.php
@@ -2,10 +2,10 @@ namespace Illuminate\Tests\Database; -use InvalidArgumentException; use PDO; use Mockery as m; use ReflectionProperty; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Illuminate\Container\Container; use Illuminate\Database\Capsule\Manager as DB;
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Database/DatabaseEloquentCollectionTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Database; -use LogicException; use Mockery as m; +use LogicException; use PHPUnit\Framework\TestCase; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Collection;
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Database/DatabaseEloquentHasManyThroughIntegrationTest.php
@@ -2,11 +2,11 @@ namespace Illuminate\Tests\Database; -use Illuminate\Database\Eloquent\ModelNotFoundException; use PHPUnit\Framework\TestCase; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Eloquent\Model as Eloquent; +use Illuminate\Database\Eloquent\ModelNotFoundException; class DatabaseEloquentHasManyThroughIntegrationTest extends TestCase {
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Database/DatabaseEloquentHasOneThroughIntegrationTest.php
@@ -2,11 +2,11 @@ namespace Illuminate\Tests\Database; -use Illuminate\Database\Eloquent\ModelNotFoundException; use PHPUnit\Framework\TestCase; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Eloquent\Model as Eloquent; +use Illuminate\Database\Eloquent\ModelNotFoundException; class DatabaseEloquentHasOneThroughIntegrationTest extends TestCase {
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Database/DatabaseMigrationCreatorTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Database; -use InvalidArgumentException; use Mockery as m; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Illuminate\Filesystem\Filesystem; use Illuminate\Database\Migrations\MigrationCreator;
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Filesystem/FilesystemTest.php
@@ -2,14 +2,14 @@ namespace Illuminate\Tests\Filesystem; -use Illuminate\Contracts\Filesystem\FileNotFoundException; use SplFileInfo; use Mockery as m; use PHPUnit\Framework\TestCase; use League\Flysystem\Adapter\Ftp; use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Application; use Illuminate\Filesystem\FilesystemManager; +use Illuminate\Contracts\Filesystem\FileNotFoundException; class FilesystemTest extends TestCase {
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Routing/RouteRegistrarTest.php
@@ -2,8 +2,8 @@ namespace Illuminate\Tests\Routing; -use BadMethodCallException; use Mockery as m; +use BadMethodCallException; use Illuminate\Http\Request; use Illuminate\Routing\Router; use PHPUnit\Framework\TestCase;
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/Routing/RoutingRouteTest.php
@@ -10,7 +10,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Routing\Route; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use UnexpectedValueException; use Illuminate\Routing\Router; use PHPUnit\Framework\TestCase; @@ -28,6 +27,7 @@ use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Database\Eloquent\ModelNotFoundException; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class RoutingRouteTest extends TestCase {
true
Other
laravel
framework
bd8d6bfd7a4c6c4240a1b6f30934e23a361d4baf.json
Apply fixes from StyleCI (#27440)
tests/View/ViewTest.php
@@ -2,11 +2,11 @@ namespace Illuminate\Tests\View; -use BadMethodCallException; use Closure; use ArrayAccess; use Mockery as m; use Illuminate\View\View; +use BadMethodCallException; use Illuminate\View\Factory; use PHPUnit\Framework\TestCase; use Illuminate\Support\MessageBag;
true