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
a65d353597f5a9bb283fa37772381308e4bd1349.json
Fix contract and concrete type hints and PHPDocs
src/Illuminate/Bus/Dispatcher.php
@@ -72,8 +72,8 @@ public function dispatchFromArray($command, array $array) * Marshal a command and dispatch it to its appropriate handler. * * @param mixed $command - * @param \ArrayAccess $array - * @param array $extras + * @param \ArrayAccess $source + * @param array $extras * @return mixed ...
true
Other
laravel
framework
a65d353597f5a9bb283fa37772381308e4bd1349.json
Fix contract and concrete type hints and PHPDocs
src/Illuminate/Contracts/Bus/Dispatcher.php
@@ -18,15 +18,17 @@ public function dispatchFromArray($command, array $array); * Marshal a command and dispatch it to its appropriate handler. * * @param mixed $command - * @param array $array + * @param \ArrayAccess $source + * @param array $extras * @return mixed */ - public function dispatc...
true
Other
laravel
framework
142a84d83793b84f644d4c0d495dea40e18514bf.json
Use expression instead of numeric value
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -306,7 +306,7 @@ protected function whereNotExists(Builder $query, $where) */ protected function whereIn(Builder $query, $where) { - if (empty($where['values'])) return '0'; + if (empty($where['values'])) return '0=1'; $values = $this->parameterize($where['values']); @@ -322,7 +322,7 @@ protected fun...
true
Other
laravel
framework
142a84d83793b84f644d4c0d495dea40e18514bf.json
Use expression instead of numeric value
tests/Database/DatabaseQueryBuilderTest.php
@@ -347,12 +347,12 @@ public function testEmptyWhereIns() { $builder = $this->getBuilder(); $builder->select('*')->from('users')->whereIn('id', array()); - $this->assertEquals('select * from "users" where 0', $builder->toSql()); + $this->assertEquals('select * from "users" where 0=1', $builder->toSql()); $...
true
Other
laravel
framework
52a0b5809da033e17d6dc96b7e79ac705df0e568.json
Fix queries with whereIn and empty arrays
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -306,6 +306,8 @@ protected function whereNotExists(Builder $query, $where) */ protected function whereIn(Builder $query, $where) { + if (empty($where['values'])) return '0'; + $values = $this->parameterize($where['values']); return $this->wrap($where['column']).' in ('.$values.')'; @@ -320,6 +322,8 @...
true
Other
laravel
framework
52a0b5809da033e17d6dc96b7e79ac705df0e568.json
Fix queries with whereIn and empty arrays
tests/Database/DatabaseQueryBuilderTest.php
@@ -343,6 +343,34 @@ public function testBasicWhereNotIns() } + public function testEmptyWhereIns() + { + $builder = $this->getBuilder(); + $builder->select('*')->from('users')->whereIn('id', array()); + $this->assertEquals('select * from "users" where 0', $builder->toSql()); + $this->assertEquals(array(), $b...
true
Other
laravel
framework
85ff8b3f8de7fd2795db44929217d08879ebd917.json
Add some package helpers to service provider.
src/Illuminate/Support/ServiceProvider.php
@@ -36,6 +36,35 @@ public function __construct($app) */ abstract public function register(); + /** + * Register a view file namespace. + * + * @param string $namespace + * @param string $path + * @return void + */ + protected function loadViewsFrom($namespace, $path) + { + if (is_dir($appPath = $this-...
false
Other
laravel
framework
4542536f244b5b759f1f4eefbc94baee4e5151af.json
Fix duplicate queries for Cache::rememberForever
src/Illuminate/Cache/TaggedCache.php
@@ -195,7 +195,7 @@ public function rememberForever($key, Closure $callback) // If the item exists in the cache we will just return this immediately // otherwise we will execute the given Closure and cache the result // of that execution for the given number of minutes. It's easy. - if ($this->has($key)) retu...
false
Other
laravel
framework
8283c19d9110118b43d9dd128f42c50c4687d638.json
Fix duplicate queries for Cache::remember
src/Illuminate/Cache/TaggedCache.php
@@ -164,7 +164,7 @@ public function remember($key, $minutes, Closure $callback) // If the item exists in the cache we will just return this immediately // otherwise we will execute the given Closure and cache the result // of that execution for the given number of minutes in storage. - if ($this->has($key)) r...
false
Other
laravel
framework
1de41ba73bf7f6e16419ac2293506dfdab5d3434.json
Remove hardcoded cache filename
src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
@@ -20,7 +20,7 @@ public function bootstrap(Application $app) // First we will see if we have a cache configuration file. If we do, we'll load // the configuration items from that file so that it is very quick. Otherwise // we will need to spin through every configuration file and load them all. - if (file_ex...
false
Other
laravel
framework
9297ad762f2db3744db7ed7588dae844a282277f.json
Add reverse assertion.
tests/Database/DatabaseEloquentIntegrationTests.php
@@ -101,6 +101,9 @@ public function testBasicHasManyEagerLoading() $user = EloquentTestUser::with('posts')->where('email', 'taylorotwell@gmail.com')->first(); $this->assertEquals('First Post', $user->posts->first()->name); + + $post = EloquentTestPost::with('user')->where('name', 'First Post')->get(); + $this...
false
Other
laravel
framework
28390c9e76f87dc61ec8e0352a22b32a212a7706.json
Add another integration test.
tests/Database/DatabaseEloquentIntegrationTests.php
@@ -49,6 +49,13 @@ public function setUp() $table->integer('user_id'); $table->integer('friend_id'); }); + + $this->schema()->create('posts', function($table) { + $table->increments('id'); + $table->integer('user_id'); + $table->string('name'); + $table->timestamps(); + }); } @@ -61,6 +68,7 @...
false
Other
laravel
framework
ad26757222f0a25ccafa56c83980589c3fd0f59c.json
Use raw array to load relations
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -153,7 +153,7 @@ public function get($columns = array('*')) $select = $this->getSelectColumns($columns); - $models = $this->query->addSelect($select)->getModels(); + $models = $this->query->addSelect($select)->getModels()->all(); $this->hydratePivotRelation($models);
true
Other
laravel
framework
ad26757222f0a25ccafa56c83980589c3fd0f59c.json
Use raw array to load relations
src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
@@ -205,7 +205,7 @@ public function get($columns = array('*')) // models with the result of those columns as a separate model relation. $select = $this->getSelectColumns($columns); - $models = $this->query->addSelect($select)->getModels(); + $models = $this->query->addSelect($select)->getModels()->all(); ...
true
Other
laravel
framework
ad26757222f0a25ccafa56c83980589c3fd0f59c.json
Use raw array to load relations
tests/Database/DatabaseEloquentBelongsToManyTest.php
@@ -2,6 +2,7 @@ use Mockery as m; use Illuminate\Database\Eloquent\Collection; +use Illuminate\Support\Collection as BaseCollection; use Illuminate\Database\Eloquent\Relations\BelongsToMany; class DatabaseEloquentBelongsToManyTest extends PHPUnit_Framework_TestCase { @@ -25,7 +26,7 @@ public function testModels...
true
Other
laravel
framework
5d148e582381e95af77a43ae1c3cd68e477c8235.json
Fix some type hints
src/Illuminate/Bus/Dispatcher.php
@@ -72,7 +72,7 @@ public function dispatchFromArray($command, array $array) * Marshal a command and dispatch it to its appropriate handler. * * @param mixed $command - * @param array $array + * @param \ArrayAccess $array * @return mixed */ public function dispatchFrom($command, ArrayAccess $sou...
true
Other
laravel
framework
5d148e582381e95af77a43ae1c3cd68e477c8235.json
Fix some type hints
src/Illuminate/Foundation/Bus/DispatchesCommands.php
@@ -34,7 +34,7 @@ protected function dispatchFromArray($command, array $array) * Marshal a command and dispatch it to its appropriate handler. * * @param mixed $command - * @param array $array + * @param \ArrayAccess $array * @return mixed */ protected function dispatchFrom($command, ArrayAcces...
true
Other
laravel
framework
3626b9b5bd8a47e6ae2000655ee29c3e690f453c.json
Fix indentation (tabs for now)
src/Illuminate/Foundation/Application.php
@@ -625,10 +625,10 @@ public function booted($callback) /** * {@inheritdoc} */ - public function handle(SymfonyRequest $request, $type = self::MASTER_REQUEST, $catch = true) - { - return $this['Illuminate\Contracts\Http\Kernel']->handle(Request::createFromBase($request)); - } + public function hand...
false
Other
laravel
framework
b8d3f5f08f6cc3fa64015af1f4a062133b0d3d88.json
Return new collection on values.
src/Illuminate/Support/Collection.php
@@ -715,9 +715,7 @@ public function unique() */ public function values() { - $this->items = array_values($this->items); - - return $this; + return new static(array_values($this->items)); } /**
false
Other
laravel
framework
124d0451d2c0fdf22e3e18b2338afbf867317457.json
Tweak a few things.
src/Illuminate/Database/Eloquent/Builder.php
@@ -370,7 +370,7 @@ public function getModels($columns = array('*')) { $connection = $this->model->getConnectionName(); - // We will first get the raw results from the query builder. We'll then + // First, We will get the raw results from the query builder. We'll then // transform the raw results into Eloqu...
false
Other
laravel
framework
e33584db10fa3ca84bce135998a62e8c7529bff5.json
Allow custom queueing of commands and handlers.
src/Illuminate/Bus/Dispatcher.php
@@ -242,7 +242,14 @@ public function dispatchToQueue($command) throw new \RuntimeException("Queue resolver did not return a Queue implementation."); } - $queue->push($command); + if (method_exists($command, 'queue')) + { + $command->queue($queue, $command); + } + else + { + $queue->push($command); + ...
true
Other
laravel
framework
e33584db10fa3ca84bce135998a62e8c7529bff5.json
Allow custom queueing of commands and handlers.
src/Illuminate/Events/Dispatcher.php
@@ -393,12 +393,36 @@ protected function createQueuedHandlerCallable($class, $method) { return function() use ($class, $method) { - $this->resolveQueue()->push('Illuminate\Events\CallQueuedHandler@call', [ - 'class' => $class, 'method' => $method, 'data' => serialize(func_get_args()), - ]); + if (metho...
true
Other
laravel
framework
e33584db10fa3ca84bce135998a62e8c7529bff5.json
Allow custom queueing of commands and handlers.
tests/Bus/BusDispatcherTest.php
@@ -39,6 +39,19 @@ public function testCommandsThatShouldBeQueuedAreQueued() } + public function testCommandsThatShouldBeQueuedAreQueuedUsingCustomHandler() + { + $container = new Container; + $dispatcher = new Dispatcher($container, function() { + $mock = m::mock('Illuminate\Contracts\Queue\Queue'); + $moc...
true
Other
laravel
framework
e33584db10fa3ca84bce135998a62e8c7529bff5.json
Allow custom queueing of commands and handlers.
tests/Events/EventsDispatcherTest.php
@@ -125,8 +125,32 @@ public function testQueuedEventHandlersAreQueued() $d->fire('some.event', ['foo', 'bar']); } + + public function testQueuedEventHandlersAreQueuedWithCustomHandlers() + { + $d = new Dispatcher; + $queue = m::mock('Illuminate\Contracts\Queue\Queue'); + $queue->shouldReceive('push')->once()-...
true
Other
laravel
framework
1d3a87bd7ec245ab320cff4f5eccebfa4ff1b947.json
Fix some things.
src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php
@@ -27,8 +27,6 @@ public function boot() { $this->app->resolving(function(FormRequest $request, $app) { - // We will go ahead and initialize the request as well as set a few dependencies - // on this request instance. The "ValidatesWhenResolved" hook will fire "validate". $this->initializeRequest(...
true
Other
laravel
framework
1d3a87bd7ec245ab320cff4f5eccebfa4ff1b947.json
Fix some things.
tests/Filesystem/FilesystemTest.php
@@ -225,16 +225,6 @@ public function testSizeOutputsSize() } - public function testLastModified() - { - $time = time(); - file_put_contents(__DIR__.'/foo.txt', 'foo'); - $files = new Filesystem; - $this->assertEquals($time, $files->lastModified(__DIR__.'/foo.txt')); - @unlink(__DIR__.'/foo.txt'); - } - - p...
true
Other
laravel
framework
b454d5c343ca44a07c781be953fd8997e8c35eaa.json
Remove old fixture.
tests/Routing/fixtures/annotations/BasicController.php
@@ -1,30 +0,0 @@ -<?php namespace App\Http\Controllers; - -/** - * @Resource("foobar/photos", only={"index", "update"}, names={"index": "index.name"}) - * @Controller(domain="{id}.account.com") - * @Middleware("FooMiddleware") - * @Middleware("BarMiddleware") - * @Middleware("BoomMiddleware", only={"index"}) - * @Where...
false
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
composer.json
@@ -17,7 +17,6 @@ "classpreloader/classpreloader": "~1.0.2", "danielstjules/stringy": "~1.5", "d11wtq/boris": "~1.0", - "doctrine/annotations": "~1.0", "doctrine/inflector": "~1.0", "ircmaxell/password-compat": "~1.0", "jeremeamia/superclosure": "~1.0.1",
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Events/Annotations/Annotations/Hears.php
@@ -1,26 +0,0 @@ -<?php namespace Illuminate\Events\Annotations\Annotations; - -/** - * @Annotation - */ -class Hears { - - /** - * The events the annotation hears. - * - * @var array - */ - public $events; - - /** - * Create a new annotation instance. - * - * @param array $values - * @return void - */ - pub...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Events/Annotations/Scanner.php
@@ -1,120 +0,0 @@ -<?php namespace Illuminate\Events\Annotations; - -use Exception; -use ReflectionClass; -use Symfony\Component\Finder\Finder; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\SimpleAnnotationReader; - -class Scanner { - - /** - * The classes to scan for annotation...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Application.php
@@ -629,46 +629,6 @@ public function getCachedRoutesPath() return $this['path.storage'].'/framework/routes.php'; } - /** - * Determine if the application routes have been scanned. - * - * @return bool - */ - public function routesAreScanned() - { - return $this['files']->exists($this->getScannedRoutesPath()...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Console/EventScanCommand.php
@@ -1,92 +0,0 @@ -<?php namespace Illuminate\Foundation\Console; - -use Illuminate\Console\Command; -use Illuminate\Filesystem\Filesystem; -use Illuminate\Events\Annotations\Scanner; -use Symfony\Component\Console\Input\InputOption; - -class EventScanCommand extends Command { - - /** - * The console command name. - *...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Console/RouteScanCommand.php
@@ -1,99 +0,0 @@ -<?php namespace Illuminate\Foundation\Console; - -use Illuminate\Console\Command; -use Illuminate\Filesystem\Filesystem; -use Illuminate\Routing\Annotations\Scanner; -use Symfony\Component\Console\Input\InputOption; -use Illuminate\Console\AppNamespaceDetectorTrait; - -class RouteScanCommand extends C...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -7,9 +7,7 @@ use Illuminate\Foundation\Console\AppNameCommand; use Illuminate\Foundation\Console\OptimizeCommand; use Illuminate\Foundation\Console\RouteListCommand; -use Illuminate\Foundation\Console\RouteScanCommand; use Illuminate\Foundation\Console\EventMakeCommand; -use Illuminate\Foundation\Console\EventSc...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
@@ -1,32 +1,17 @@ <?php namespace Illuminate\Foundation\Support\Providers; use Illuminate\Support\ServiceProvider; -use Illuminate\Events\Annotations\Scanner; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; class EventServiceProvider extends ServiceProvider { - /** - * The classes to scan f...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php
@@ -2,7 +2,6 @@ use Illuminate\Routing\Router; use Illuminate\Support\ServiceProvider; -use Illuminate\Routing\Annotations\Scanner; class RouteServiceProvider extends ServiceProvider { @@ -13,20 +12,6 @@ class RouteServiceProvider extends ServiceProvider { */ protected $namespace = ''; - /** - * The co...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/AbstractPath.php
@@ -1,40 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -abstract class AbstractPath { - - /** - * The HTTP verb the route responds to. - * - * @var array - */ - public $verb; - - /** - * The domain the route responds to. - * - * @var string - */ - public $domain; - - /** - * The path / URI the rou...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/AnnotationSet.php
@@ -1,57 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -use ReflectionClass; -use Doctrine\Common\Annotations\SimpleAnnotationReader; - -class AnnotationSet { - - /** - * The class annotations. - * - * @var array - */ - public $class; - - /** - * The method annotations. - * - * @var array - */ - pu...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Annotation.php
@@ -1,124 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ArrayAccess; -use ReflectionClass; -use ReflectionMethod; -use Illuminate\Routing\Annotations\MethodEndpoint; -use Illuminate\Routing\Annotations\EndpointCollection; - -abstract class Annotation implements ArrayAccess { - - /** - * T...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Controller.php
@@ -1,61 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ReflectionClass; -use Illuminate\Routing\Annotations\EndpointCollection; - -/** - * @Annotation - */ -class Controller extends Annotation { - - /** - * {@inheritdoc} - */ - public function modifyCollection(EndpointCollection $endpoin...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Delete.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Delete extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Get.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Get extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Middleware.php
@@ -1,47 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ReflectionClass; -use ReflectionMethod; -use Illuminate\Routing\Annotations\MethodEndpoint; -use Illuminate\Routing\Annotations\EndpointCollection; - -/** - * @Annotation - */ -class Middleware extends Annotation { - - /** - * {@inher...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Options.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Options extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Patch.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Patch extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Post.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Post extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Put.php
@@ -1,10 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -/** - * @Annotation - */ -class Put extends Route { - - // - -}
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Resource.php
@@ -1,80 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ReflectionClass; -use Illuminate\Support\Collection; -use Illuminate\Routing\Annotations\MethodEndpoint; -use Illuminate\Routing\Annotations\ResourceEndpoint; -use Illuminate\Routing\Annotations\EndpointCollection; - -/** - * @Annotati...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Route.php
@@ -1,20 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ReflectionMethod; -use Illuminate\Routing\Annotations\Path; -use Illuminate\Routing\Annotations\MethodEndpoint; - -abstract class Route extends Annotation { - - /** - * {@inheritdoc} - */ - public function modify(MethodEndpoint $endp...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Annotations/Where.php
@@ -1,35 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations\Annotations; - -use ReflectionClass; -use ReflectionMethod; -use Illuminate\Routing\Annotations\MethodEndpoint; -use Illuminate\Routing\Annotations\EndpointCollection; - -/** - * @Annotation - */ -class Where extends Annotation { - - /** - * {@inheritdoc...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/EndpointCollection.php
@@ -1,27 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -use Illuminate\Support\Collection; - -class EndpointCollection extends Collection { - - /** - * Get all of the paths for the given endpoint collection. - * - * @return array - */ - public function getAllPaths() - { - $paths = []; - - foreach ($t...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/EndpointInterface.php
@@ -1,42 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -interface EndpointInterface { - - /** - * Transform the endpoint into a route definition. - * - * @return string - */ - public function toRouteDefinition(); - - /** - * Determine if the endpoint has any paths. - * - * @var bool - */ - public f...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/EndpointTrait.php
@@ -1,73 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -trait EndpointTrait { - - /** - * Determine if the middleware applies to a given method. - * - * @param string $method - * @param array $middleware - * @return bool - */ - protected function middlewareAppliesToMethod($method, array $middlewa...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/MethodEndpoint.php
@@ -1,152 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -use Illuminate\Support\Collection; - -class MethodEndpoint implements EndpointInterface { - - use EndpointTrait; - - /** - * The ReflectionClass instance for the controller class. - * - * @var \ReflectionClass - */ - public $reflection; - - /** -...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Path.php
@@ -1,33 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -class Path extends AbstractPath { - - /** - * The name of the route. - * - * @var string - */ - public $as; - - /** - * Create a new Route Path instance. - * - * @param string $verb - * @param string $domain - * @param string $path - *...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/ResourceEndpoint.php
@@ -1,226 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -use Illuminate\Support\Collection; - -class ResourceEndpoint implements EndpointInterface { - - use EndpointTrait; - - /** - * All of the resource controller methods. - * - * @var array - */ - protected $methods = ['index', 'create', 'store', 'sh...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/ResourcePath.php
@@ -1,51 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -class ResourcePath extends AbstractPath { - - /** - * The controller method of the resource path. - * - * @param string $method - */ - public $method; - - /** - * Create a new Resource Path instance. - * - * @param string $method - * @retu...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
src/Illuminate/Routing/Annotations/Scanner.php
@@ -1,158 +0,0 @@ -<?php namespace Illuminate\Routing\Annotations; - -use ReflectionClass; -use Symfony\Component\Finder\Finder; -use Doctrine\Common\Annotations\AnnotationRegistry; -use Doctrine\Common\Annotations\SimpleAnnotationReader; - -class Scanner { - - /** - * The path to scan for annotations. - * - * @var ...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
tests/Routing/RoutingAnnotationScannerTest.php
@@ -1,16 +0,0 @@ -<?php - -use Illuminate\Routing\Annotations\Scanner; - -class RoutingAnnotationScannerTest extends PHPUnit_Framework_TestCase { - - public function testProperRouteDefinitionsAreGenerated() - { - require_once __DIR__.'/fixtures/annotations/BasicController.php'; - $scanner = Scanner::create(['App\Http...
true
Other
laravel
framework
4d9f92ef77b3610a05f71110f539daff06e9081d.json
Remove annotation support. This will be taken over as a 3rd party package. @artisangoose has volunteered.
tests/Routing/results/annotation-basic.php
@@ -1,19 +0,0 @@ -$router->put('more/{id}', [ - 'uses' => 'App\Http\Controllers\BasicController@doMore', - 'as' => NULL, - 'middleware' => ['FooMiddleware', 'BarMiddleware', 'QuxMiddleware'], - 'where' => ['id' => 'regex'], - 'domain' => '{id}.account.com', -]); - -// Resource: foobar/photos@index -$router->group(['mid...
true
Other
laravel
framework
3800ecb1f28a40964df80d51b4230288d49ecc7a.json
Move some things into the dispatcher.
src/Illuminate/Bus/Dispatcher.php
@@ -53,6 +53,119 @@ public function __construct(Container $container, Closure $queueResolver = null) $this->queueResolver = $queueResolver; } + /** + * Marshal a command and dispatch it to its appropriate handler. + * + * @param mixed $command + * @param array $array + * @return mixed + */ + public fun...
true
Other
laravel
framework
3800ecb1f28a40964df80d51b4230288d49ecc7a.json
Move some things into the dispatcher.
src/Illuminate/Contracts/Bus/Dispatcher.php
@@ -1,9 +1,28 @@ <?php namespace Illuminate\Contracts\Bus; use Closure; +use ArrayAccess; interface Dispatcher { + /** + * Marshal a command and dispatch it to its appropriate handler. + * + * @param mixed $command + * @param array $array + * @return mixed + */ + public function dispatchFromArray($co...
true
Other
laravel
framework
3800ecb1f28a40964df80d51b4230288d49ecc7a.json
Move some things into the dispatcher.
src/Illuminate/Foundation/Bus/DispatchesCommands.php
@@ -27,7 +27,7 @@ protected function dispatch($command) */ protected function dispatchFromArray($command, array $array) { - return $this->dispatch($this->marshalFromArray($command, $array)); + return app('Illuminate\Contracts\Bus\Dispatcher')->dispatchFromArray($command, $array); } /** @@ -39,96 +39,7 @@...
true
Other
laravel
framework
ef8ee59f93da71798412271a7c0cb8f45a1a3c9d.json
Fix comment style
tests/Routing/RoutingUrlGeneratorTest.php
@@ -290,9 +290,7 @@ public function testForceRootUrl() $url->forceRootUrl('https://www.bar.com'); $this->assertEquals('http://www.bar.com/foo/bar', $url->to('foo/bar')); - /** - * Ensure trailing / is trimmed from root URL as UrlGenerator already handles this - */ + // Ensure trailing slash is trimmed fro...
false
Other
laravel
framework
924a7fcf21bbba4f4efc8e367f456cea5e4d25c1.json
Remove incomplete sanitization feature.
src/Illuminate/Foundation/Http/FormRequest.php
@@ -28,13 +28,6 @@ class FormRequest extends Request implements ValidatesWhenResolved { */ protected $redirector; - /** - * The sanitized input. - * - * @var array - */ - protected $sanitized; - /** * The URI to redirect to if validation fails. * @@ -85,39 +78,10 @@ protected function getValidatorIns...
false
Other
laravel
framework
253f22ad2e9687e6a5e3ee36e82846dfca943b89.json
Fix exception name Should be InvalidArgumentException, not InvalidParamException
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -1,6 +1,6 @@ <?php namespace Illuminate\Foundation\Console; -use InvalidParamException; +use InvalidArgumentException; use Illuminate\Console\Command; use Illuminate\Foundation\Composer; use Illuminate\View\Engines\CompilerEngine;
false
Other
laravel
framework
7d5fc7e6db736ef76b6092f1d29bdd73a80360ce.json
Ignore more files on export
.gitattributes
@@ -1,2 +1,8 @@ /build export-ignore /tests export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.scrutinizer.yml export-ignore +.travis.yml export-ignore +phpunit.php export-ignore +phpunit.xml export-ignore
false
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Cache/DatabaseStore.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Cache; +use Exception; use LogicException; use Illuminate\Database\ConnectionInterface; use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract; @@ -104,7 +105,7 @@ public function put($key, $value, $minutes) { $this->table()->insert(compact('key', 'val...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Cache/FileStore.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Cache; +use Exception; use Illuminate\Filesystem\Filesystem; class FileStore implements StoreInterface { @@ -64,7 +65,7 @@ protected function getPayload($key) { $expire = substr($contents = $this->files->get($path), 0, 10); } - catch (\Exception $e) + catch ...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Database/Connection.php
@@ -3,6 +3,7 @@ use PDO; use Closure; use DateTime; +use Exception; use LogicException; use RuntimeException; use Illuminate\Contracts\Events\Dispatcher; @@ -451,7 +452,7 @@ public function transaction(Closure $callback) // If we catch an exception, we will roll back so nothing gets messed // up in the data...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Database/SqlServerConnection.php
@@ -1,6 +1,7 @@ <?php namespace Illuminate\Database; use Closure; +use Exception; use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as DoctrineDriver; use Illuminate\Database\Query\Processors\SqlServerProcessor; use Illuminate\Database\Query\Grammars\SqlServerGrammar as QueryGrammar; @@ -38,7 +39,7 @@ public function tr...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Encryption/Encrypter.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Encryption; +use Exception; use Illuminate\Contracts\Encryption\DecryptException; use Symfony\Component\Security\Core\Util\StringUtils; use Symfony\Component\Security\Core\Util\SecureRandom; @@ -115,7 +116,7 @@ protected function mcryptDecrypt($value, $iv) { retur...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Events/Annotations/Scanner.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Events\Annotations; +use Exception; use ReflectionClass; use Symfony\Component\Finder\Finder; use Doctrine\Common\Annotations\AnnotationRegistry; @@ -94,7 +95,7 @@ protected function getClassesToScan() { $classes[] = new ReflectionClass($class); } - catch ...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Events/Dispatcher.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Events; +use Exception; use ReflectionClass; use Illuminate\Container\Container; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; @@ -375,7 +376,7 @@ protected function handlerShouldBeQueued($class) 'Illuminate\Contracts\Queue\ShouldBeQueued' );...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Foundation\Console; +use InvalidParamException; use Illuminate\Console\Command; use Illuminate\Foundation\Composer; use Illuminate\View\Engines\CompilerEngine; @@ -140,7 +141,7 @@ protected function compileViews() { $engine = $this->laravel['view']->getEngineF...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Queue/Console/SubscribeCommand.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Queue\Console; +use Exception; use RuntimeException; use Illuminate\Queue\IronQueue; use Illuminate\Console\Command; @@ -75,7 +76,7 @@ protected function getPushType() { return $this->getQueue()->push_type; } - catch (\Exception $e) + catch (Exception $e) ...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Queue/Worker.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Queue; +use Exception; use Illuminate\Contracts\Queue\Job; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Queue\Failed\FailedJobProviderInterface; @@ -111,7 +112,7 @@ protected function runNextJobForDaemon($connectionName, $queue, $delay, $sleep, { $th...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Routing/Annotations/Scanner.php
@@ -133,7 +133,7 @@ protected function getClassesToScan() { $classes[] = new ReflectionClass($scan); } - catch (\Exception $e) + catch (Exception $e) { // }
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/Validation/Validator.php
@@ -3,6 +3,7 @@ use Closure; use DateTime; use Countable; +use Exception; use DateTimeZone; use RuntimeException; use BadMethodCallException; @@ -1437,7 +1438,7 @@ protected function getDateTimeWithOptionalFormat($format, $value) { return new DateTime($value); } - catch (\Exception $e) + catch (Except...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/View/Engines/PhpEngine.php
@@ -1,5 +1,7 @@ <?php namespace Illuminate\View\Engines; +use Exception; + class PhpEngine implements EngineInterface { /** @@ -36,7 +38,7 @@ protected function evaluatePath($__path, $__data) { include $__path; } - catch (\Exception $e) + catch (Exception $e) { $this->handleViewException($e, ...
true
Other
laravel
framework
371728db97cb4b79296d8865f784f2ea1eb97252.json
Use FQN for exceptions
src/Illuminate/View/Factory.php
@@ -231,7 +231,7 @@ public function exists($view) { $this->finder->find($view); } - catch (\InvalidArgumentException $e) + catch (InvalidArgumentException $e) { return false; }
true
Other
laravel
framework
cd6fea1d6e293a518433c69bcfaacaca3f39babd.json
refine the code & add related test case
src/Illuminate/Pagination/Paginator.php
@@ -143,8 +143,7 @@ protected function calculateCurrentAndLastPages() } else { - $this->lastPage = (int) ceil($this->total / $this->perPage); - $this->lastPage = ($this->lastPage > 0) ? $this->lastPage : 1; + $this->lastPage = max((int) ceil($this->total / $this->perPage), 1); $this->currentPage = ...
true
Other
laravel
framework
cd6fea1d6e293a518433c69bcfaacaca3f39babd.json
refine the code & add related test case
tests/Pagination/PaginationPaginatorTest.php
@@ -21,6 +21,16 @@ public function testPaginationContextIsSetupCorrectly() $this->assertEquals(1, $p->getCurrentPage()); } + public function testPaginationContextIsSetupCorrectlyWithEmptyItems() + { + $p = new Paginator($factory = m::mock('Illuminate\Pagination\Factory'), array(), 0, 2); + $factory->shouldRece...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
src/Illuminate/Database/Eloquent/Builder.php
@@ -150,7 +150,7 @@ public function firstOrFail($columns = array('*')) */ public function get($columns = array('*')) { - $models = $this->getModels($columns); + $models = $this->getModels($columns)->all(); // If we actually found models we will also eager load any relationships that // have been specif...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
src/Illuminate/Database/Eloquent/Model.php
@@ -487,11 +487,11 @@ public function newFromBuilder($attributes = array()) /** * Create a collection of models from plain arrays. * - * @param array $items + * @param array|\ArrayAccess $items * @param string $connection * @return \Illuminate\Database\Eloquent\Collection */ - public static fun...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
src/Illuminate/Database/Query/Builder.php
@@ -1287,20 +1287,18 @@ public function pluck($column) * Execute the query and get the first result. * * @param array $columns - * @return mixed|static + * @return mixed */ public function first($columns = array('*')) { - $results = $this->take(1)->get($columns); - - return count($results) > 0 ? ...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php
@@ -63,7 +63,7 @@ public function log($connection, $queue, $payload) */ public function all() { - return $this->getTable()->orderBy('id', 'desc')->get(); + return $this->getTable()->orderBy('id', 'desc')->get()->all(); } /**
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
tests/Database/DatabaseEloquentBuilderTest.php
@@ -106,7 +106,7 @@ public function testFirstMethod() public function testGetMethodLoadsModelsAndHydratesEagerRelations() { $builder = m::mock('Illuminate\Database\Eloquent\Builder[getModels,eagerLoadRelations]', array($this->getMockQueryBuilder())); - $builder->shouldReceive('getModels')->with(array('foo'))->a...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
tests/Database/DatabaseEloquentModelTest.php
@@ -1101,7 +1101,7 @@ public function newQuery() } class EloquentModelHydrateRawStub extends Illuminate\Database\Eloquent\Model { - public static function hydrate(array $items, $connection = null) { return 'hydrated'; } + public static function hydrate($items, $connection = null) { return 'hydrated'; } public fun...
true
Other
laravel
framework
0023d9b6bb2d25195be28227c81729c000ee4b4b.json
Return collection from query builder
tests/Database/DatabaseQueryBuilderTest.php
@@ -699,7 +699,7 @@ public function testAggregateResetFollowedByGet() $sum = $builder->sum('id'); $this->assertEquals(2, $sum); $result = $builder->get(); - $this->assertEquals(array(array('column1' => 'foo', 'column2' => 'bar')), $result); + $this->assertEquals(array(array('column1' => 'foo', 'column2' => '...
true
Other
laravel
framework
06b91833d2dc83f4cf554a9625f4003c435db6c6.json
Fix variable name.
src/Illuminate/Foundation/Console/stubs/event-handler-queued.stub
@@ -25,7 +25,7 @@ class {{class}} implements ShouldBeQueued { * @param {{event}} * @return void */ - public function handle({{event}} $command) + public function handle({{event}} $event) { // }
true
Other
laravel
framework
06b91833d2dc83f4cf554a9625f4003c435db6c6.json
Fix variable name.
src/Illuminate/Foundation/Console/stubs/event-handler.stub
@@ -23,7 +23,7 @@ class {{class}} { * @param {{event}} * @return void */ - public function handle({{event}} $command) + public function handle({{event}} $event) { // }
true
Other
laravel
framework
6469e261ec75a415fd626a4b5ab9bb07adddcd43.json
Add a "where date" statement to the query Add a "where date" statement to the query
src/Illuminate/Database/Query/Builder.php
@@ -869,7 +869,21 @@ public function orWhereNotNull($column) { return $this->whereNotNull($column, 'or'); } - + + /** + * Add a "where date" statement to the query. + * + * @param string $column + * @param string $operator + * @param int $value + * @param string $boolean + * @return \Illuminat...
false
Other
laravel
framework
ca32323d7e29cad363d4014fde156440855919a8.json
fix conflicts and tests.
src/Illuminate/Database/Eloquent/Model.php
@@ -1830,14 +1830,7 @@ public function freshTimestampString() */ public function newQuery() { - $builder = $this->newEloquentBuilder( - $this->newBaseQueryBuilder() - ); - - // Once we have the query builders, we will set the model instances so the - // builder can easily access any information it may need...
true
Other
laravel
framework
ca32323d7e29cad363d4014fde156440855919a8.json
fix conflicts and tests.
src/Illuminate/Support/Collection.php
@@ -650,11 +650,16 @@ public function splice($offset, $length = 0, $replacement = array()) /** * Get the sum of the given values. * - * @param \Closure $callback + * @param \Closure|null $callback * @return mixed */ - public function sum($callback) + public function sum($callback = null) { + if (...
true
Other
laravel
framework
ca32323d7e29cad363d4014fde156440855919a8.json
fix conflicts and tests.
tests/Database/DatabaseEloquentModelTest.php
@@ -150,11 +150,11 @@ public function testWithMethodCallsQueryBuilderCorrectlyWithArray() public function testUpdateProcess() { - $model = $this->getMock('EloquentModelStub', array('newQuery', 'updateTimestamps')); + $model = $this->getMock('EloquentModelStub', array('newQueryWithoutScopes', 'updateTimestamps')...
true
Other
laravel
framework
ca32323d7e29cad363d4014fde156440855919a8.json
fix conflicts and tests.
tests/Support/SupportCollectionTest.php
@@ -515,6 +515,13 @@ public function testGettingSumFromCollection() } + public function testCanSumValuesWithoutACallback() + { + $c = new Collection([1, 2, 3, 4, 5]); + $this->assertEquals(15, $c->sum()); + } + + public function testGettingSumFromEmptyCollection() { $c = new Collection();
true
Other
laravel
framework
e6b368f7413d72b2095e445283df81827fcb47a4.json
Move env() to Foundation helper
src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php
@@ -20,7 +20,7 @@ public function bootstrap(Application $app) $app->detectEnvironment(function() { - return getenv('APP_ENV') ?: 'production'; + return env('APP_ENV', 'production'); }); }
true
Other
laravel
framework
e6b368f7413d72b2095e445283df81827fcb47a4.json
Move env() to Foundation helper
src/Illuminate/Foundation/helpers.php
@@ -534,6 +534,42 @@ function view($view = null, $data = array(), $mergeData = array()) } } +if ( ! function_exists('env')) +{ + /** + * Gets the value of an environment variable. Supports boolean, empty and null. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function env...
true
Other
laravel
framework
e6b368f7413d72b2095e445283df81827fcb47a4.json
Move env() to Foundation helper
src/Illuminate/Support/helpers.php
@@ -491,42 +491,6 @@ function ends_with($haystack, $needles) } } -if ( ! function_exists('env')) -{ - /** - * Gets the value of an environment variable. Supports boolean, empty and null. - * - * @param string $key - * @param mixed $default - * @return mixed - */ - function env($key, $default = null) - {...
true