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
5f8062c0dab1cfcd3959c7661fd778ed85cc9b2d.json
Refactor some code.
src/Illuminate/Pagination/Paginator.php
@@ -164,16 +164,6 @@ public function appends($key, $value) return $this->addQuery($key, $value); } - /** - * The pagination environment. - * - * @var \Illuminate\Pagination\Environment - */ - public function getEnvironment() - { - return $this->env; - } - /** * Add a query string value to the paginator. * @@ -238,6 +228,16 @@ public function getTotal() return $this->total; } + /** + * Get the pagination environment. + * + * @var \Illuminate\Pagination\Environment + */ + public function getEnvironment() + { + return $this->env; + } + /** * Get an iterator for the items. *
false
Other
laravel
framework
10010f4ed208b7c46f5f871d54733fd4a4eb12d5.json
Set the URL when in console context.
src/Illuminate/Foundation/Application.php
@@ -116,7 +116,7 @@ protected function createRequest(Request $request = null) */ public function setRequestForConsoleEnvironment() { - $url = $this['config']['app.url']; + $url = $this['config']->get('app.url', 'http://localhost'); $this['request'] = Request::create($url, 'GET', array(), array(), array(), $_SERVER); }
true
Other
laravel
framework
10010f4ed208b7c46f5f871d54733fd4a4eb12d5.json
Set the URL when in console context.
src/Illuminate/Foundation/start.php
@@ -140,6 +140,22 @@ $app->instance('config', $config); +/* +|-------------------------------------------------------------------------- +| Set The Console Request If Necessary +|-------------------------------------------------------------------------- +| +| If we're running in a console context, we won't have a host on this +| request so we'll need to re-bind a new request with a URL from a +| configuration file. This will help the URL generator generate. +| +*/ + +if ($app->runningInConsole()) +{ + $app->setRequestForConsoleEnvironment(); +} + /* |-------------------------------------------------------------------------- | Set The Default Timezone
true
Other
laravel
framework
3c09eec7372647e88ab4de42b70013e53a8e7f69.json
Allow laravel/framework to replace illuminate/html Signed-off-by: crynobone <crynobone@gmail.com>
composer.json
@@ -46,6 +46,7 @@ "illuminate/foundation": "self.version", "illuminate/hashing": "self.version", "illuminate/http": "self.version", + "illuminate/html": "self.version", "illuminate/log": "self.version", "illuminate/mail": "self.version", "illuminate/pagination": "self.version",
false
Other
laravel
framework
0602fe003c503c083d1b04510ee9dead49cb2dd3.json
Fix path handling.
src/Illuminate/Exception/ExceptionServiceProvider.php
@@ -151,12 +151,37 @@ protected function registerWhoopsHandler() } else { - $this->app['whoops.handler'] = function() - { - with($handler = new PrettyPageHandler)->setResourcesPath(__DIR__.'/resources'); - - return $handler; - }; + $this->registerPrettyWhoopsHandler(); + } + } + + /** + * Register the "pretty" Whoops handler. + * + * @return void + */ + protected function registerPrettyWhoopsHandler() + { + $this->app['whoops.handler'] = function() + { + $handler = new PrettyPageHandler; + + if ( ! is_null($path = $this->resourcePath())) $handler->setResourcesPath($path); + + return $handler; + }; + } + + /** + * Get the resource path for Whoops. + * + * @return string + */ + protected function resourcePath() + { + if (is_dir($path = $this->app['path.base'].'/vendor/laravel/framework/src/Exception/resources')) + { + return $path; } }
false
Other
laravel
framework
1df406b5a689c51b424837e6e64b2e66a5ce8403.json
Fix a test.
tests/Foundation/FoundationApplicationTest.php
@@ -122,6 +122,7 @@ public function testExceptionHandlingSendsResponseFromCustomHandler() public function testNoResponseFromCustomHandlerCallsKernelExceptionHandler() { $app = new Application; + $app['config'] = array('app.debug' => false); $exception = new Exception; $errorHandler = m::mock('stdClass'); $exceptionHandler = m::mock('stdClass');
false
Other
laravel
framework
fc1b82670a2d6878a1e1ae8667e25d3dc0c86c15.json
Allow incrementing offsets in a collection. Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
src/Illuminate/Support/Collection.php
@@ -251,7 +251,14 @@ public function offsetGet($key) */ public function offsetSet($key, $value) { - $this->items[$key] = $value; + if(is_null($key)) + { + $this->items[] = $value; + } + else + { + $this->items[$key] = $value; + } } /**
true
Other
laravel
framework
fc1b82670a2d6878a1e1ae8667e25d3dc0c86c15.json
Allow incrementing offsets in a collection. Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
tests/Support/SupportCollectionTest.php
@@ -86,6 +86,8 @@ public function testOffsetAccess() $this->assertTrue(isset($c['name'])); unset($c['name']); $this->assertFalse(isset($c['name'])); + $c[] = 'jason'; + $this->assertEquals('jason', $c[0]); }
true
Other
laravel
framework
6d2eb2b2826fa4007c522c27f75ae014bcf07452.json
Add Illuminate\Support\Fluent test cases Signed-off-by: crynobone <crynobone@gmail.com>
tests/Support/SupportFluentTest.php
@@ -0,0 +1,76 @@ +<?php + +use ReflectionObject, + Illuminate\Support\Fluent; + +class SupportFluentTest extends PHPUnit_Framework_TestCase { + + /** + * Test the Fluent constructor. + * + * @test + */ + public function testAttributesAreSetByConstructor() + { + $array = array('name' => 'Taylor', 'age' => 25); + $fluent = new Fluent($array); + + $refl = new ReflectionObject($fluent); + $attributes = $refl->getProperty('attributes'); + $attributes->setAccessible(true); + + $this->assertEquals($array, $attributes->getValue($fluent)); + $this->assertEquals($array, $fluent->getAttributes()); + } + + /** + * Test the Fluent::get() method. + * + * @test + */ + public function testGetMethodReturnsAttribute() + { + $fluent = new Fluent(array('name' => 'Taylor')); + + $this->assertEquals('Taylor', $fluent->get('name')); + $this->assertEquals('Default', $fluent->get('foo', 'Default')); + $this->assertEquals('Taylor', $fluent->name); + $this->assertNull($fluent->foo); + } + + /** + * Test the Fluent magic methods can be used to set attributes. + * + * @test + */ + public function testMagicMethodsCanBeUsedToSetAttributes() + { + $fluent = new Fluent; + + $fluent->name = 'Taylor'; + $fluent->developer(); + $fluent->age(25); + + $this->assertEquals('Taylor', $fluent->name); + $this->assertTrue($fluent->developer); + $this->assertEquals(25, $fluent->age); + $this->assertInstanceOf('Illuminate\Support\Fluent', $fluent->programmer()); + } + + /** + * Test the Fluent::__isset() method. + * + * @test + */ + public function testIssetMagicMethod() + { + $array = array('name' => 'Taylor', 'age' => 25); + $fluent = new Fluent($array); + + $this->assertTrue(isset($fluent->name)); + + unset($fluent->name); + + $this->assertFalse(isset($fluent->name)); + } +} \ No newline at end of file
false
Other
laravel
framework
a0ac97b8a770f7768e0545f770dfe2b65015794f.json
Add timestamps column to migration stub. This is consistent with the default setting for Eloquent models, having timestamps enabled. Fixes #865.
src/Illuminate/Database/Migrations/stubs/create.php
@@ -15,6 +15,7 @@ public function up() Schema::create('{{table}}', function(Blueprint $table) { $table->increments('id'); + $table->timestamps(); }); } @@ -28,4 +29,4 @@ public function down() Schema::drop('{{table}}'); } -} \ No newline at end of file +}
false
Other
laravel
framework
472c93945305ec7122f0f6e2afb30cb2d663d4c6.json
Add debug and bump to 2.3.
composer.json
@@ -16,17 +16,18 @@ "monolog/monolog": "1.4.*", "patchwork/utf8": "1.0.*", "swiftmailer/swiftmailer": "4.3.*", - "symfony/browser-kit": "2.2.*", - "symfony/console": "2.2.*", - "symfony/css-selector": "2.2.*", - "symfony/dom-crawler": "2.2.*", - "symfony/event-dispatcher": "2.2.*", - "symfony/finder": "2.2.*", - "symfony/http-foundation": "2.2.*", - "symfony/http-kernel": "2.2.*", - "symfony/process": "2.2.*", - "symfony/routing": "2.2.*", - "symfony/translation": "2.2.*" + "symfony/browser-kit": "2.3.*", + "symfony/console": "2.3.*", + "symfony/css-selector": "2.3.*", + "symfony/debug": "2.3.*", + "symfony/dom-crawler": "2.3.*", + "symfony/event-dispatcher": "2.3.*", + "symfony/finder": "2.3.*", + "symfony/http-foundation": "2.3.*", + "symfony/http-kernel": "2.3.*", + "symfony/process": "2.3.*", + "symfony/routing": "2.3.*", + "symfony/translation": "2.3.*" }, "replace": { "illuminate/auth": "self.version",
false
Other
laravel
framework
ab93be41bc15d5d9e173323b41347e7087db5832.json
Remove some left over Symfony dispatcher code.
src/Illuminate/Events/Event.php
@@ -1,89 +0,0 @@ -<?php namespace Illuminate\Events; - -use Symfony\Component\EventDispatcher\Event as SymfonyEvent; - -class Event extends SymfonyEvent { - - /** - * The event payload array. - * - * @var array - */ - protected $payload; - - /** - * Create a new event instance. - * - * @param mixed $payload - * @return void - */ - public function __construct(array $payload = array()) - { - $this->payload = $payload; - } - - /** - * Stop the propagation of the event to other listeners. - * - * @return void - */ - public function stop() - { - return parent::stopPropagation(); - } - - /** - * Determine if the event has been stopped from propagating. - * - * @return bool - */ - public function isStopped() - { - return parent::isPropagationStopped(); - } - - /** - * Dynamically retrieve items from the payload. - * - * @param string $key - * @return mixed - */ - public function __get($key) - { - return $this->payload[$key]; - } - - /** - * Dynamically set items in the payload. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function __set($key, $value) - { - $this->payload[$key] = $value; - } - - /** - * Determine if payload item is set. - * - * @param string $key - * @return bool - */ - public function __isset($key) - { - return isset($this->payload[$key]); - } - - /** - * Unset an item from the payload array. - * - * @return void - */ - public function __unset($key) - { - unset($this->payload[$key]); - } - -} \ No newline at end of file
true
Other
laravel
framework
ab93be41bc15d5d9e173323b41347e7087db5832.json
Remove some left over Symfony dispatcher code.
src/Illuminate/Events/Subscriber.php
@@ -1,8 +1,6 @@ <?php namespace Illuminate\Events; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -class Subscriber implements EventSubscriberInterface { +class Subscriber { /** * Get the events listened to by the subscriber.
true
Other
laravel
framework
77024b6d23eceb58f47e9a2039ed33de516224f5.json
Remove HTML from default formatting in MessageBag.
src/Illuminate/Support/MessageBag.php
@@ -19,7 +19,7 @@ class MessageBag implements ArrayableInterface, Countable, JsonableInterface, Me * * @var string */ - protected $format = '<span class="help-inline">:message</span>'; + protected $format = ':message'; /** * Create a new message bag instance.
false
Other
laravel
framework
88abbf58969167496353da70f04b7cd6fe84401f.json
Allow PATCH method in FormBuilder
src/Illuminate/Html/FormBuilder.php
@@ -62,6 +62,13 @@ class FormBuilder { */ protected $reserved = array('method', 'url', 'route', 'action', 'files'); + /** + * The form methods that should be spoofed, in uppercase. + * + * @var array + */ + protected $spoofedMethods = array('DELETE', 'PATCH', 'PUT'); + /** * Create a new form builder instance. * @@ -89,16 +96,16 @@ public function open(array $options = array()) // We need to extract the proper method from the attributes. If the method is // something other than GET or POST we'll use POST since we will spoof the - // actual method since forms don't support PUT or DELETE as native HTML. + // actual method since forms don't support PUT, PATCH or DELETE as native HTML. $attributes['method'] = $this->getMethod($method); $attributes['action'] = $this->getAction($options); $attributes['accept-charset'] = 'UTF-8'; - // If the method is PUT or DELETE, we will need to add a spoofer hidden field - // that will instruct this Symfony request to pretend that the method is a - // different method than it actually is, for convenience from the forms. + // If the method is PUT, PATCH or DELETE, we will need to add a spoofer hidden + // field that will instruct this Symfony request to pretend that the method is + // a different method than it actually is, for convenience from the forms. $append = $this->getAppendage($method); if (isset($options['files']) and $options['files']) @@ -108,7 +115,7 @@ public function open(array $options = array()) // Finally we're ready to create the final form HTML field. We will attribute // format the array of attributes. We will also add on the appendage which - // is used to spoof the requests for PUT and DELETE requests to the app. + // is used to spoof the requests for PUT, PATCH and DELETE requests to the app. $attributes = array_merge( $attributes, array_except($options, $this->reserved) @@ -659,7 +666,7 @@ protected function getAppendage($method) { $method = strtoupper($method); - if ($method == 'PUT' or $method == 'DELETE') + if (in_array($method, $this->spoofedMethods)) { return $this->hidden('_method', $method); }
false
Other
laravel
framework
d7bed9ed1560d52dbe947482ee9a9859cfc51843.json
Add a success notification to password remind Currently there doesn't seem to be a way to differentiate between just showing the reset form, or if that form was successfully submitted. Added a 'success' session variable to allow for that. 
src/Illuminate/Auth/Reminders/PasswordBroker.php
@@ -91,7 +91,7 @@ public function remind(array $credentials, Closure $callback = null) $this->sendReminder($user, $token, $callback); - return $this->redirect->refresh(); + return $this->redirect->refresh()->with('success', true); } /**
false
Other
laravel
framework
8523dd30312dea0c8e3ba017d5c052ce5ae5b777.json
Add tests for the required_without validation rule
tests/Validation/ValidationValidatorTest.php
@@ -140,6 +140,60 @@ public function testValidateRequiredWith() $this->assertFalse($v->passes()); } + public function testValidateRequiredWithout() + { + $trans = $this->getRealTranslator(); + $v = new Validator($trans, array('first' => 'Taylor'), array('last' => 'required_without:first')); + $this->assertTrue($v->passes()); + + $v = new Validator($trans, array('first' => 'Taylor', 'last' => ''), array('last' => 'required_without:first')); + $this->assertTrue($v->passes()); + + $v = new Validator($trans, array('first' => ''), array('last' => 'required_without:first')); + $this->assertFalse($v->passes()); + + $v = new Validator($trans, array(), array('last' => 'required_without:first')); + $this->assertFalse($v->passes()); + + $v = new Validator($trans, array('first' => 'Taylor', 'last' => 'Otwell'), array('last' => 'required_without:first')); + $this->assertTrue($v->passes()); + + $v = new Validator($trans, array('last' => 'Otwell'), array('last' => 'required_without:first')); + $this->assertTrue($v->passes()); + + $file = new File('', false); + $v = new Validator($trans, array('file' => $file), array('foo' => 'required_without:file')); + $this->assertFalse($v->passes()); + + $foo = new File('', false); + $v = new Validator($trans, array('foo' => $foo), array('foo' => 'required_without:file')); + $this->assertFalse($v->passes()); + + $foo = new File(__FILE__, false); + $v = new Validator($trans, array('foo' => $foo), array('foo' => 'required_without:file')); + $this->assertTrue($v->passes()); + + $file = new File(__FILE__, false); + $foo = new File(__FILE__, false); + $v = new Validator($trans, array('file' => $file, 'foo' => $foo), array('foo' => 'required_without:file')); + $this->assertTrue($v->passes()); + + $file = new File(__FILE__, false); + $foo = new File('', false); + $v = new Validator($trans, array('file' => $file, 'foo' => $foo), array('foo' => 'required_without:file')); + $this->assertTrue($v->passes()); + + $file = new File('', false); + $foo = new File(__FILE__, false); + $v = new Validator($trans, array('file' => $file, 'foo' => $foo), array('foo' => 'required_without:file')); + $this->assertTrue($v->passes()); + + $file = new File('', false); + $foo = new File('', false); + $v = new Validator($trans, array('file' => $file, 'foo' => $foo), array('foo' => 'required_without:file')); + $this->assertFalse($v->passes()); + } + public function testValidateConfirmed() { $trans = $this->getRealTranslator(); @@ -279,7 +333,7 @@ public function testValidateSize() $file->expects($this->any())->method('getSize')->will($this->returnValue(4072)); $v = new Validator($trans, array(), array('photo' => 'Size:3')); $v->setFiles(array('photo' => $file)); - $this->assertFalse($v->passes()); + $this->assertFalse($v->passes()); } @@ -314,7 +368,7 @@ public function testValidateBetween() $file->expects($this->any())->method('getSize')->will($this->returnValue(4072)); $v = new Validator($trans, array(), array('photo' => 'Between:1,2')); $v->setFiles(array('photo' => $file)); - $this->assertFalse($v->passes()); + $this->assertFalse($v->passes()); } @@ -343,7 +397,7 @@ public function testValidateMin() $file->expects($this->any())->method('getSize')->will($this->returnValue(4072)); $v = new Validator($trans, array(), array('photo' => 'Min:10')); $v->setFiles(array('photo' => $file)); - $this->assertFalse($v->passes()); + $this->assertFalse($v->passes()); } @@ -372,7 +426,7 @@ public function testValidateMax() $file->expects($this->any())->method('getSize')->will($this->returnValue(4072)); $v = new Validator($trans, array(), array('photo' => 'Max:2')); $v->setFiles(array('photo' => $file)); - $this->assertFalse($v->passes()); + $this->assertFalse($v->passes()); }
false
Other
laravel
framework
814669edf3134eae032eb6bb4b9ba863bdf150ac.json
Add error message when not using PHP 5.4.
src/Illuminate/Foundation/Console/ServeCommand.php
@@ -26,6 +26,13 @@ class ServeCommand extends Command { */ public function fire() { + // The development server feature was added in PHP 5.4. + if (version_compare(PHP_VERSION, '5.4.0', '<')) + { + $this->error("PHP 5.4 is required to start the development server"); + return; + } + chdir($this->laravel['path.base']); $host = $this->input->getOption('host');
false
Other
laravel
framework
78a494e6399758008c4c7e304ac9e30fbb324611.json
Add default to collection property.
src/Illuminate/Support/Collection.php
@@ -15,7 +15,7 @@ class Collection implements ArrayAccess, ArrayableInterface, Countable, Iterator * * @var array */ - protected $items; + protected $items = array(); /** * Create a new collection.
false
Other
laravel
framework
ef98884b29306bf8bdbb918a4a668587ed676745.json
Use absolute class names for Lang facade.
src/Illuminate/View/Compilers/BladeCompiler.php
@@ -329,11 +329,11 @@ protected function compileLanguage($value) { $pattern = $this->createMatcher('lang'); - $value = preg_replace($pattern, '$1<?php echo Lang::get$2; ?>', $value); + $value = preg_replace($pattern, '$1<?php echo \Illuminate\Support\Facades\Lang::get$2; ?>', $value); $pattern = $this->createMatcher('choice'); - return preg_replace($pattern, '$1<?php echo Lang::choice$2; ?>', $value); + return preg_replace($pattern, '$1<?php echo \Illuminate\Support\Facades\Lang::choice$2; ?>', $value); } /**
false
Other
laravel
framework
253b0493d60de4518e45f9a5669a07ca796bfe1b.json
Remove some leftover locale stuff.
src/Illuminate/Http/Request.php
@@ -29,38 +29,6 @@ public function instance() return $this; } - /** - * Setup the path info for a locale based URI. - * - * @param array $locales - * @return string - */ - public function handleUriLocales(array $locales) - { - $path = $this->getPathInfo(); - - foreach ($locales as $locale) - { - if (preg_match("#^\/{$locale}(?:$|/)#i", $path)) - { - return $this->removeLocaleFromUri($locale); - } - } - } - - /** - * Remove the given locale from the URI. - * - * @param string $locale - * @return string - */ - protected function removeLocaleFromUri($locale) - { - $this->pathInfo = '/'.ltrim(substr($this->getPathInfo(), strlen($locale) + 1), '/'); - - return $locale; - } - /** * Get the root URL for the application. *
false
Other
laravel
framework
97ce37977d821325d4fe2dc7e298587d19c07fea.json
Fix bug in Eloquent.
src/Illuminate/Database/Eloquent/Model.php
@@ -264,17 +264,13 @@ public function fill(array $attributes) */ public function newInstance($attributes = array(), $exists = false) { - static::unguard(); - // This method just provides a convenient way for us to generate fresh model // instances of this current model. It is particularly useful during the // hydration of new objects via the Eloquent query builder instances. $model = new static((array) $attributes); $model->exists = $exists; - static::reguard(); - return $model; }
true
Other
laravel
framework
97ce37977d821325d4fe2dc7e298587d19c07fea.json
Fix bug in Eloquent.
src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
@@ -107,9 +107,9 @@ public function create(array $attributes) // the parent model. This makes the polymorphic item unique in the table. $foreign[$this->morphType] = $this->morphClass; - $attributes = array_merge($attributes, $foreign); + $instance = $this->related->newInstance(); - $instance = $this->related->newInstance($attributes); + $instance->setRawAttributes(array_merge($attributes, $foreign)); $instance->save();
true
Other
laravel
framework
97ce37977d821325d4fe2dc7e298587d19c07fea.json
Fix bug in Eloquent.
tests/Database/DatabaseEloquentMorphTest.php
@@ -93,7 +93,8 @@ public function testCreateFunctionOnMorph() // Doesn't matter which relation type we use since they share the code... $relation = $this->getOneRelation(); $created = m::mock('stdClass'); - $relation->getRelated()->shouldReceive('newInstance')->once()->with(array('name' => 'taylor', 'table.morph_id' => 1, 'table.morph_type' => get_class($relation->getParent())))->andReturn($created); + $relation->getRelated()->shouldReceive('newInstance')->once()->andReturn($created); + $created->shouldReceive('setRawAttributes')->once()->with(array('name' => 'taylor', 'table.morph_id' => 1, 'table.morph_type' => get_class($relation->getParent()))); $created->shouldReceive('save')->once()->andReturn(true); $this->assertEquals($created, $relation->create(array('name' => 'taylor')));
true
Other
laravel
framework
b789fe1525f6062656198c91908fb01b08510136.json
Change visibility of Form::getValueAttribute.
src/Illuminate/Html/FormBuilder.php
@@ -694,7 +694,7 @@ protected function getIdAttribute($name, $attributes) * @param string $value * @return string */ - protected function getValueAttribute($name, $value = null) + public function getValueAttribute($name, $value = null) { if (is_null($name)) return $value;
false
Other
laravel
framework
3f7ac061c24ba3e81f9492425ebffe003254a99e.json
Use newFromBuilder instance of newInstance.
src/Illuminate/Database/Eloquent/Builder.php
@@ -126,7 +126,7 @@ public function lists($column, $key = null) { $fill = array($column => $value); - $value = $this->model->newInstance($fill)->$column; + $value = $this->model->newFromBuilder($fill)->$column; } }
false
Other
laravel
framework
46ff00d733ee72c5419702af0181d8bbd8272b38.json
Touch owners on delete.
src/Illuminate/Database/Eloquent/Model.php
@@ -628,12 +628,12 @@ public function delete() { $this->fireModelEvent('deleting', false); - // After firing the "deleting" event, we can go ahead and delete off the model - // then call the "deleted" event. These events could give the developer the - // opportunity to clear any relationships on the model or do other works. - $key = $this->getKeyName(); + // Here, we'll touch the owning models, verifying these timestamps get updated + // for the models. This will allow any caching to get broken on the parents + // by the timestamp. Then we will go ahead and delete the model instance. + $this->touchOwners(); - $this->newQuery()->where($key, $this->getKey())->delete(); + $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); $this->fireModelEvent('deleted', false); }
true
Other
laravel
framework
46ff00d733ee72c5419702af0181d8bbd8272b38.json
Touch owners on delete.
tests/Database/DatabaseEloquentModelTest.php
@@ -270,11 +270,12 @@ public function testInsertIsCancelledIfCreatingEventReturnsFalse() public function testDeleteProperlyDeletesModel() { - $model = $this->getMock('Illuminate\Database\Eloquent\Model', array('newQuery', 'updateTimestamps')); + $model = $this->getMock('Illuminate\Database\Eloquent\Model', array('newQuery', 'updateTimestamps', 'touchOwners')); $query = m::mock('stdClass'); $query->shouldReceive('where')->once()->with('id', 1)->andReturn($query); $query->shouldReceive('delete')->once(); $model->expects($this->once())->method('newQuery')->will($this->returnValue($query)); + $model->expects($this->once())->method('touchOwners'); $model->exists = true; $model->id = 1; $model->delete();
true
Other
laravel
framework
39d9373bc5a1098fb9f8286013f57069f5602964.json
Implement destroy method and tests.
src/Illuminate/Database/Eloquent/Model.php
@@ -594,6 +594,29 @@ public function joiningTable($related) return strtolower(implode('_', $models)); } + /** + * Destroy the models for the given IDs. + * + * @param array|int $ids + * @return void + */ + public static function destroy($ids) + { + $ids = is_array($ids) ? $ids : func_get_args(); + + $instance = new static; + + // We will actually pull the models from the database table and call delete on + // each of them individually so that their events get fired properly with a + // correct set of attributes in case the developers wants to check these. + $key = $instance->getKeyName(); + + foreach ($instance->whereIn($key, $ids)->get() as $model) + { + $model->delete(); + } + } + /** * Delete the model from the database. * @@ -603,12 +626,14 @@ public function delete() { if ($this->exists) { + $this->fireModelEvent('deleting', false); + // After firing the "deleting" event, we can go ahead and delete off the model // then call the "deleted" event. These events could give the developer the // opportunity to clear any relationships on the model or do other works. - $this->fireModelEvent('deleting', false); + $key = $this->getKeyName(); - $this->newQuery()->where($this->getKeyName(), $this->getKey())->delete(); + $this->newQuery()->where($key, $this->getKey())->delete(); $this->fireModelEvent('deleted', false); }
true
Other
laravel
framework
39d9373bc5a1098fb9f8286013f57069f5602964.json
Implement destroy method and tests.
tests/Database/DatabaseEloquentModelTest.php
@@ -75,6 +75,12 @@ public function testFindMethodWithArrayCallsQueryBuilderCorrectly() } + public function testDestroyMethodCallsQueryBuilderCorrectly() + { + $result = EloquentModelDestroyStub::destroy(1, 2, 3); + } + + public function testWithMethodCallsQueryBuilderCorrectly() { $result = EloquentModelWithStub::with('foo', 'bar'); @@ -630,6 +636,17 @@ public function newQuery() } } +class EloquentModelDestroyStub extends Illuminate\Database\Eloquent\Model { + public function newQuery() + { + $mock = m::mock('Illuminate\Database\Eloquent\Builder'); + $mock->shouldReceive('whereIn')->once()->with('id', array(1, 2, 3))->andReturn($mock); + $mock->shouldReceive('get')->once()->andReturn(array($model = m::mock('StdClass'))); + $model->shouldReceive('delete')->once(); + return $mock; + } +} + class EloquentModelFindManyStub extends Illuminate\Database\Eloquent\Model { public function newQuery() {
true
Other
laravel
framework
5f78e404c665c5f70d845b7514d87bc751d44fd5.json
Remove locale routing stuff.
src/Illuminate/Foundation/Application.php
@@ -106,37 +106,7 @@ public function __construct(Request $request = null) */ protected function createRequest(Request $request = null) { - $request = $request ?: Request::createFromGlobals(); - - $this->registerLocaleHandler($request); - - return $request; - } - - /** - * Register the URI locale boot handler. - * - * @param Illuminate\Http\Request $request - * @return void - */ - protected function registerLocaleHandler(Request $request) - { - $this->booting(function($app) use ($request) - { - $locales = $app['config']->get('app.locales', array()); - - // Here, we will check to see if the incoming request begins with any of the - // supported locales. If it does, we will set that locale as this default - // for an application and remove it from the current request path info. - $locale = $request->handleUriLocales($locales); - - if ($locale) - { - $app->setLocale($locale); - - $app['url']->setPrefix($locale); - } - }); + return $request ?: Request::createFromGlobals(); } /**
true
Other
laravel
framework
5f78e404c665c5f70d845b7514d87bc751d44fd5.json
Remove locale routing stuff.
src/Illuminate/Routing/UrlGenerator.php
@@ -28,13 +28,6 @@ class UrlGenerator { */ protected $generator; - /** - * The global prefix for the generator. - * - * @var string - */ - protected $prefix; - /** * Create a new URL Generator instance. * @@ -90,7 +83,7 @@ public function to($path, $parameters = array(), $secure = null) $root = $this->getRootUrl($scheme); - return trim($root.$this->getPrefix().'/'.trim($path.'/'.$tail, '/'), '/'); + return trim($root.'/'.trim($path.'/'.$tail, '/'), '/'); } /** @@ -184,7 +177,7 @@ public function route($name, $parameters = array()) $parameters = $this->buildParameterList($route, $parameters); } - return $this->getPrefix().$this->generator->generate($name, $parameters, true); + return $this->generator->generate($name, $parameters, true); } /** @@ -279,27 +272,6 @@ public function isValidUrl($path) return filter_var($path, FILTER_VALIDATE_URL) !== false; } - /** - * Set a global prefix on the generator. - * - * @return string - */ - public function getPrefix() - { - return isset($this->prefix) ? '/'.$this->prefix : ''; - } - - /** - * Set the global prefix on the generator. - * - * @param string $prefix - * @return void - */ - public function setPrefix($prefix) - { - $this->prefix = $prefix; - } - /** * Get the request instance. *
true
Other
laravel
framework
5f78e404c665c5f70d845b7514d87bc751d44fd5.json
Remove locale routing stuff.
tests/Foundation/FoundationApplicationTest.php
@@ -161,20 +161,6 @@ public function testServiceProvidersAreCorrectlyRegistered() $this->assertTrue(in_array($class, $app->getLoadedProviders())); } - - public function testLocaleDetectionOnBoot() - { - $request = Illuminate\Http\Request::create('/en/foo/bar', 'GET'); - $application = $this->getMock('Illuminate\Foundation\Application', array('setLocale'), array($request)); - $application->instance('config', $config = m::mock('StdClass')); - $config->shouldReceive('get')->once()->with('app.locales', array())->andReturn(array('en')); - $application->instance('url', $url = m::mock('StdClass')); - $url->shouldReceive('setPrefix')->once()->with('en'); - $application->expects($this->once())->method('setLocale')->with($this->equalTo('en')); - - $application->boot(); - } - } class ApplicationCustomExceptionHandlerStub extends Illuminate\Foundation\Application {
true
Other
laravel
framework
5f78e404c665c5f70d845b7514d87bc751d44fd5.json
Remove locale routing stuff.
tests/Routing/RoutingUrlGeneratorTest.php
@@ -43,16 +43,6 @@ public function testUrlGenerationUsesCurrentProtocol() } - public function testGeneratorGlobalPrefixes() - { - $gen = $this->getGenerator(); - $gen->setRequest(Request::create('http://foobar.com/foo/bar', 'GET')); - $gen->setPrefix('en'); - - $this->assertEquals('http://foobar.com/en/dayle', $gen->to('dayle')); - } - - public function testAssetUrlGeneration() { $gen = $this->getGenerator(); @@ -68,34 +58,19 @@ public function testRouteUrlGeneration() { $gen = $this->getGenerator(); $symfonyGen = m::mock('Symfony\Component\Routing\Generator\UrlGenerator'); - $symfonyGen->shouldReceive('generate')->once()->with('foo.bar', array('name' => 'taylor')); + $symfonyGen->shouldReceive('generate')->once()->with('foo.bar', array('name' => 'taylor'), true); $gen->setRequest(Request::create('http://foobar.com', 'GET')); $gen->setGenerator($symfonyGen); $gen->route('foo.bar', array('name' => 'taylor')); } - public function testRouteUrlGenerationWithPrefixes() - { - $gen = $this->getGenerator(); - $symfonyGen = m::mock('Symfony\Component\Routing\Generator\UrlGenerator'); - $symfonyGen->shouldReceive('generate')->once()->with('foo.bar', array('name' => 'taylor'))->andReturn('boom/breeze'); - $gen->setRequest(Request::create('http://foobar.com', 'GET')); - $gen->setGenerator($symfonyGen); - $gen->setPrefix('en'); - - $result = $gen->route('foo.bar', array('name' => 'taylor')); - - $this->assertEquals('http://foobar.com/en/boom/breeze', $result); - } - - public function testRouteUrlGenerationWithOptional() { $gen = $this->getGenerator(); $symfonyGen = m::mock('Symfony\Component\Routing\Generator\UrlGenerator'); - $symfonyGen->shouldReceive('generate')->once()->with('foo.boom', array()); + $symfonyGen->shouldReceive('generate')->once()->with('foo.boom', array(), true); $gen->setRequest(Request::create('http://foobar.com', 'GET')); $gen->setGenerator($symfonyGen); @@ -107,7 +82,7 @@ public function testRouteParametersCanBeShortCircuited() { $gen = $this->getGenerator(); $symfonyGen = m::mock('Symfony\Component\Routing\Generator\UrlGenerator'); - $symfonyGen->shouldReceive('generate')->once()->with('foo.baz', array('name' => 'taylor', 'age' => 25)); + $symfonyGen->shouldReceive('generate')->once()->with('foo.baz', array('name' => 'taylor', 'age' => 25), true); $gen->setRequest(Request::create('http://foobar.com', 'GET')); $gen->setGenerator($symfonyGen); @@ -119,7 +94,7 @@ public function testRouteParametersCanBeShortCircuitedWithOptionals() { $gen = $this->getGenerator(); $symfonyGen = m::mock('Symfony\Component\Routing\Generator\UrlGenerator'); - $symfonyGen->shouldReceive('generate')->once()->with('foo.breeze', array('boom' => 'bar', 'breeze' => null)); + $symfonyGen->shouldReceive('generate')->once()->with('foo.breeze', array('boom' => 'bar', 'breeze' => null), true); $gen->setRequest(Request::create('http://foobar.com', 'GET')); $gen->setGenerator($symfonyGen);
true
Other
laravel
framework
a21ac4af89a55138b82982910237f91eaf288a8f.json
Check mcrypt programatically.
src/Illuminate/Foundation/start.php
@@ -1,5 +1,23 @@ <?php +/* +|-------------------------------------------------------------------------- +| Check Extensions +|-------------------------------------------------------------------------- +| +| Laravel requires a few extensions to function. Here we will check the +| loaded extensions to make sure they are present. If not we'll just +| bail from here. Otherwise, Composer will crazily fall back code. +| +*/ + +if ( ! extension_loaded('mcrypt')) +{ + die('Laravel requires the Mcrypt PHP extension.'); + + exit(1); +} + /* |-------------------------------------------------------------------------- | Register Class Imports
false
Other
laravel
framework
91a632f98351ba0e1c033b9e597eac2e5ca5b244.json
Fix locale matcher.
src/Illuminate/Http/Request.php
@@ -41,7 +41,10 @@ public function handleUriLocales(array $locales) foreach ($locales as $locale) { - if (starts_with($path, '/'.$locale)) return $this->removeLocaleFromUri($locale); + if (preg_match("#^\/{$locale}(?:$|/)#i", $path)) + { + return $this->removeLocaleFromUri($locale); + } } }
false
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Auth/composer.json
@@ -18,7 +18,8 @@ }, "require-dev": { "illuminate/console": "4.0.x", - "illuminate/routing": "4.0.x" + "illuminate/routing": "4.0.x", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {"Illuminate\\Auth": ""}
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Cache/composer.json
@@ -14,6 +14,9 @@ "illuminate/redis": "4.0.x", "illuminate/support": "4.0.x" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": {"Illuminate\\Cache": ""} },
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Config/composer.json
@@ -11,6 +11,9 @@ "illuminate/filesystem": "4.0.x", "illuminate/support": "4.0.x" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": {"Illuminate\\Config": ""} },
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Console/composer.json
@@ -10,6 +10,9 @@ "require": { "symfony/console": "2.2.*" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": { "Illuminate\\Console": ""
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Container/composer.json
@@ -9,6 +9,9 @@ "require": { "php": ">=5.3.0" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": { "Illuminate\\Container": ""
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Cookie/composer.json
@@ -14,7 +14,8 @@ "symfony/http-foundation": "2.2.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Database/composer.json
@@ -19,7 +19,8 @@ "illuminate/filesystem": "4.0.x", "illuminate/pagination": "4.0.x", "illuminate/support": "4.0.x", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Encryption/composer.json
@@ -11,6 +11,9 @@ "php": ">=5.3.0", "illuminate/support": "4.0.x" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": { "Illuminate\\Encryption": ""
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Events/composer.json
@@ -13,7 +13,8 @@ "illuminate/support": "4.0.x" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Exception/composer.json
@@ -13,7 +13,8 @@ "symfony/http-kernel": "2.2.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Filesystem/composer.json
@@ -11,6 +11,9 @@ "php": ">=5.3.0", "illuminate/support": "4.0.x" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": { "Illuminate\\Filesystem": ""
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Hashing/composer.json
@@ -13,6 +13,9 @@ "illuminate/support": "4.0.x", "ircmaxell/password-compat": "1.0.*" }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, "autoload": { "psr-0": { "Illuminate\\Hashing": ""
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Html/composer.json
@@ -13,7 +13,8 @@ "illuminate/support": "4.0.x" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Http/composer.json
@@ -13,7 +13,8 @@ "symfony/http-foundation": "2.2.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Log/composer.json
@@ -13,6 +13,7 @@ }, "require-dev": { "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*", "illuminate/events": "4.0.x" }, "autoload": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Mail/composer.json
@@ -15,7 +15,8 @@ "swiftmailer/swiftmailer": "4.3.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Pagination/composer.json
@@ -16,7 +16,8 @@ "symfony/translation": "2.2.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Queue/composer.json
@@ -15,7 +15,8 @@ }, "require-dev": { "aws/aws-sdk-php": "2.1.*", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Redis/composer.json
@@ -12,7 +12,8 @@ "illuminate/support": "4.0.x" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Routing/composer.json
@@ -20,7 +20,8 @@ "require-dev": { "illuminate/console": "4.0.x", "illuminate/filesystem": "4.0.x", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Session/composer.json
@@ -19,7 +19,8 @@ }, "require-dev": { "illuminate/console": "4.0.x", - "mockery/mockery": ">=0.7.2" + "mockery/mockery": ">=0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Support/composer.json
@@ -12,7 +12,8 @@ }, "require-dev": { "patchwork/utf8": "1.0.*", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Translation/composer.json
@@ -13,7 +13,8 @@ "symfony/translation": "2.2.*" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Validation/composer.json
@@ -15,7 +15,8 @@ }, "require-dev": { "illuminate/database": "4.0.x", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/View/composer.json
@@ -14,7 +14,8 @@ "illuminate/support": "4.0.x" }, "require-dev": { - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
5d6e99e6860752d15de99c23081ce3e29a3f5423.json
Add phpunit to Illuminate component dependencies
src/Illuminate/Workbench/composer.json
@@ -14,7 +14,8 @@ }, "require-dev": { "illuminate/console": "4.0.x", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "psr-0": {
true
Other
laravel
framework
cf24df89336316e74b50d2973b040657cdfafef5.json
Implement locale routing.
src/Illuminate/Foundation/Application.php
@@ -81,11 +81,12 @@ class Application extends Container implements HttpKernelInterface { /** * Create a new Illuminate application instance. * + * @param \Illuminate\Http\Request $request * @return void */ - public function __construct() + public function __construct(Request $request = null) { - $this['request'] = Request::createFromGlobals(); + $this['request'] = $this->createRequest($request); // The exception handler class takes care of determining which of the bound // exception handler Closures should be called for a given exception and @@ -97,6 +98,47 @@ public function __construct() $this->register(new EventServiceProvider($this)); } + /** + * Create the request for the application. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Htto\Request + */ + protected function createRequest(Request $request = null) + { + $request = $request ?: Request::createFromGlobals(); + + $this->registerLocaleHandler($request); + + return $request; + } + + /** + * Register the URI locale boot handler. + * + * @param Illuminate\Http\Request $request + * @return void + */ + protected function registerLocaleHandler(Request $request) + { + $this->booting(function($app) use ($request) + { + $locales = $app['config']->get('app.locales', array()); + + // Here, we will check to see if the incoming request begins with any of the + // supported locales. If it does, we will set that locale as this default + // for an application and remove it from the current request path info. + $locale = $request->handleUriLocales($locales); + + if ($locale) + { + $app->setLocale($locale); + + $app['url']->setPrefix($locale); + } + }); + } + /** * Bind the installation paths to the application. *
true
Other
laravel
framework
cf24df89336316e74b50d2973b040657cdfafef5.json
Implement locale routing.
src/Illuminate/Http/Request.php
@@ -29,6 +29,35 @@ public function instance() return $this; } + /** + * Setup the path info for a locale based URI. + * + * @param array $locales + * @return string + */ + public function handleUriLocales(array $locales) + { + $path = $this->getPathInfo(); + + foreach ($locales as $locale) + { + if (starts_with($path, '/'.$locale)) return $this->removeLocaleFromUri($locale); + } + } + + /** + * Remove the given locale from the URI. + * + * @param string $locale + * @return string + */ + protected function removeLocaleFromUri($locale) + { + $this->pathInfo = '/'.ltrim(substr($this->getPathInfo(), strlen($locale) + 1), '/'); + + return $locale; + } + /** * Get the root URL for the application. *
true
Other
laravel
framework
cf24df89336316e74b50d2973b040657cdfafef5.json
Implement locale routing.
src/Illuminate/Routing/UrlGenerator.php
@@ -90,7 +90,7 @@ public function to($path, $parameters = array(), $secure = null) $root = $this->getRootUrl($scheme); - return $root.$this->getPrefix().'/'.trim($path.'/'.$tail, '/'); + return trim($root.$this->getPrefix().'/'.trim($path.'/'.$tail, '/'), '/'); } /**
true
Other
laravel
framework
cf24df89336316e74b50d2973b040657cdfafef5.json
Implement locale routing.
tests/Foundation/FoundationApplicationTest.php
@@ -161,6 +161,20 @@ public function testServiceProvidersAreCorrectlyRegistered() $this->assertTrue(in_array($class, $app->getLoadedProviders())); } + + public function testLocaleDetectionOnBoot() + { + $request = Illuminate\Http\Request::create('/en/foo/bar', 'GET'); + $application = $this->getMock('Illuminate\Foundation\Application', array('setLocale'), array($request)); + $application->instance('config', $config = m::mock('StdClass')); + $config->shouldReceive('get')->once()->with('app.locales', array())->andReturn(array('en')); + $application->instance('url', $url = m::mock('StdClass')); + $url->shouldReceive('setPrefix')->once()->with('en'); + $application->expects($this->once())->method('setLocale')->with($this->equalTo('en')); + + $application->boot(); + } + } class ApplicationCustomExceptionHandlerStub extends Illuminate\Foundation\Application {
true
Other
laravel
framework
cf24df89336316e74b50d2973b040657cdfafef5.json
Implement locale routing.
tests/Routing/RoutingUrlGeneratorTest.php
@@ -18,11 +18,11 @@ public function testBasicUrlGeneration() $gen = $this->getGenerator(); $gen->setRequest(Request::create('http://foobar.com/foo/bar', 'GET')); - $this->assertEquals('http://foobar.com/', $gen->to('/')); + $this->assertEquals('http://foobar.com', $gen->to('/')); $this->assertEquals('http://foobar.com/something', $gen->to('/something')); $this->assertEquals('http://foobar.com/something', $gen->to('something')); - $this->assertEquals('https://foobar.com/', $gen->secure('/')); + $this->assertEquals('https://foobar.com', $gen->secure('/')); $this->assertEquals('https://foobar.com/something', $gen->secure('/something')); $this->assertEquals('https://foobar.com/something', $gen->secure('something'));
true
Other
laravel
framework
38766e498148d6600526bfeadcd4485b775a6a4e.json
Add phpunit to dev dependencies
composer.json
@@ -61,7 +61,8 @@ "aws/aws-sdk-php": "2.2.*", "iron-io/iron_mq": "1.4.4", "pda/pheanstalk": "2.0.*", - "mockery/mockery": "0.7.2" + "mockery/mockery": "0.7.2", + "phpunit/phpunit": "3.7.*" }, "autoload": { "files": [
false
Other
laravel
framework
53a16422002d218f5d40acf76c2c648bdbf0b4ba.json
Build full split script.
build/illuminate-split-full.sh
@@ -0,0 +1,28 @@ +git subsplit init git@github.com:laravel/framework.git +git subsplit publish src/Illuminate/Auth:git@github.com:illuminate/auth.git +git subsplit publish src/Illuminate/Cache:git@github.com:illuminate/cache.git +git subsplit publish src/Illuminate/Config:git@github.com:illuminate/config.git +git subsplit publish src/Illuminate/Console:git@github.com:illuminate/console.git +git subsplit publish src/Illuminate/Container:git@github.com:illuminate/container.git +git subsplit publish src/Illuminate/Cookie:git@github.com:illuminate/cookie.git +git subsplit publish src/Illuminate/Database:git@github.com:illuminate/database.git +git subsplit publish src/Illuminate/Encryption:git@github.com:illuminate/encryption.git +git subsplit publish src/Illuminate/Events:git@github.com:illuminate/events.git +git subsplit publish src/Illuminate/Exception:git@github.com:illuminate/exception.git +git subsplit publish src/Illuminate/Filesystem:git@github.com:illuminate/filesystem.git +git subsplit publish src/Illuminate/Hashing:git@github.com:illuminate/hashing.git +git subsplit publish src/Illuminate/Html:git@github.com:illuminate/html.git +git subsplit publish src/Illuminate/Http:git@github.com:illuminate/http.git +git subsplit publish src/Illuminate/Log:git@github.com:illuminate/log.git +git subsplit publish src/Illuminate/Mail:git@github.com:illuminate/mail.git +git subsplit publish src/Illuminate/Pagination:git@github.com:illuminate/pagination.git +git subsplit publish src/Illuminate/Queue:git@github.com:illuminate/queue.git +git subsplit publish src/Illuminate/Redis:git@github.com:illuminate/redis.git +git subsplit publish src/Illuminate/Routing:git@github.com:illuminate/routing.git +git subsplit publish src/Illuminate/Session:git@github.com:illuminate/session.git +git subsplit publish src/Illuminate/Support:git@github.com:illuminate/support.git +git subsplit publish src/Illuminate/Translation:git@github.com:illuminate/translation.git +git subsplit publish src/Illuminate/Validation:git@github.com:illuminate/validation.git +git subsplit publish src/Illuminate/View:git@github.com:illuminate/view.git +git subsplit publish src/Illuminate/Workbench:git@github.com:illuminate/workbench.git +rm -rf .subsplit/ \ No newline at end of file
false
Other
laravel
framework
2c1d64568bca291535ba816a66f71306c7ebcf55.json
Fix facade view.
src/Illuminate/Support/Facades/Response.php
@@ -29,7 +29,9 @@ public static function make($content = '', $status = 200, array $headers = array */ public static function view($view, $data = array(), $status = 200, array $headers = array()) { - return static::make(static::$app['view']->make($view, $data), $status, $headers); + $app = Facade::getFacadeApplication(); + + return static::make($app['view']->make($view, $data), $status, $headers); } /**
false
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/AuthManager.php
@@ -27,7 +27,7 @@ protected function createDriver($driver) /** * Create an instance of the database driver. * - * @return Illuminate\Auth\Guard + * @return \Illuminate\Auth\Guard */ protected function createDatabaseDriver() { @@ -39,7 +39,7 @@ protected function createDatabaseDriver() /** * Create an instance of the database user provider. * - * @return Illuminate\Auth\DatabaseUserProvider + * @return \Illuminate\Auth\DatabaseUserProvider */ protected function createDatabaseProvider() { @@ -56,7 +56,7 @@ protected function createDatabaseProvider() /** * Create an instance of the Eloquent driver. * - * @return Illuminate\Auth\Guard + * @return \Illuminate\Auth\Guard */ public function createEloquentDriver() { @@ -68,7 +68,7 @@ public function createEloquentDriver() /** * Create an instance of the Eloquent user provider. * - * @return Illuminate\Auth\EloquentUserProvider + * @return \Illuminate\Auth\EloquentUserProvider */ protected function createEloquentProvider() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/Console/MakeRemindersCommand.php
@@ -24,14 +24,14 @@ class MakeRemindersCommand extends Command { /** * The filesystem instance. * - * @var Illuminate\Filesystem\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * Create a new reminder table command instance. * - * @param Illuminate\Filesystem\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(Filesystem $files)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/DatabaseUserProvider.php
@@ -8,14 +8,14 @@ class DatabaseUserProvider implements UserProviderInterface { /** * The active database connection. * - * @param Illuminate\Database\Connection + * @param \Illuminate\Database\Connection */ protected $conn; /** * The hasher implementation. * - * @var Illuminate\Hashing\HasherInterface + * @var \Illuminate\Hashing\HasherInterface */ protected $hasher; @@ -29,8 +29,8 @@ class DatabaseUserProvider implements UserProviderInterface { /** * Create a new database user provider. * - * @param Illuminate\Database\Connection $conn - * @param Illuminate\Hashing\HasherInterface $hasher + * @param \Illuminate\Database\Connection $conn + * @param \Illuminate\Hashing\HasherInterface $hasher * @param string $table * @return void */ @@ -45,7 +45,7 @@ public function __construct(Connection $conn, HasherInterface $hasher, $table) * Retrieve a user by their unique identifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier) { @@ -61,7 +61,7 @@ public function retrieveByID($identifier) * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials) { @@ -92,7 +92,7 @@ public function retrieveByCredentials(array $credentials) /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/EloquentUserProvider.php
@@ -7,7 +7,7 @@ class EloquentUserProvider implements UserProviderInterface { /** * The hasher implementation. * - * @var Illuminate\Hashing\HasherInterface + * @var \Illuminate\Hashing\HasherInterface */ protected $hasher; @@ -21,7 +21,7 @@ class EloquentUserProvider implements UserProviderInterface { /** * Create a new database user provider. * - * @param Illuminate\Hashing\HasherInterface $hasher + * @param \Illuminate\Hashing\HasherInterface $hasher * @param string $model * @return void */ @@ -35,7 +35,7 @@ public function __construct(HasherInterface $hasher, $model) * Retrieve a user by their unique identifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier) { @@ -46,7 +46,7 @@ public function retrieveByID($identifier) * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials) { @@ -66,7 +66,7 @@ public function retrieveByCredentials(array $credentials) /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ @@ -80,7 +80,7 @@ public function validateCredentials(UserInterface $user, array $credentials) /** * Create a new instance of the model. * - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function createModel() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/Guard.php
@@ -18,21 +18,21 @@ class Guard { /** * The user provider implementation. * - * @var Illuminate\Auth\UserProviderInterface + * @var \Illuminate\Auth\UserProviderInterface */ protected $provider; /** * The session store used by the guard. * - * @var Illuminate\Session\Store + * @var \Illuminate\Session\Store */ protected $session; /** * The Illuminate cookie creator service. * - * @var Illuminate\Cookie\CookieJar + * @var \Illuminate\Cookie\CookieJar */ protected $cookie; @@ -46,7 +46,7 @@ class Guard { /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; @@ -60,8 +60,8 @@ class Guard { /** * Create a new authentication guard. * - * @param Illuminate\Auth\UserProviderInterface $provider - * @param Illuminate\Session\Store $session + * @param \Illuminate\Auth\UserProviderInterface $provider + * @param \Illuminate\Session\Store $session * @return void */ public function __construct(UserProviderInterface $provider, @@ -94,7 +94,7 @@ public function guest() /** * Get the currently authenticated user. * - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function user() { @@ -206,7 +206,7 @@ public function attempt(array $credentials = array(), $remember = false, $login /** * Log a user into the application. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param bool $remember * @return void */ @@ -240,7 +240,7 @@ public function login(UserInterface $user, $remember = false) * * @param mixed $id * @param bool $remember - * @return Illuminate\Auth\UserInterface + * @return \Illuminate\Auth\UserInterface */ public function loginUsingId($id, $remember = false) { @@ -296,7 +296,7 @@ protected function clearUserDataFromStorage() /** * Get the cookie creator instance used by the guard. * - * @return Illuminate\Cookie\CookieJar + * @return \Illuminate\Cookie\CookieJar */ public function getCookieJar() { @@ -311,7 +311,7 @@ public function getCookieJar() /** * Set the cookie creator instance used by the guard. * - * @param Illuminate\Cookie\CookieJar $cookie + * @param \Illuminate\Cookie\CookieJar $cookie * @return void */ public function setCookieJar(CookieJar $cookie) @@ -322,7 +322,7 @@ public function setCookieJar(CookieJar $cookie) /** * Get the event dispatcher instance. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getDispatcher() { @@ -332,7 +332,7 @@ public function getDispatcher() /** * Set the event dispatcher instance. * - * @param Illuminate\Events\Dispatcher + * @param \Illuminate\Events\Dispatcher */ public function setDispatcher(Dispatcher $events) { @@ -342,7 +342,7 @@ public function setDispatcher(Dispatcher $events) /** * Get the session store used by the guard. * - * @return Illuminate\Session\Store + * @return \Illuminate\Session\Store */ public function getSession() { @@ -362,7 +362,7 @@ public function getQueuedCookies() /** * Get the user provider used by the guard. * - * @return Illuminate\Auth\UserProviderInterface + * @return \Illuminate\Auth\UserProviderInterface */ public function getProvider() { @@ -372,7 +372,7 @@ public function getProvider() /** * Return the currently cached user of the application. * - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function getUser() { @@ -382,7 +382,7 @@ public function getUser() /** * Set the current user of the application. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @return void */ public function setUser(UserInterface $user)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php
@@ -8,7 +8,7 @@ class DatabaseReminderRepository implements ReminderRepositoryInterface { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; @@ -29,7 +29,7 @@ class DatabaseReminderRepository implements ReminderRepositoryInterface { /** * Create a new reminder repository instance. * - * @var Illuminate\Database\Connection $connection + * @var \Illuminate\Database\Connection $connection * @return void */ public function __construct(Connection $connection, $table, $hashKey) @@ -42,7 +42,7 @@ public function __construct(Connection $connection, $table, $hashKey) /** * Create a new reminder record and token. * - * @param Illuminate\Auth\RemindableInterface $user + * @param \Illuminate\Auth\RemindableInterface $user * @return string */ public function create(RemindableInterface $user) @@ -74,7 +74,7 @@ protected function getPayload($email, $token) /** * Determine if a reminder record exists and is valid. * - * @param Illuminate\Auth\RemindableInterface $user + * @param \Illuminate\Auth\RemindableInterface $user * @param string $token * @return bool */ @@ -124,7 +124,7 @@ public function delete($token) /** * Create a new token for the user. * - * @param Illuminate\Auth\RemindableInterface $user + * @param \Illuminate\Auth\RemindableInterface $user * @return string */ public function createNewToken(RemindableInterface $user) @@ -139,7 +139,7 @@ public function createNewToken(RemindableInterface $user) /** * Begin a new database query against the table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function getTable() { @@ -149,7 +149,7 @@ protected function getTable() /** * Get the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/Reminders/PasswordBroker.php
@@ -10,28 +10,28 @@ class PasswordBroker { /** * The password reminder repository. * - * @var Illuminate\Auth\Reminders\ReminderRepositoryInterface $reminders + * @var \Illuminate\Auth\Reminders\ReminderRepositoryInterface $reminders */ protected $reminders; /** * The user provider implementation. * - * @var Illuminate\Auth\UserProviderInterface + * @var \Illuminate\Auth\UserProviderInterface */ protected $users; /** * The redirector instance. * - * @var Illuminate\Routing\Redirector + * @var \Illuminate\Routing\Redirector */ protected $redirector; /** * The mailer instance. * - * @var Illuminate\Mail\Mailer + * @var \Illuminate\Mail\Mailer */ protected $mailer; @@ -45,10 +45,10 @@ class PasswordBroker { /** * Create a new password broker instance. * - * @param Illuminate\Auth\Reminders\ReminderRepositoryInterface $reminders - * @param Illuminate\Auth\UserProviderInterface $users - * @param Illuminate\Routing\Redirector $redirect - * @param Illuminate\Mail\Mailer $mailer + * @param \Illuminate\Auth\Reminders\ReminderRepositoryInterface $reminders + * @param \Illuminate\Auth\UserProviderInterface $users + * @param \Illuminate\Routing\Redirector $redirect + * @param \Illuminate\Mail\Mailer $mailer * @param string $reminderView * @return void */ @@ -70,7 +70,7 @@ public function __construct(ReminderRepositoryInterface $reminders, * * @param array $credentials * @param Closure $callback - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function remind(array $credentials, Closure $callback = null) { @@ -97,7 +97,7 @@ public function remind(array $credentials, Closure $callback = null) /** * Send the password reminder e-mail. * - * @param Illuminate\Auth\Reminders\RemindableInterface $user + * @param \Illuminate\Auth\Reminders\RemindableInterface $user * @param string $token * @param Closure $callback * @return void @@ -152,7 +152,7 @@ public function reset(array $credentials, Closure $callback) * Validate a password reset for the given credentials. * * @param array $credenitals - * @return Illuminate\Auth\RemindableInterface + * @return \Illuminate\Auth\RemindableInterface */ protected function validateReset(array $credentials) { @@ -192,7 +192,7 @@ protected function validNewPasswords() * Make an error redirect response. * * @param string $reason - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ protected function makeErrorRedirect($reason = '') { @@ -205,7 +205,7 @@ protected function makeErrorRedirect($reason = '') * Get the user for the given credentials. * * @param array $credentials - * @return Illuminate\Auth\Reminders\RemindableInterface + * @return \Illuminate\Auth\Reminders\RemindableInterface */ public function getUser(array $credentials) { @@ -222,7 +222,7 @@ public function getUser(array $credentials) /** * Get the current request object. * - * @return Illuminate\Http\Request + * @return \Illuminate\Http\Request */ protected function getRequest() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php
@@ -5,15 +5,15 @@ interface ReminderRepositoryInterface { /** * Create a new reminder record and token. * - * @param Illuminate\Auth\RemindableInterface $user + * @param \Illuminate\Auth\RemindableInterface $user * @return string */ public function create(RemindableInterface $user); /** * Determine if a reminder record exists and is valid. * - * @param Illuminate\Auth\RemindableInterface $user + * @param \Illuminate\Auth\RemindableInterface $user * @param string $token * @return bool */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Auth/UserProviderInterface.php
@@ -6,22 +6,22 @@ interface UserProviderInterface { * Retrieve a user by their unique identifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier); /** * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials); /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/ApcStore.php
@@ -5,7 +5,7 @@ class ApcStore implements StoreInterface { /** * The APC wrapper instance. * - * @var Illuminate\Cache\ApcWrapper + * @var \Illuminate\Cache\ApcWrapper */ protected $apc; @@ -19,7 +19,7 @@ class ApcStore implements StoreInterface { /** * Create a new APC store. * - * @param Illuminate\Cache\ApcWrapper $apc + * @param \Illuminate\Cache\ApcWrapper $apc * @param string $prefix * @return void */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/CacheManager.php
@@ -7,7 +7,7 @@ class CacheManager extends Manager { /** * Create an instance of the APC cache driver. * - * @return Illuminate\Cache\ApcStore + * @return \Illuminate\Cache\ApcStore */ protected function createApcDriver() { @@ -17,7 +17,7 @@ protected function createApcDriver() /** * Create an instance of the array cache driver. * - * @return Illuminate\Cache\ArrayStore + * @return \Illuminate\Cache\ArrayStore */ protected function createArrayDriver() { @@ -27,7 +27,7 @@ protected function createArrayDriver() /** * Create an instance of the file cache driver. * - * @return Illuminate\Cache\FileStore + * @return \Illuminate\Cache\FileStore */ protected function createFileDriver() { @@ -39,7 +39,7 @@ protected function createFileDriver() /** * Create an instance of the Memcached cache driver. * - * @return Illuminate\Cache\MemcachedStore + * @return \Illuminate\Cache\MemcachedStore */ protected function createMemcachedDriver() { @@ -53,7 +53,7 @@ protected function createMemcachedDriver() /** * Create an instance of the WinCache cache driver. * - * @return Illuminate\Cache\WinCacheStore + * @return \Illuminate\Cache\WinCacheStore */ protected function createWincacheDriver() { @@ -63,7 +63,7 @@ protected function createWincacheDriver() /** * Create an instance of the Redis cache driver. * - * @return Illuminate\Cache\RedisStore + * @return \Illuminate\Cache\RedisStore */ protected function createRedisDriver() { @@ -75,7 +75,7 @@ protected function createRedisDriver() /** * Create an instance of the database cache driver. * - * @return Illuminate\Cache\DatabaseStore + * @return \Illuminate\Cache\DatabaseStore */ protected function createDatabaseDriver() { @@ -96,7 +96,7 @@ protected function createDatabaseDriver() /** * Get the database connection for the database driver. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ protected function getDatabaseConnection() { @@ -108,8 +108,8 @@ protected function getDatabaseConnection() /** * Create a new cache repository with the given implementation. * - * @param Illuminate\Cache\StoreInterface $store - * @return Illuminate\Cache\Repository + * @param \Illuminate\Cache\StoreInterface $store + * @return \Illuminate\Cache\Repository */ protected function repository(StoreInterface $store) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/Console/ClearCommand.php
@@ -23,22 +23,22 @@ class ClearCommand extends Command { /** * The cache manager instance. * - * @var Illuminate\Cache\CacheManager + * @var \Illuminate\Cache\CacheManager */ protected $cache; /** * The file system instance. * - * @var Illuminate\Filesystem\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * Create a new cache clear command instance. * - * @param Illuminate\Cache\CacheManager $cache - * @param Illuminate\Filesystem\Filesystem $files + * @param \Illuminate\Cache\CacheManager $cache + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(CacheManager $cache, Filesystem $files)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/DatabaseStore.php
@@ -8,14 +8,14 @@ class DatabaseStore implements StoreInterface { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; /** * The encrypter instance. * - * @param Illuminate\Encrypter + * @param \Illuminate\Encrypter */ protected $encrypter; @@ -36,8 +36,8 @@ class DatabaseStore implements StoreInterface { /** * Create a new database store. * - * @param Illuminate\Database\Connection $connection - * @param Illuminate\Encrypter $encrypter + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Encrypter $encrypter * @param string $table * @param string $prefix * @return void @@ -177,7 +177,7 @@ public function flush() /** * Get a query builder for the cache table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function table() { @@ -187,7 +187,7 @@ protected function table() /** * Get the underlying database connection. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -197,7 +197,7 @@ public function getConnection() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return \Illuminate\Encrypter */ public function getEncrypter() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/FileStore.php
@@ -5,7 +5,7 @@ class FileStore implements StoreInterface { /** * The Illuminate Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -19,7 +19,7 @@ class FileStore implements StoreInterface { /** * Create a new file cache store instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @param string $directory * @return void */ @@ -164,7 +164,7 @@ protected function expiration($minutes) /** * Get the Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ public function getFilesystem() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/RedisStore.php
@@ -7,7 +7,7 @@ class RedisStore implements StoreInterface { /** * The Redis database connection. * - * @var Illuminate\Redis\Database + * @var \Illuminate\Redis\Database */ protected $redis; @@ -21,7 +21,7 @@ class RedisStore implements StoreInterface { /** * Create a new APC store. * - * @param Illuminate\Redis\Database $redis + * @param \Illuminate\Redis\Database $redis * @param string $prefix * @return void */ @@ -120,7 +120,7 @@ public function flush() /** * Get the Redis database instance. * - * @return Illuminate\Redis\Database + * @return \Illuminate\Redis\Database */ public function getRedis() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cache/Repository.php
@@ -5,7 +5,7 @@ class Repository implements ArrayAccess { /** * The cache store implementation. * - * @var Illuminate\Cache\StoreInterface + * @var \Illuminate\Cache\StoreInterface */ protected $store; @@ -19,7 +19,7 @@ class Repository implements ArrayAccess { /** * Create a new cache repository instance. * - * @param Illuminate\Cache\StoreInterface $store + * @param \Illuminate\Cache\StoreInterface $store */ public function __construct(StoreInterface $store) { @@ -132,7 +132,7 @@ public function setDefaultCacheTime($minutes) /** * Get the cache store implementation. * - * @return Illuminate\Cache\StoreInterface + * @return \Illuminate\Cache\StoreInterface */ public function getStore() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Config/FileLoader.php
@@ -7,7 +7,7 @@ class FileLoader implements LoaderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -35,7 +35,7 @@ class FileLoader implements LoaderInterface { /** * Create a new file configuration loader. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @param string $defaultPath * @return void */ @@ -218,7 +218,7 @@ protected function getRequire($path) /** * Get the Filesystem instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem */ public function getFilesystem() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Config/Repository.php
@@ -9,7 +9,7 @@ class Repository extends NamespacedItemResolver implements ArrayAccess { /** * The loader implementation. * - * @var Illuminate\Config\LoaderInterface + * @var \Illuminate\Config\LoaderInterface */ protected $loader; @@ -44,7 +44,7 @@ class Repository extends NamespacedItemResolver implements ArrayAccess { /** * Create a new configuration repository. * - * @param Illuminate\Config\LoaderInterface $loader + * @param \Illuminate\Config\LoaderInterface $loader * @param string $environment * @return void */ @@ -318,7 +318,7 @@ public function getNamespaces() /** * Get the loader implementation. * - * @return Illuminate\Config\LoaderInterface + * @return \Illuminate\Config\LoaderInterface */ public function getLoader() { @@ -328,7 +328,7 @@ public function getLoader() /** * Set the loader implementation. * - * @param Illuminate\Config\LoaderInterface $loader + * @param \Illuminate\Config\LoaderInterface $loader * @return void */ public function setLoader(LoaderInterface $loader)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Console/Application.php
@@ -9,22 +9,22 @@ class Application extends \Symfony\Component\Console\Application { /** * The exception handler instance. * - * @var Illuminate\Exception\Handler + * @var \Illuminate\Exception\Handler */ protected $exceptionHandler; /** * The Laravel application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $laravel; /** * Start a new Console application. * - * @param Illuminate\Foundation\Application $app - * @return Illuminate\Console\Application + * @param \Illuminate\Foundation\Application $app + * @return \Illuminate\Console\Application */ public static function start($app) { @@ -146,7 +146,7 @@ public function renderException($e, $output) /** * Set the exception handler instance. * - * @param Illuminate\Exception\Handler $handler + * @param \Illuminate\Exception\Handler $handler * @return void */ public function setExceptionHandler($handler) @@ -157,7 +157,7 @@ public function setExceptionHandler($handler) /** * Set the Laravel application instance. * - * @param Illuminate\Foundation\Application $laravel + * @param \Illuminate\Foundation\Application $laravel * @return void */ public function setLaravel($laravel)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Console/Command.php
@@ -10,7 +10,7 @@ class Command extends \Symfony\Component\Console\Command\Command { /** * The Laravel application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $laravel; @@ -296,7 +296,7 @@ public function getOutput() /** * Set the Laravel application instance. * - * @return Illuminate\Foundation\Application + * @return \Illuminate\Foundation\Application */ public function getLaravel() { @@ -306,7 +306,7 @@ public function getLaravel() /** * Set the Laravel application instance. * - * @param Illuminate\Foundation\Application $laravel + * @param \Illuminate\Foundation\Application $laravel * @return void */ public function setLaravel($laravel)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Cookie/CookieJar.php
@@ -18,7 +18,7 @@ class CookieJar { /** * The encrypter instance. * - * @var Illuminate\Encryption\Encrypter + * @var \Illuminate\Encryption\Encrypter */ protected $encrypter; @@ -40,7 +40,7 @@ class CookieJar { * Create a new cookie manager instance. * * @param Symfony\Component\HttpFoundation\Request $request - * @param Illuminate\Encryption\Encrypter $encrypter + * @param \Illuminate\Encryption\Encrypter $encrypter * @return void */ public function __construct(Request $request, Encrypter $encrypter) @@ -189,7 +189,7 @@ public function getRequest() /** * Get the encrypter instance. * - * @return Illuminate\Encryption\Encrypter + * @return \Illuminate\Encryption\Encrypter */ public function getEncrypter() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Connection.php
@@ -17,35 +17,35 @@ class Connection implements ConnectionInterface { /** * The query grammar implementation. * - * @var Illuminate\Database\Query\Grammars\Grammar + * @var \Illuminate\Database\Query\Grammars\Grammar */ protected $queryGrammar; /** * The schema grammar implementation. * - * @var Illuminate\Database\Schema\Grammars\Grammar + * @var \Illuminate\Database\Schema\Grammars\Grammar */ protected $schemaGrammar; /** * The query post processor implementation. * - * @var Illuminate\Database\Query\Processors\Processor + * @var \Illuminate\Database\Query\Processors\Processor */ protected $postProcessor; /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; /** * The paginator environment instance. * - * @var Illuminate\Pagination\Paginator + * @var \Illuminate\Pagination\Paginator */ protected $paginator; @@ -141,7 +141,7 @@ public function useDefaultQueryGrammar() /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -161,7 +161,7 @@ public function useDefaultSchemaGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() {} @@ -178,7 +178,7 @@ public function useDefaultPostProcessor() /** * Get the default post processor instance. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ protected function getDefaultPostProcessor() { @@ -188,7 +188,7 @@ protected function getDefaultPostProcessor() /** * Get a schema builder instance for the connection. * - * @return Illuminate\Database\Schema\Builder + * @return \Illuminate\Database\Schema\Builder */ public function getSchemaBuilder() { @@ -201,7 +201,7 @@ public function getSchemaBuilder() * Begin a fluent query against a database table. * * @param string $table - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function table($table) { @@ -216,7 +216,7 @@ public function table($table) * Get a new raw query expression. * * @param mixed $value - * @return Illuminate\Database\Query\Expression + * @return \Illuminate\Database\Query\Expression */ public function raw($value) { @@ -583,7 +583,7 @@ public function getDriverName() /** * Get the query grammar used by the connection. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ public function getQueryGrammar() { @@ -593,7 +593,7 @@ public function getQueryGrammar() /** * Set the query grammar used by the connection. * - * @param Illuminate\Database\Query\Grammars\Grammar + * @param \Illuminate\Database\Query\Grammars\Grammar * @return void */ public function setQueryGrammar(Query\Grammars\Grammar $grammar) @@ -604,7 +604,7 @@ public function setQueryGrammar(Query\Grammars\Grammar $grammar) /** * Get the schema grammar used by the connection. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ public function getSchemaGrammar() { @@ -614,7 +614,7 @@ public function getSchemaGrammar() /** * Set the schema grammar used by the connection. * - * @param Illuminate\Database\Schema\Grammars\Grammar + * @param \Illuminate\Database\Schema\Grammars\Grammar * @return void */ public function setSchemaGrammar(Schema\Grammars\Grammar $grammar) @@ -625,7 +625,7 @@ public function setSchemaGrammar(Schema\Grammars\Grammar $grammar) /** * Get the query post processor used by the connection. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ public function getPostProcessor() { @@ -635,7 +635,7 @@ public function getPostProcessor() /** * Set the query post processor used by the connection. * - * @param Illuminate\Database\Query\Processors\Processor + * @param \Illuminate\Database\Query\Processors\Processor * @return void */ public function setPostProcessor(Processor $processor) @@ -646,7 +646,7 @@ public function setPostProcessor(Processor $processor) /** * Get the event dispatcher used by the connection. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getEventDispatcher() { @@ -656,7 +656,7 @@ public function getEventDispatcher() /** * Set the event dispatcher instance on the connection. * - * @param Illuminate\Events\Dispatcher + * @param \Illuminate\Events\Dispatcher * @return void */ public function setEventDispatcher(\Illuminate\Events\Dispatcher $events) @@ -667,7 +667,7 @@ public function setEventDispatcher(\Illuminate\Events\Dispatcher $events) /** * Get the paginator environment instance. * - * @return Illuminate\Pagination\Environment + * @return \Illuminate\Pagination\Environment */ public function getPaginator() { @@ -682,7 +682,7 @@ public function getPaginator() /** * Set the pagination environment instance. * - * @param Illuminate\Pagination\Environment|Closure $paginator + * @param \Illuminate\Pagination\Environment|Closure $paginator * @return void */ public function setPaginator($paginator) @@ -806,8 +806,8 @@ public function setTablePrefix($prefix) /** * Set the table prefix and return the grammar. * - * @param Illuminate\Database\Grammar $grammar - * @return Illuminate\Database\Grammar + * @param \Illuminate\Database\Grammar $grammar + * @return \Illuminate\Database\Grammar */ public function withTablePrefix(Grammar $grammar) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/ConnectionResolver.php
@@ -34,7 +34,7 @@ public function __construct(array $connections = array()) * Get a database connection instance. * * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function connection($name = null) { @@ -47,7 +47,7 @@ public function connection($name = null) * Add a connection to the resolver. * * @param string $name - * @param Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Connection $connection * @return void */ public function addConnection($name, Connection $connection)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/ConnectionResolverInterface.php
@@ -6,7 +6,7 @@ interface ConnectionResolverInterface { * Get a database connection instance. * * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function connection($name = null);
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Connectors/ConnectionFactory.php
@@ -13,7 +13,7 @@ class ConnectionFactory { * * @param array $config * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function make(array $config, $name = null) { @@ -33,7 +33,7 @@ public function make(array $config, $name = null) * Create a connector instance based on the configuration. * * @param array $config - * @return Illuminate\Database\Connectors\ConnectorInterface + * @return \Illuminate\Database\Connectors\ConnectorInterface */ public function createConnector(array $config) { @@ -68,7 +68,7 @@ public function createConnector(array $config) * @param string $database * @param string $tablePrefix * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ protected function createConnection($driver, PDO $connection, $database, $tablePrefix = '', $name = null) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Console/Migrations/InstallCommand.php
@@ -23,14 +23,14 @@ class InstallCommand extends Command { /** * The repository instance. * - * @var Illuminate\Database\Console\Migrations\MigrationRepositoryInterface + * @var \Illuminate\Database\Console\Migrations\MigrationRepositoryInterface */ protected $repository; /** * Create a new migration install command instance. * - * @param Illuminate\Database\Console\Migrations\MigrationRepositoryInterface $repository + * @param \Illuminate\Database\Console\Migrations\MigrationRepositoryInterface $repository * @return void */ public function __construct(MigrationRepositoryInterface $repository)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Console/Migrations/MakeCommand.php
@@ -24,7 +24,7 @@ class MakeCommand extends BaseCommand { /** * The migration creator instance. * - * @var Illuminate\Database\Migrations\MigrationCreator + * @var \Illuminate\Database\Migrations\MigrationCreator */ protected $creator; @@ -38,7 +38,7 @@ class MakeCommand extends BaseCommand { /** * Create a new migration install command instance. * - * @param Illuminate\Database\Migrations\MigrationCreator $creator + * @param \Illuminate\Database\Migrations\MigrationCreator $creator * @param string $packagePath * @return void */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Console/Migrations/MigrateCommand.php
@@ -24,7 +24,7 @@ class MigrateCommand extends BaseCommand { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; @@ -36,7 +36,7 @@ class MigrateCommand extends BaseCommand { /** * Create a new migration command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @param string $packagePath * @return void */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Console/Migrations/ResetCommand.php
@@ -23,14 +23,14 @@ class ResetCommand extends Command { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; /** * Create a new migration rollback command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @return void */ public function __construct(Migrator $migrator)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Database/Console/Migrations/RollbackCommand.php
@@ -23,14 +23,14 @@ class RollbackCommand extends Command { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; /** * Create a new migration rollback command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @return void */ public function __construct(Migrator $migrator)
true