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
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Auth/Console/LoginRequestCommand.php
@@ -1,8 +1,6 @@ <?php namespace Illuminate\Auth\Console; -use Illuminate\Filesystem\Filesystem; use Illuminate\Console\GeneratorCommand; -use Symfony\Component\Console\Input\InputArgument; class LoginRequestCommand extends GeneratorCommand {
true
Other
laravel
framework
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Auth/Console/RegisterRequestCommand.php
@@ -1,8 +1,6 @@ <?php namespace Illuminate\Auth\Console; -use Illuminate\Filesystem\Filesystem; use Illuminate\Console\GeneratorCommand; -use Symfony\Component\Console\Input\InputArgument; class RegisterRequestCommand extends GeneratorCommand {
true
Other
laravel
framework
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Auth/Console/RemindersControllerCommand.php
@@ -1,6 +1,5 @@ <?php namespace Illuminate\Auth\Console; -use Illuminate\Filesystem\Filesystem; use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputArgument;
true
Other
laravel
framework
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Foundation/Publishing/AssetPublisher.php
@@ -1,7 +1,5 @@ <?php namespace Illuminate\Foundation\Publishing; -use Illuminate\Filesystem\Filesystem; - class AssetPublisher extends Publisher { /**
true
Other
laravel
framework
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Foundation/Publishing/ConfigPublisher.php
@@ -1,7 +1,5 @@ <?php namespace Illuminate\Foundation\Publishing; -use Illuminate\Filesystem\Filesystem; - class ConfigPublisher extends Publisher { /**
true
Other
laravel
framework
046cb9d8324752c73df5587da84376ec30abe312.json
Remove unecessary use
src/Illuminate/Foundation/Publishing/ViewPublisher.php
@@ -1,7 +1,5 @@ <?php namespace Illuminate\Foundation\Publishing; -use Illuminate\Filesystem\Filesystem; - class ViewPublisher extends Publisher { /**
true
Other
laravel
framework
94d7982f78fa1c1d8581117feae9992ea62dc21a.json
Fix some namespacing bugs.
src/Illuminate/Console/GeneratorCommand.php
@@ -113,7 +113,7 @@ protected function getNamespaceWithSuffix($type, $name) { $suffix = $this->getNamespaceSuffix($name); - return trim($this->laravel['config']['namespaces.'.$type].'\\'.$suffix, '\\'); + return trim($this->laravel['config']['namespaces.'.$type].$suffix, '\\'); } /** @@ -136,6 +136,8 @@ protected function getNamespaceSuffix($name) */ protected function replaceClass($stub, $name) { + $name = str_replace($this->getNamespaceSuffix($name).'\\', '', $name); + return str_replace('{{class}}', $name, $stub); }
false
Other
laravel
framework
44b427f771e76489db693034a1120b8b0f349dbf.json
Add config key.
src/Illuminate/Foundation/Console/ProviderMakeCommand.php
@@ -27,6 +27,13 @@ class ProviderMakeCommand extends GeneratorCommand { */ protected $type = 'Provider'; + /** + * Set the configuration key for the namespace. + * + * @var string + */ + protected $configKey = 'providers'; + /** * Get the controller class path. *
false
Other
laravel
framework
3558329f06418d87e039619abb5a2d2f0a58b911.json
Respect full controller namespace.
src/Illuminate/Routing/Console/ControllerMakeCommand.php
@@ -27,6 +27,21 @@ class ControllerMakeCommand extends GeneratorCommand { */ protected $type = 'Controller'; + /** + * Replace the namespace for the given stub. + * + * @param string $stub + * @return $this + */ + protected function replaceNamespace(&$stub) + { + $stub = str_replace( + '{{namespace}}', trim($this->laravel['config']['namespaces.controllers'], '\\'), $stub + ); + + return $this; + } + /** * Get the controller class path. *
true
Other
laravel
framework
3558329f06418d87e039619abb5a2d2f0a58b911.json
Respect full controller namespace.
src/Illuminate/Routing/Console/stubs/controller.stub
@@ -1,4 +1,4 @@ -<?php namespace {{namespace}}Http\Controllers; +<?php namespace {{namespace}}; class {{class}} extends \Controller {
true
Other
laravel
framework
0081f75ee8acc8c16fe3c165b7e41dacbbf14df5.json
Extract registerCreator method Make it easier to register a custom creator.
src/Illuminate/Database/MigrationServiceProvider.php
@@ -171,10 +171,7 @@ protected function registerInstallCommand() */ protected function registerMakeCommand() { - $this->app->bindShared('migration.creator', function($app) - { - return new MigrationCreator($app['files']); - }); + $this->registerCreator(); $this->app->bindShared('command.migrate.make', function($app) { @@ -189,6 +186,19 @@ protected function registerMakeCommand() }); } + /** + * Register the migration creator. + * + * @return void + */ + protected function registerCreator() + { + $this->app->bindShared('migration.creator', function($app) + { + return new MigrationCreator($app['files']); + }); + } + /** * Get the services provided by the provider. *
false
Other
laravel
framework
b45f46c7877b0799d0f127eac611ad6c5afd5705.json
Update build scripts.
build/illuminate-split-full.sh
@@ -18,7 +18,7 @@ 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/Remote:git@github.com:illuminate/remote.git +git subsplit publish --heads="4.1 4.2" src/Illuminate/Remote:git@github.com:illuminate/remote.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
true
Other
laravel
framework
b45f46c7877b0799d0f127eac611ad6c5afd5705.json
Update build scripts.
build/illuminate-split.sh
@@ -18,7 +18,7 @@ git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Mail:git@ git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Pagination:git@github.com:illuminate/pagination.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Queue:git@github.com:illuminate/queue.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Redis:git@github.com:illuminate/redis.git -git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Remote:git@github.com:illuminate/remote.git +git subsplit publish --heads="4.1 4.2" --no-tags src/Illuminate/Remote:git@github.com:illuminate/remote.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Routing:git@github.com:illuminate/routing.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Session:git@github.com:illuminate/session.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Support:git@github.com:illuminate/support.git
true
Other
laravel
framework
58cac4dd29a1ecc0ae09ecfa0d35563bd89fb8cc.json
Update build scripts.
build/illuminate-split-full.sh
@@ -18,7 +18,7 @@ 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/Remote:git@github.com:illuminate/remote.git +git subsplit publish --heads="4.1 4.2" src/Illuminate/Remote:git@github.com:illuminate/remote.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
true
Other
laravel
framework
58cac4dd29a1ecc0ae09ecfa0d35563bd89fb8cc.json
Update build scripts.
build/illuminate-split.sh
@@ -18,7 +18,7 @@ git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Mail:git@ git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Pagination:git@github.com:illuminate/pagination.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Queue:git@github.com:illuminate/queue.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Redis:git@github.com:illuminate/redis.git -git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Remote:git@github.com:illuminate/remote.git +git subsplit publish --heads="4.1 4.2" --no-tags src/Illuminate/Remote:git@github.com:illuminate/remote.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Routing:git@github.com:illuminate/routing.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Session:git@github.com:illuminate/session.git git subsplit publish --heads="master 4.1 4.2" --no-tags src/Illuminate/Support:git@github.com:illuminate/support.git
true
Other
laravel
framework
bb0200154e5945b2d1a6e53cb35b44e7d6e7ca34.json
Set container on controller.
src/Illuminate/Routing/Controller.php
@@ -1,6 +1,7 @@ <?php namespace Illuminate\Routing; use Closure; +use Illuminate\Container\Container; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; abstract class Controller { @@ -20,18 +21,18 @@ abstract class Controller { protected $afterFilters = array(); /** - * The route filterer implementation. + * The container instance. * - * @var \Illuminate\Routing\RouteFiltererInterface + * @var \Illuminate\Container\Container */ - protected static $filterer; + protected $container; /** - * The layout used by the controller. + * The route filterer implementation. * - * @var \Illuminate\View\View + * @var \Illuminate\Routing\RouteFiltererInterface */ - protected $layout; + protected static $filterer; /** * Register a "before" filter on the controller. @@ -210,13 +211,6 @@ public static function setFilterer(RouteFiltererInterface $filterer) static::$filterer = $filterer; } - /** - * Create the layout used by the controller. - * - * @return void - */ - protected function setupLayout() {} - /** * Execute an action on the controller. * @@ -226,19 +220,7 @@ protected function setupLayout() {} */ public function callAction($method, $parameters) { - $this->setupLayout(); - - $response = call_user_func_array(array($this, $method), $parameters); - - // If no response is returned from the controller action and a layout is being - // used we will assume we want to just return the layout view as any nested - // views were probably bound on this view during this controller actions. - if (is_null($response) && ! is_null($this->layout)) - { - $response = $this->layout; - } - - return $response; + return call_user_func_array(array($this, $method), $parameters); } /** @@ -254,6 +236,19 @@ public function missingMethod($parameters = array()) throw new NotFoundHttpException("Controller method not found."); } + /** + * Set the container instance on the controller. + * + * @param \Illuminate\Container\Container $container + * @return $this + */ + public function setContainer(Container $container) + { + $this->container = $container; + + return $this; + } + /** * Handle calls to missing methods on the controller. *
true
Other
laravel
framework
bb0200154e5945b2d1a6e53cb35b44e7d6e7ca34.json
Set container on controller.
src/Illuminate/Routing/ControllerDispatcher.php
@@ -79,7 +79,7 @@ protected function makeController($controller) { Controller::setFilterer($this->filterer); - return $this->container->make($controller); + return $this->container->make($controller)->setContainer($this->container); } /**
true
Other
laravel
framework
bb0200154e5945b2d1a6e53cb35b44e7d6e7ca34.json
Set container on controller.
src/Illuminate/Support/helpers.php
@@ -419,6 +419,21 @@ function class_uses_recursive($class) } } +if ( ! function_exists('config')) +{ + /** + * Get the specified configuration value. + * + * @param string $key + * @param mixed $default + * @return mixed + */ + function config($key, $default = null) + { + return app('config')->get($key, $default); + } +} + if ( ! function_exists('csrf_token')) { /**
true
Other
laravel
framework
bb0200154e5945b2d1a6e53cb35b44e7d6e7ca34.json
Set container on controller.
tests/Routing/RoutingControllerDispatcherTest.php
@@ -34,7 +34,6 @@ public function testBasicDispatchToMethod() $response = $dispatcher->dispatch($route, $request, 'ControllerDispatcherTestControllerStub', 'getIndex'); $this->assertEquals('getIndex', $response); - $this->assertEquals('setupLayout', $_SERVER['ControllerDispatcherTestControllerStub']); } @@ -78,12 +77,6 @@ public function __construct() // construct shouldn't affect setupLayout. } - protected function setupLayout() - { - $_SERVER['ControllerDispatcherTestControllerStub'] = __FUNCTION__; - } - - public function getIndex() { return __FUNCTION__;
true
Other
laravel
framework
82010aed62bd127a57473a816e19b49ff6f1cf05.json
Fix controller namespace.
src/Illuminate/Auth/Console/stubs/controller.stub
@@ -2,7 +2,7 @@ use App, Hash, Lang, View, Input, Password, Redirect; -class {{class}} extends \Controller { +class {{class}} extends Controller { /** * Display the password reminder view.
false
Other
laravel
framework
c13d033c6cb41f0d2b91b679227ec511cab853aa.json
Simplify remindres-controller command.
src/Illuminate/Auth/Console/RemindersControllerCommand.php
@@ -1,10 +1,10 @@ <?php namespace Illuminate\Auth\Console; -use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; +use Illuminate\Console\GeneratorCommand; use Symfony\Component\Console\Input\InputOption; -class RemindersControllerCommand extends Command { +class RemindersControllerCommand extends GeneratorCommand { /** * The console command name. @@ -21,72 +21,54 @@ class RemindersControllerCommand extends Command { protected $description = 'Create a stub password reminder controller'; /** - * The filesystem instance. + * The type of class being generated. * - * @var \Illuminate\Filesystem\Filesystem + * @var string */ - protected $files; + protected $type = 'Controller'; /** - * Create a new reminder table command instance. + * Execute the console command. * - * @param \Illuminate\Filesystem\Filesystem $files * @return void */ - public function __construct(Filesystem $files) + public function fire() { - parent::__construct(); + parent::fire(); - $this->files = $files; + $this->comment("Route: Route::controller('password', 'RemindersController');"); } /** - * Execute the console command. + * Get the controller class path. * - * @return void + * @param string $name + * @return string */ - public function fire() + protected function getPath($name) { - $destination = $this->getPath() . '/RemindersController.php'; - - if ( ! $this->files->exists($destination)) - { - $this->files->copy(__DIR__.'/stubs/controller.stub', $destination); - - $this->info('Password reminders controller created successfully!'); - - $this->comment("Route: Route::controller('password', 'RemindersController');"); - } - else - { - $this->error('Password reminders controller already exists!'); - } + return $this->laravel['path.controllers'].'/'.$name.'.php'; } /** - * Get the path to the migration directory. + * Get the stub file for the generator. * * @return string */ - private function getPath() + protected function getStub() { - if ( ! $path = $this->input->getOption('path')) - { - $path = $this->laravel['path'].'/controllers'; - } - - return rtrim($path, '/'); + return __DIR__.'/stubs/controller.stub'; } /** - * Get the console command options. + * Get the console command arguments. * * @return array */ - protected function getOptions() + protected function getArguments() { return array( - array('path', null, InputOption::VALUE_OPTIONAL, 'The directory where the controller should be placed.', null), + array('name', InputArgument::OPTIONAL, 'The name of the class', 'RemindersController'), ); }
true
Other
laravel
framework
c13d033c6cb41f0d2b91b679227ec511cab853aa.json
Simplify remindres-controller command.
src/Illuminate/Auth/Console/stubs/controller.stub
@@ -1,6 +1,8 @@ -<?php +<?php namespace {{namespace}}Http\Controllers; -class RemindersController extends Controller { +use App, Hash, Lang, View, Input, Password, Redirect; + +class {{class}} extends \Controller { /** * Display the password reminder view.
true
Other
laravel
framework
0f9fe8f98bfa5106cbf9abfa2253ad720c24e76f.json
Fix a slight bug in action URL generation.
src/Illuminate/Routing/UrlGenerator.php
@@ -463,6 +463,10 @@ public function action($action, $parameters = array(), $absolute = true) { $action = $this->rootNamespace.'\\'.$action; } + else + { + $action = trim($action, '\\'); + } return $this->route($action, $parameters, $absolute, $this->routes->getByAction($action)); }
true
Other
laravel
framework
0f9fe8f98bfa5106cbf9abfa2253ad720c24e76f.json
Fix a slight bug in action URL generation.
tests/Routing/RoutingUrlGeneratorTest.php
@@ -112,7 +112,11 @@ public function testControllerRoutesWithADefaultNamespace() $route = new Illuminate\Routing\Route(array('GET'), 'foo/bar', array('controller' => 'namespace\foo@bar')); $routes->add($route); + $route = new Illuminate\Routing\Route(array('GET'), 'something/else', array('controller' => 'something\foo@bar')); + $routes->add($route); + $this->assertEquals('http://www.foo.com/foo/bar', $url->action('foo@bar')); + $this->assertEquals('http://www.foo.com/something/else', $url->action('\something\foo@bar')); }
true
Other
laravel
framework
8d2f8c7612ccbac71b889ac8b126db1acee24224.json
Implement NullStore in Illuminate\Cache.
src/Illuminate/Cache/CacheManager.php
@@ -50,6 +50,16 @@ protected function createMemcachedDriver() return $this->repository(new MemcachedStore($memcached, $this->getPrefix())); } + /** + * Create an instance of the Null cache driver. + * + * @return \Illuminate\Cache\NullStore + */ + protected function createMemcachedDriver() + { + return $this->repository(new NullStore()); + } + /** * Create an instance of the WinCache cache driver. *
true
Other
laravel
framework
8d2f8c7612ccbac71b889ac8b126db1acee24224.json
Implement NullStore in Illuminate\Cache.
src/Illuminate/Cache/NullStore.php
@@ -0,0 +1,96 @@ +<?php namespace Illuminate\Cache; + +class ArrayStore extends TaggableStore implements StoreInterface { + + /** + * The array of stored values. + * + * @var array + */ + protected $storage = array(); + + /** + * Retrieve an item from the cache by key. + * + * @param string $key + * @return mixed + */ + public function get($key) + { + } + + /** + * Store an item in the cache for a given number of minutes. + * + * @param string $key + * @param mixed $value + * @param int $minutes + * @return void + */ + public function put($key, $value, $minutes) + { + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function increment($key, $value = 1) + { + } + + /** + * Increment the value of an item in the cache. + * + * @param string $key + * @param mixed $value + * @return int + */ + public function decrement($key, $value = 1) + { + } + + /** + * Store an item in the cache indefinitely. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function forever($key, $value) + { + } + + /** + * Remove an item from the cache. + * + * @param string $key + * @return void + */ + public function forget($key) + { + } + + /** + * Remove all items from the cache. + * + * @return void + */ + public function flush() + { + } + + /** + * Get the cache key prefix. + * + * @return string + */ + public function getPrefix() + { + return ''; + } + +}
true
Other
laravel
framework
8d2f8c7612ccbac71b889ac8b126db1acee24224.json
Implement NullStore in Illuminate\Cache.
tests/Cache/CacheNullStoreTest.php
@@ -0,0 +1,14 @@ +<?php + +use Illuminate\Cache\ArrayStore; + +class CacheNullStoreTest extends PHPUnit_Framework_TestCase { + + public function testItemsCanNotBeCached() + { + $store = new NullStore; + $store->put('foo', 'bar', 10); + $this->assertNull($store->get('foo')); + } + +}
true
Other
laravel
framework
3812a6f80ef79bc87a5b42d5c0728333bb5085ba.json
Write the compiled file to the storage directory.
src/Illuminate/Foundation/Console/ClearCompiledCommand.php
@@ -25,7 +25,7 @@ class ClearCompiledCommand extends Command { */ public function fire() { - if (file_exists($path = $this->laravel['path.base'].'/bootstrap/compiled.php')) + if (file_exists($path = $this->laravel['path.storage'].'/meta/compiled.php')) { @unlink($path); }
true
Other
laravel
framework
3812a6f80ef79bc87a5b42d5c0728333bb5085ba.json
Write the compiled file to the storage directory.
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -85,7 +85,7 @@ protected function compileClasses() { $this->registerClassPreloaderCommand(); - $outputPath = $this->laravel['path.base'].'/bootstrap/compiled.php'; + $outputPath = $this->laravel['path.storage'].'/meta/compiled.php'; $this->callSilent('compile', array( '--config' => implode(',', $this->getClassFiles()),
true
Other
laravel
framework
5211c68bbaa791223e3c782c28984c3dc6165136.json
Fix an error in Collection->random() Fix an error on random() if called on an empty collection. Returns null instead.
src/Illuminate/Support/Collection.php
@@ -405,6 +405,10 @@ public function put($key, $value) */ public function random($amount = 1) { + if (!count($this->items)) { + return null; + } + $keys = array_rand($this->items, $amount); return is_array($keys) ? array_intersect_key($this->items, array_flip($keys)) : $this->items[$keys];
false
Other
laravel
framework
902ecb9bc84a8b4632ed87e0cf5952aaf848a069.json
Update route helper to match URL::route This updates the `route` helper to accept the same arguments as the function it calls.
src/Illuminate/Support/helpers.php
@@ -693,13 +693,15 @@ function public_path($path = '') /** * Generate a URL to a named route. * - * @param string $route + * @param string $name * @param array $parameters + * @param bool $absolute + * @param \Illuminate\Routing\Route $route * @return string */ - function route($route, $parameters = array()) + function route($name, $parameters = array(), $absolute = true, $route = null) { - return app('url')->route($route, $parameters); + return app('url')->route($name, $parameters, $absolute, $route); } }
false
Other
laravel
framework
a50c1d0fc8a1d403cacad370cb74c9cf5d15a0f5.json
Update docblocks for Eloquent Model
src/Illuminate/Database/Eloquent/Model.php
@@ -352,7 +352,7 @@ public static function getGlobalScope($scope) /** * Get the global scopes for this class instance. * - * @return array + * @return \Illuminate\Database\Eloquent\ScopeInterface[] */ public function getGlobalScopes() { @@ -590,7 +590,7 @@ protected static function firstByAttributes($attributes) /** * Begin querying the model. * - * @return \Illuminate\Database\Eloquent\Builder|static + * @return \Illuminate\Database\Eloquent\Builder */ public static function query() { @@ -601,7 +601,7 @@ public static function query() * Begin querying the model on a given connection. * * @param string $connection - * @return \Illuminate\Database\Eloquent\Builder|static + * @return \Illuminate\Database\Eloquent\Builder */ public static function on($connection = null) { @@ -1691,7 +1691,7 @@ public function freshTimestampString() /** * Get a new query builder for the model's table. * - * @return \Illuminate\Database\Eloquent\Builder|static + * @return \Illuminate\Database\Eloquent\Builder */ public function newQuery() { @@ -1750,7 +1750,7 @@ public function applyGlobalScopes($builder) * Remove all of the global scopes from an Eloquent builder. * * @param \Illuminate\Database\Eloquent\Builder $builder - * @return void + * @return \Illuminate\Database\Eloquent\Builder */ public function removeGlobalScopes($builder) {
false
Other
laravel
framework
359747b019fede505c0f19e9b9bcfc161c10e090.json
Remove unused namespace
tests/Cache/CacheRepositoryTest.php
@@ -1,7 +1,6 @@ <?php use Mockery as m; -use Illuminate\Cache\ArrayStore; class CacheRepositoryTest extends PHPUnit_Framework_TestCase {
false
Other
laravel
framework
16ec03e27a9505948a8a6e3bf82c1ba437b372f6.json
Update a few paths.
src/Illuminate/Foundation/Console/AppNameCommand.php
@@ -127,7 +127,7 @@ protected function coreIsReady() */ protected function getUserClassPath() { - return $this->laravel['path.src'].'/Core/User.php'; + return $this->laravel['path'].'/Core/User.php'; } /**
true
Other
laravel
framework
16ec03e27a9505948a8a6e3bf82c1ba437b372f6.json
Update a few paths.
src/Illuminate/Foundation/Console/ProviderMakeCommand.php
@@ -84,7 +84,7 @@ protected function buildProviderClass($name) */ protected function getPath($name) { - return $this->laravel['path.src'].'/Providers/'.$name.'.php'; + return $this->laravel['path.providers'].'/'.$name.'.php'; } /**
true
Other
laravel
framework
4520fc698d7f21364188875490e1ff176694bd0d.json
Update a few path references.
src/Illuminate/Foundation/Application.php
@@ -1005,7 +1005,7 @@ public function fatal(Closure $callback) */ public function getConfigLoader() { - return new FileLoader(new Filesystem, $this['path'].'/config'); + return new FileLoader(new Filesystem, $this['path.config']); } /**
true
Other
laravel
framework
4520fc698d7f21364188875490e1ff176694bd0d.json
Update a few path references.
src/Illuminate/Foundation/Console/AppNameCommand.php
@@ -147,7 +147,7 @@ protected function getComposerPath() */ protected function getAuthConfigPath() { - return $this->laravel['path'].'/config/auth.php'; + return $this->laravel['path.config'].'/auth.php'; } /**
true
Other
laravel
framework
4520fc698d7f21364188875490e1ff176694bd0d.json
Update a few path references.
src/Illuminate/Foundation/Providers/PublisherServiceProvider.php
@@ -88,7 +88,7 @@ protected function registerConfigPublisher() $this->app->bindShared('config.publisher', function($app) { - $path = $app['path'].'/config'; + $path = $app['path.config']; // Once we have created the configuration publisher, we will set the default // package path on the object so that it knows where to find the packages
true
Other
laravel
framework
4520fc698d7f21364188875490e1ff176694bd0d.json
Update a few path references.
src/Illuminate/Translation/TranslationServiceProvider.php
@@ -46,7 +46,7 @@ protected function registerLoader() { $this->app->bindShared('translation.loader', function($app) { - return new FileLoader($app['files'], $app['path'].'/lang'); + return new FileLoader($app['files'], $app['path.lang']); }); }
true
Other
laravel
framework
bd2533d93595edefc2b6e9afed23cef83f062b14.json
Replace 4 spaces with tabs
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -4,187 +4,187 @@ trait ApplicationTrait { - /** - * The Illuminate application instance. - * - * @var \Illuminate\Foundation\Application - */ - protected $app; - - /** - * The HttpKernel client instance. - * - * @var \Illuminate\Foundation\Testing\Client - */ - protected $client; - - /** - * Refresh the application instance. - * - * @return void - */ - protected function refreshApplication() - { - $this->app = $this->createApplication(); - - $this->client = $this->createClient(); - - $this->app->setRequestForConsoleEnvironment(); - - $this->app->boot(); - } - - /** - * Call the given URI and return the Response. - * - * @param string $method - * @param string $uri - * @param array $parameters - * @param array $files - * @param array $server - * @param string $content - * @param bool $changeHistory - * @return \Illuminate\Http\Response - */ - public function call($method, $uri, $parameters = [], $files = [], $server = [], $content = null, $changeHistory = true) - { - $this->client->request($method, $uri, $parameters, $files, $server, $content, $changeHistory); - - return $this->client->getResponse(); - } - - /** - * Call the given HTTPS URI and return the Response. - * - * @param string $method - * @param string $uri - * @param array $parameters - * @param array $files - * @param array $server - * @param string $content - * @param bool $changeHistory - * @return \Illuminate\Http\Response - */ - public function callSecure($method, $uri, $parameters = [], $files = [], $server = [], $content = null, $changeHistory = true) - { - $uri = 'https://localhost/'.ltrim($uri, '/'); - - return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); - } - - /** - * Call a controller action and return the Response. - * - * @param string $method - * @param string $action - * @param array $wildcards - * @param array $parameters - * @param array $files - * @param array $server - * @param string $content - * @param bool $changeHistory - * @return \Illuminate\Http\Response - */ - public function action($method, $action, $wildcards = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) - { - $uri = $this->app['url']->action($action, $wildcards, true); - - return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); - } - - /** - * Call a named route and return the Response. - * - * @param string $method - * @param string $name - * @param array $routeParameters - * @param array $parameters - * @param array $files - * @param array $server - * @param string $content - * @param bool $changeHistory - * @return \Illuminate\Http\Response - */ - public function route($method, $name, $routeParameters = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) - { - $uri = $this->app['url']->route($name, $routeParameters); - - return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); - } - - /** - * Set the session to the given array. - * - * @param array $data - * @return void - */ - public function session(array $data) - { - $this->startSession(); - - foreach ($data as $key => $value) - { - $this->app['session']->put($key, $value); - } - } - - /** - * Flush all of the current session data. - * - * @return void - */ - public function flushSession() - { - $this->startSession(); - - $this->app['session']->flush(); - } - - /** - * Start the session for the application. - * - * @return void - */ - protected function startSession() - { - if ( ! $this->app['session']->isStarted()) - { - $this->app['session']->start(); - } - } - - /** - * Set the currently logged in user for the application. - * - * @param \Illuminate\Auth\UserInterface $user - * @param string $driver - * @return void - */ - public function be(UserInterface $user, $driver = null) - { - $this->app['auth']->driver($driver)->setUser($user); - } - - /** - * Seed a given database connection. - * - * @param string $class - * @return void - */ - public function seed($class = 'DatabaseSeeder') - { - $this->app['artisan']->call('db:seed', array('--class' => $class)); - } - - /** - * Create a new HttpKernel client instance. - * - * @param array $server - * @return \Symfony\Component\HttpKernel\Client - */ - protected function createClient(array $server = array()) - { - return new Client($this->app, $server); - } + /** + * The Illuminate application instance. + * + * @var \Illuminate\Foundation\Application + */ + protected $app; + + /** + * The HttpKernel client instance. + * + * @var \Illuminate\Foundation\Testing\Client + */ + protected $client; + + /** + * Refresh the application instance. + * + * @return void + */ + protected function refreshApplication() + { + $this->app = $this->createApplication(); + + $this->client = $this->createClient(); + + $this->app->setRequestForConsoleEnvironment(); + + $this->app->boot(); + } + + /** + * Call the given URI and return the Response. + * + * @param string $method + * @param string $uri + * @param array $parameters + * @param array $files + * @param array $server + * @param string $content + * @param bool $changeHistory + * @return \Illuminate\Http\Response + */ + public function call($method, $uri, $parameters = [], $files = [], $server = [], $content = null, $changeHistory = true) + { + $this->client->request($method, $uri, $parameters, $files, $server, $content, $changeHistory); + + return $this->client->getResponse(); + } + + /** + * Call the given HTTPS URI and return the Response. + * + * @param string $method + * @param string $uri + * @param array $parameters + * @param array $files + * @param array $server + * @param string $content + * @param bool $changeHistory + * @return \Illuminate\Http\Response + */ + public function callSecure($method, $uri, $parameters = [], $files = [], $server = [], $content = null, $changeHistory = true) + { + $uri = 'https://localhost/'.ltrim($uri, '/'); + + return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); + } + + /** + * Call a controller action and return the Response. + * + * @param string $method + * @param string $action + * @param array $wildcards + * @param array $parameters + * @param array $files + * @param array $server + * @param string $content + * @param bool $changeHistory + * @return \Illuminate\Http\Response + */ + public function action($method, $action, $wildcards = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) + { + $uri = $this->app['url']->action($action, $wildcards, true); + + return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); + } + + /** + * Call a named route and return the Response. + * + * @param string $method + * @param string $name + * @param array $routeParameters + * @param array $parameters + * @param array $files + * @param array $server + * @param string $content + * @param bool $changeHistory + * @return \Illuminate\Http\Response + */ + public function route($method, $name, $routeParameters = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) + { + $uri = $this->app['url']->route($name, $routeParameters); + + return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); + } + + /** + * Set the session to the given array. + * + * @param array $data + * @return void + */ + public function session(array $data) + { + $this->startSession(); + + foreach ($data as $key => $value) + { + $this->app['session']->put($key, $value); + } + } + + /** + * Flush all of the current session data. + * + * @return void + */ + public function flushSession() + { + $this->startSession(); + + $this->app['session']->flush(); + } + + /** + * Start the session for the application. + * + * @return void + */ + protected function startSession() + { + if ( ! $this->app['session']->isStarted()) + { + $this->app['session']->start(); + } + } + + /** + * Set the currently logged in user for the application. + * + * @param \Illuminate\Auth\UserInterface $user + * @param string $driver + * @return void + */ + public function be(UserInterface $user, $driver = null) + { + $this->app['auth']->driver($driver)->setUser($user); + } + + /** + * Seed a given database connection. + * + * @param string $class + * @return void + */ + public function seed($class = 'DatabaseSeeder') + { + $this->app['artisan']->call('db:seed', array('--class' => $class)); + } + + /** + * Create a new HttpKernel client instance. + * + * @param array $server + * @return \Symfony\Component\HttpKernel\Client + */ + protected function createClient(array $server = array()) + { + return new Client($this->app, $server); + } }
true
Other
laravel
framework
bd2533d93595edefc2b6e9afed23cef83f062b14.json
Replace 4 spaces with tabs
src/Illuminate/Foundation/Testing/AssertionsTrait.php
@@ -4,220 +4,220 @@ trait AssertionsTrait { - /** - * Assert that the client response has an OK status code. - * - * @return void - */ - public function assertResponseOk() - { - $response = $this->client->getResponse(); - - $actual = $response->getStatusCode(); - - return $this->assertTrue($response->isOk(), 'Expected status code 200, got ' .$actual); - } - - /** - * Assert that the client response has a given code. - * - * @param int $code - * @return void - */ - public function assertResponseStatus($code) - { - return $this->assertEquals($code, $this->client->getResponse()->getStatusCode()); - } - - /** - * Assert that the response view has a given piece of bound data. - * - * @param string|array $key - * @param mixed $value - * @return void - */ - public function assertViewHas($key, $value = null) - { - if (is_array($key)) return $this->assertViewHasAll($key); - - $response = $this->client->getResponse(); - - if ( ! isset($response->original) || ! $response->original instanceof View) - { - return $this->assertTrue(false, 'The response was not a view.'); - } - - if (is_null($value)) - { - $this->assertArrayHasKey($key, $response->original->getData()); - } - else - { - $this->assertEquals($value, $response->original->$key); - } - } - - /** - * Assert that the view has a given list of bound data. - * - * @param array $bindings - * @return void - */ - public function assertViewHasAll(array $bindings) - { - foreach ($bindings as $key => $value) - { - if (is_int($key)) - { - $this->assertViewHas($value); - } - else - { - $this->assertViewHas($key, $value); - } - } - } - - /** - * Assert that the response view is missing a piece of bound data. - * - * @param string $key - * @return void - */ - public function assertViewMissing($key) - { - $response = $this->client->getResponse(); - - if ( ! isset($response->original) || ! $response->original instanceof View) - { - return $this->assertTrue(false, 'The response was not a view.'); - } - - $this->assertArrayNotHasKey($key, $response->original->getData()); - } - - /** - * Assert whether the client was redirected to a given URI. - * - * @param string $uri - * @param array $with - * @return void - */ - public function assertRedirectedTo($uri, $with = array()) - { - $response = $this->client->getResponse(); - - $this->assertInstanceOf('Illuminate\Http\RedirectResponse', $response); - - $this->assertEquals($this->app['url']->to($uri), $response->headers->get('Location')); - - $this->assertSessionHasAll($with); - } - - /** - * Assert whether the client was redirected to a given route. - * - * @param string $name - * @param array $parameters - * @param array $with - * @return void - */ - public function assertRedirectedToRoute($name, $parameters = array(), $with = array()) - { - $this->assertRedirectedTo($this->app['url']->route($name, $parameters), $with); - } - - /** - * Assert whether the client was redirected to a given action. - * - * @param string $name - * @param array $parameters - * @param array $with - * @return void - */ - public function assertRedirectedToAction($name, $parameters = array(), $with = array()) - { - $this->assertRedirectedTo($this->app['url']->action($name, $parameters), $with); - } - - /** - * Assert that the session has a given list of values. - * - * @param string|array $key - * @param mixed $value - * @return void - */ - public function assertSessionHas($key, $value = null) - { - if (is_array($key)) return $this->assertSessionHasAll($key); - - if (is_null($value)) - { - $this->assertTrue($this->app['session.store']->has($key), "Session missing key: $key"); - } - else - { - $this->assertEquals($value, $this->app['session.store']->get($key)); - } - } - - /** - * Assert that the session has a given list of values. - * - * @param array $bindings - * @return void - */ - public function assertSessionHasAll(array $bindings) - { - foreach ($bindings as $key => $value) - { - if (is_int($key)) - { - $this->assertSessionHas($value); - } - else - { - $this->assertSessionHas($key, $value); - } - } - } - - /** - * Assert that the session has errors bound. - * - * @param string|array $bindings - * @param mixed $format - * @return void - */ - public function assertSessionHasErrors($bindings = array(), $format = null) - { - $this->assertSessionHas('errors'); - - $bindings = (array) $bindings; - - $errors = $this->app['session.store']->get('errors'); - - foreach ($bindings as $key => $value) - { - if (is_int($key)) - { - $this->assertTrue($errors->has($value), "Session missing error: $value"); - } - else - { - $this->assertContains($value, $errors->get($key, $format)); - } - } - } - - /** - * Assert that the session has old input. - * - * @return void - */ - public function assertHasOldInput() - { - $this->assertSessionHas('_old_input'); - } + /** + * Assert that the client response has an OK status code. + * + * @return void + */ + public function assertResponseOk() + { + $response = $this->client->getResponse(); + + $actual = $response->getStatusCode(); + + return $this->assertTrue($response->isOk(), 'Expected status code 200, got ' .$actual); + } + + /** + * Assert that the client response has a given code. + * + * @param int $code + * @return void + */ + public function assertResponseStatus($code) + { + return $this->assertEquals($code, $this->client->getResponse()->getStatusCode()); + } + + /** + * Assert that the response view has a given piece of bound data. + * + * @param string|array $key + * @param mixed $value + * @return void + */ + public function assertViewHas($key, $value = null) + { + if (is_array($key)) return $this->assertViewHasAll($key); + + $response = $this->client->getResponse(); + + if ( ! isset($response->original) || ! $response->original instanceof View) + { + return $this->assertTrue(false, 'The response was not a view.'); + } + + if (is_null($value)) + { + $this->assertArrayHasKey($key, $response->original->getData()); + } + else + { + $this->assertEquals($value, $response->original->$key); + } + } + + /** + * Assert that the view has a given list of bound data. + * + * @param array $bindings + * @return void + */ + public function assertViewHasAll(array $bindings) + { + foreach ($bindings as $key => $value) + { + if (is_int($key)) + { + $this->assertViewHas($value); + } + else + { + $this->assertViewHas($key, $value); + } + } + } + + /** + * Assert that the response view is missing a piece of bound data. + * + * @param string $key + * @return void + */ + public function assertViewMissing($key) + { + $response = $this->client->getResponse(); + + if ( ! isset($response->original) || ! $response->original instanceof View) + { + return $this->assertTrue(false, 'The response was not a view.'); + } + + $this->assertArrayNotHasKey($key, $response->original->getData()); + } + + /** + * Assert whether the client was redirected to a given URI. + * + * @param string $uri + * @param array $with + * @return void + */ + public function assertRedirectedTo($uri, $with = array()) + { + $response = $this->client->getResponse(); + + $this->assertInstanceOf('Illuminate\Http\RedirectResponse', $response); + + $this->assertEquals($this->app['url']->to($uri), $response->headers->get('Location')); + + $this->assertSessionHasAll($with); + } + + /** + * Assert whether the client was redirected to a given route. + * + * @param string $name + * @param array $parameters + * @param array $with + * @return void + */ + public function assertRedirectedToRoute($name, $parameters = array(), $with = array()) + { + $this->assertRedirectedTo($this->app['url']->route($name, $parameters), $with); + } + + /** + * Assert whether the client was redirected to a given action. + * + * @param string $name + * @param array $parameters + * @param array $with + * @return void + */ + public function assertRedirectedToAction($name, $parameters = array(), $with = array()) + { + $this->assertRedirectedTo($this->app['url']->action($name, $parameters), $with); + } + + /** + * Assert that the session has a given list of values. + * + * @param string|array $key + * @param mixed $value + * @return void + */ + public function assertSessionHas($key, $value = null) + { + if (is_array($key)) return $this->assertSessionHasAll($key); + + if (is_null($value)) + { + $this->assertTrue($this->app['session.store']->has($key), "Session missing key: $key"); + } + else + { + $this->assertEquals($value, $this->app['session.store']->get($key)); + } + } + + /** + * Assert that the session has a given list of values. + * + * @param array $bindings + * @return void + */ + public function assertSessionHasAll(array $bindings) + { + foreach ($bindings as $key => $value) + { + if (is_int($key)) + { + $this->assertSessionHas($value); + } + else + { + $this->assertSessionHas($key, $value); + } + } + } + + /** + * Assert that the session has errors bound. + * + * @param string|array $bindings + * @param mixed $format + * @return void + */ + public function assertSessionHasErrors($bindings = array(), $format = null) + { + $this->assertSessionHas('errors'); + + $bindings = (array) $bindings; + + $errors = $this->app['session.store']->get('errors'); + + foreach ($bindings as $key => $value) + { + if (is_int($key)) + { + $this->assertTrue($errors->has($value), "Session missing error: $value"); + } + else + { + $this->assertContains($value, $errors->get($key, $format)); + } + } + } + + /** + * Assert that the session has old input. + * + * @return void + */ + public function assertHasOldInput() + { + $this->assertSessionHas('_old_input'); + } }
true
Other
laravel
framework
bd2533d93595edefc2b6e9afed23cef83f062b14.json
Replace 4 spaces with tabs
src/Illuminate/Queue/Capsule/Manager.php
@@ -7,228 +7,228 @@ class Manager { - /** - * The current globally used instance. - * - * @var \Illuminate\Queue\Capsule\Manager - */ - protected static $instance; - - /** - * The queue manager instance. - * - * @var \Illuminate\Queue\QueueManager - */ - protected $manager; - - /** - * Create a new queue capsule manager. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - public function __construct(Container $container = null) - { - $this->setupContainer($container); - - // Once we have the container setup, we will setup the default configuration - // options in the container "config" bindings. This just makes this queue - // manager behave correctly since all the correct binding are in place. - $this->setupDefaultConfiguration(); - - $this->setupManager(); - - $this->registerConnectors(); - } - - /** - * Setup the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - protected function setupContainer($container) - { - $this->container = $container ?: new Container; - - if ( ! $this->container->bound('config')) - { - $this->container->instance('config', new Fluent); - } - } - - /** - * Setup the default queue configuration options. - * - * @return void - */ - protected function setupDefaultConfiguration() - { - $this->container['config']['queue.default'] = 'default'; - } - - /** - * Build the queue manager instance. - * - * @return void - */ - protected function setupManager() - { - $this->manager = new QueueManager($this->container); - } - - /** - * Register the default connectors that the component ships with. - * - * @return void - */ - protected function registerConnectors() - { - $provider = new QueueServiceProvider($this->container); - - $provider->registerConnectors($this->manager); - } - - /** - * Get a connection instance from the global manager. - * - * @param string $connection - * @return \Illuminate\Queue\QueueInterface - */ - public static function connection($connection = null) - { - return static::$instance->getConnection($connection); - } - - /** - * Push a new job onto the queue. - * - * @param string $job - * @param mixed $data - * @param string $queue - * @param string $connection - * @return mixed - */ - public static function push($job, $data = '', $queue = null, $connection = null) - { - return static::$instance->connection($connection)->push($job, $data, $queue); - } - - /** - * Push a new an array of jobs onto the queue. - * - * @param array $jobs - * @param mixed $data - * @param string $queue - * @param string $connection - * @return mixed - */ - public static function bulk($jobs, $data = '', $queue = null, $connection = null) - { - return static::$instance->connection($connection)->bulk($jobs, $data, $queue); - } - - /** - * Push a new job onto the queue after a delay. - * - * @param \DateTime|int $delay - * @param string $job - * @param mixed $data - * @param string $queue - * @param string $connection - * @return mixed - */ - public static function later($delay, $job, $data = '', $queue = null, $connection = null) - { - return static::$instance->connection($connection)->later($delay, $job, $data, $queue); - } - - /** - * Get a registered connection instance. - * - * @param string $name - * @return \Illuminate\Queue\QueueInterface - */ - public function getConnection($name = null) - { - return $this->manager->connection($name); - } - - /** - * Register a connection with the manager. - * - * @param array $config - * @param string $name - * @return void - */ - public function addConnection(array $config, $name = 'default') - { - $this->container['config']["queue.connections.{$name}"] = $config; - } - - /** - * Make this capsule instance available globally. - * - * @return void - */ - public function setAsGlobal() - { - static::$instance = $this; - } - - /** - * Get the queue manager instance. - * - * @return \Illuminate\Queue\Manager - */ - public function getQueueManager() - { - return $this->manager; - } - - /** - * Get the IoC container instance. - * - * @return \Illuminate\Container\Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * Set the IoC container instance. - * - * @param \Illuminate\Container\Container $container - * @return void - */ - public function setContainer(Container $container) - { - $this->container = $container; - } - - /** - * Pass dynamic instance methods to the manager. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return call_user_func_array(array($this->manager, $method), $parameters); - } - - /** - * Dynamically pass methods to the default connection. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public static function __callStatic($method, $parameters) - { - return call_user_func_array(array(static::connection(), $method), $parameters); - } + /** + * The current globally used instance. + * + * @var \Illuminate\Queue\Capsule\Manager + */ + protected static $instance; + + /** + * The queue manager instance. + * + * @var \Illuminate\Queue\QueueManager + */ + protected $manager; + + /** + * Create a new queue capsule manager. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function __construct(Container $container = null) + { + $this->setupContainer($container); + + // Once we have the container setup, we will setup the default configuration + // options in the container "config" bindings. This just makes this queue + // manager behave correctly since all the correct binding are in place. + $this->setupDefaultConfiguration(); + + $this->setupManager(); + + $this->registerConnectors(); + } + + /** + * Setup the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + protected function setupContainer($container) + { + $this->container = $container ?: new Container; + + if ( ! $this->container->bound('config')) + { + $this->container->instance('config', new Fluent); + } + } + + /** + * Setup the default queue configuration options. + * + * @return void + */ + protected function setupDefaultConfiguration() + { + $this->container['config']['queue.default'] = 'default'; + } + + /** + * Build the queue manager instance. + * + * @return void + */ + protected function setupManager() + { + $this->manager = new QueueManager($this->container); + } + + /** + * Register the default connectors that the component ships with. + * + * @return void + */ + protected function registerConnectors() + { + $provider = new QueueServiceProvider($this->container); + + $provider->registerConnectors($this->manager); + } + + /** + * Get a connection instance from the global manager. + * + * @param string $connection + * @return \Illuminate\Queue\QueueInterface + */ + public static function connection($connection = null) + { + return static::$instance->getConnection($connection); + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function push($job, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->push($job, $data, $queue); + } + + /** + * Push a new an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function bulk($jobs, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->bulk($jobs, $data, $queue); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param \DateTime|int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @param string $connection + * @return mixed + */ + public static function later($delay, $job, $data = '', $queue = null, $connection = null) + { + return static::$instance->connection($connection)->later($delay, $job, $data, $queue); + } + + /** + * Get a registered connection instance. + * + * @param string $name + * @return \Illuminate\Queue\QueueInterface + */ + public function getConnection($name = null) + { + return $this->manager->connection($name); + } + + /** + * Register a connection with the manager. + * + * @param array $config + * @param string $name + * @return void + */ + public function addConnection(array $config, $name = 'default') + { + $this->container['config']["queue.connections.{$name}"] = $config; + } + + /** + * Make this capsule instance available globally. + * + * @return void + */ + public function setAsGlobal() + { + static::$instance = $this; + } + + /** + * Get the queue manager instance. + * + * @return \Illuminate\Queue\Manager + */ + public function getQueueManager() + { + return $this->manager; + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + + /** + * Pass dynamic instance methods to the manager. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return call_user_func_array(array($this->manager, $method), $parameters); + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + return call_user_func_array(array(static::connection(), $method), $parameters); + } }
true
Other
laravel
framework
e9a82e9dbacf7225386c0885f4727e311eb0e886.json
Remove duplicate check
src/Illuminate/Session/Store.php
@@ -304,8 +304,6 @@ public function getOldInput($key = null, $default = null) // Input that is flashed to the session can be easily retrieved by the // developer, making repopulating old forms and the like much more // convenient, since the request's previous input is available. - if (is_null($key)) return $input; - return array_get($input, $key, $default); }
false
Other
laravel
framework
c6dde96902deee084eb0f42927278efe4dd0e205.json
Remove useless full namespace
src/Illuminate/Foundation/Providers/SimpleStructureServiceProvider.php
@@ -2,7 +2,7 @@ use Illuminate\Support\ServiceProvider; -class SimpleStructureServiceProvider extends Illuminate\Support\ServiceProvider { +class SimpleStructureServiceProvider extends ServiceProvider { /** * Register the service provider.
false
Other
laravel
framework
e924a62e3f99081e869c0cc5a23d11d1228f9f12.json
Dump auto loads after making controller.
src/Illuminate/Routing/Console/ControllerMakeCommand.php
@@ -82,6 +82,8 @@ protected function generateController() $this->generator->make($controller, $path, $options); $this->info('Controller created successfully.'); + + $this->call('dump-autoload'); } /**
false
Other
laravel
framework
8501a9e89e6a864d6a2a20ff6778d3cdcd51d340.json
Call dump autoload when appropriate.
src/Illuminate/Foundation/Console/RequestMakeCommand.php
@@ -59,6 +59,8 @@ public function fire() ); $this->info('Request created successfully.'); + + $this->call('dump-autoload'); } /**
true
Other
laravel
framework
8501a9e89e6a864d6a2a20ff6778d3cdcd51d340.json
Call dump autoload when appropriate.
src/Illuminate/Routing/Console/FilterMakeCommand.php
@@ -59,6 +59,8 @@ public function fire() ); $this->info('Filter created successfully.'); + + $this->call('dump-autoload'); } /**
true
Other
laravel
framework
f561a681129cfabb8f46cde09d5ea2a0e0258334.json
Fix syntax error.
src/Illuminate/Foundation/Providers/EventServiceProvider.php
@@ -21,7 +21,7 @@ public function boot() { $this->app['config']->set('app.events.scan', $this->scan()); - if ($this->app->eventsAreCached())) + if ($this->app->eventsAreCached()) { require $this->app->getEventCachePath(); }
false
Other
laravel
framework
1302781959ae78229c4f402c21fbd6bd327c8121.json
Fix syntax error.
src/Illuminate/Foundation/EventCache.php
@@ -18,7 +18,7 @@ class EventCache { * * @var string */ - protected $stub = "$events->listen('{{event}}', '{{handler}}');"; + protected $stub = '$events->listen(\'{{event}}\', \'{{handler}}\');'; /** * Create a new event cache instance.
false
Other
laravel
framework
04f7ccd4b796cafd06a8bd9f4db756324f55aff4.json
Add ClassFinder class.
src/Illuminate/Filesystem/ClassFinder.php
@@ -0,0 +1,157 @@ +<?php namespace Illuminate\Filesystem; + +use Symfony\Component\Finder\Finder; + +class ClassFinder { + + /** + * Find all the class and interface names in a given directory. + * + * @param string $directory + * @return array + */ + public function findClasses($directory) + { + $classes = []; + + foreach (Finder::create()->in($directory)->name('*.php') as $file) + { + $classes[] = $this->findClass($file->getRealPath()); + } + + return array_filter($classes); + } + + /** + * Extract the class name from the file at the given path. + * + * @param string $path + * @return string|null + */ + public function findClass($path) + { + $namespace = null; + + $tokens = token_get_all(file_get_contents($path)); + + foreach ($tokens as $key => $token) + { + if ($this->tokenIsNamespace($token)) + { + $namespace = $this->getNamespace($key + 2, $tokens); + } + elseif ($this->tokenIsClassOrInterface($token)) + { + return ltrim($namespace.'\\'.$this->getClass($key + 2, $tokens), '\\'); + } + } + } + + /** + * Find the namespace in the tokens starting at a given key. + * + * @param int $key + * @param array $tokens + * @return string + */ + protected function getNamespace($key, array $tokens) + { + $namespace = null; + + $tokenCount = count($tokens); + + for ($i = $key; $i < $tokenCount; $i++) + { + if ($this->isPartOfNamespace($tokens[$i])) + { + $namespace .= $tokens[$i][1]; + } + elseif ($tokens[$i] == ';') + { + return $namespace; + } + } + } + + /** + * Find the class in the tokens starting at a given key. + * + * @param int $key + * @param array $tokens + * @return string + */ + protected function getClass($key, array $tokens) + { + $class = null; + + $tokenCount = count($tokens); + + for ($i = $key; $i < $tokenCount; $i++) + { + if ($this->isPartOfClass($tokens[$i])) + { + $class .= $tokens[$i][1]; + } + elseif ($this->isWhitespace($tokens[$i])) + { + return $class; + } + } + } + + /** + * Determine if the given token is a namespace keyword. + * + * @param array|string $token + * @return bool + */ + protected function tokenIsNamespace($token) + { + return is_array($token) && $token[0] == T_NAMESPACE; + } + + /** + * Determine if the given token is a class or interface keyword. + * + * @param array|string $token + * @return bool + */ + protected function tokenIsClassOrInterface($token) + { + return is_array($token) && ($token[0] == T_CLASS || $token[0] == T_INTERFACE); + } + + /** + * Determine if the given token is part of the namespace. + * + * @param array|string $token + * @return bool + */ + protected function isPartOfNamespace($token) + { + return is_array($token) && ($token[0] == T_STRING || $token[0] == T_NS_SEPARATOR); + } + + /** + * Determine if the given token is part of the class. + * + * @param array|string $token + * @return bool + */ + protected function isPartOfClass($token) + { + return is_array($token) && $token[0] == T_STRING; + } + + /** + * Determine if the given token is whitespace. + * + * @param array|string $token + * @return bool + */ + protected function isWhitespace($token) + { + return is_array($token) && $token[0] == T_WHITESPACE; + } + +} \ No newline at end of file
false
Other
laravel
framework
9b9d1eda4a287c59eba6a3f4ac5585966702a795.json
Add method hasBag to ViewErrorBag When redirecting withErrors($validator) the edit form can show individual messages. But to show a generic message, something like: please check the red marked field below I don't know anything else but to flash a extra variable. This method would remedy that. Now I could check: $errors->hasBag() to see if the form is a redirect from a post with a errors message bag or a first get for input.
src/Illuminate/Support/ViewErrorBag.php
@@ -10,6 +10,17 @@ class ViewErrorBag implements Countable { * @var array */ protected $bags = []; + + /** + * Checks if a MessageBag exists. + * + * @param string $key + * @return boolean + */ + public function hasBag($key = "default") + { + return isset($this->bags[$key]); + } /** * Get a MessageBag instance from the bags.
false
Other
laravel
framework
36a53758c05494ff8375965bd4610b346d14d7e4.json
Remove periods for consistency.
src/Illuminate/Auth/Console/ClearRemindersCommand.php
@@ -16,7 +16,7 @@ class ClearRemindersCommand extends Command { * * @var string */ - protected $description = 'Flush expired reminders.'; + protected $description = 'Flush expired password reminders'; /** * Execute the console command.
true
Other
laravel
framework
36a53758c05494ff8375965bd4610b346d14d7e4.json
Remove periods for consistency.
src/Illuminate/Foundation/Console/RequestMakeCommand.php
@@ -18,7 +18,7 @@ class RequestMakeCommand extends Command { * * @var string */ - protected $description = 'Create a new form request class.'; + protected $description = 'Create a new form request class'; /** * The filesystem instance.
true
Other
laravel
framework
36a53758c05494ff8375965bd4610b346d14d7e4.json
Remove periods for consistency.
src/Illuminate/Foundation/Console/RouteCacheCommand.php
@@ -20,7 +20,7 @@ class RouteCacheCommand extends Command { * * @var string */ - protected $description = 'Create a route cache file for faster route registration.'; + protected $description = 'Create a route cache file for faster route registration'; /** * The filesystem instance.
true
Other
laravel
framework
36a53758c05494ff8375965bd4610b346d14d7e4.json
Remove periods for consistency.
src/Illuminate/Foundation/Console/RouteClearCommand.php
@@ -20,7 +20,7 @@ class RouteClearCommand extends Command { * * @var string */ - protected $description = 'Remove the route cache file.'; + protected $description = 'Remove the route cache file'; /** * The filesystem instance.
true
Other
laravel
framework
36a53758c05494ff8375965bd4610b346d14d7e4.json
Remove periods for consistency.
src/Illuminate/Routing/Console/FilterMakeCommand.php
@@ -18,7 +18,7 @@ class FilterMakeCommand extends Command { * * @var string */ - protected $description = 'Create a new route filter class.'; + protected $description = 'Create a new route filter class'; /** * The filesystem instance.
true
Other
laravel
framework
0cc6edf84a5e5a067bcdbac841ec7034452a72c6.json
Add filter stub.
src/Illuminate/Routing/Console/FilterMakeCommand.php
@@ -69,7 +69,7 @@ public function fire() */ protected function buildFilterClass($name) { - $stub = $this->files->get(__DIR__.'/stubs/filter.stub'); + $stub = $this->files->get(__DIR__.'/../Generators/stubs/filter.stub'); return str_replace('{{class}}', $name, $stub); }
true
Other
laravel
framework
0cc6edf84a5e5a067bcdbac841ec7034452a72c6.json
Add filter stub.
src/Illuminate/Routing/Generators/stubs/filter.stub
@@ -0,0 +1,18 @@ +<?php + +use Illuminate\Http\Request; + +class {{class}} { + + /** + * Run the request filter. + * + * @param \Illuminate\Http\Request $request + * @return mixed + */ + public function filter(Request $request) + { + // + } + +} \ No newline at end of file
true
Other
laravel
framework
397f8275e28e0099681f5847c2a3c857584efdd9.json
Move service providers to more logical spots.
src/Illuminate/Foundation/Console/Optimize/config.php
@@ -29,8 +29,8 @@ $basePath.'/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php', $basePath.'/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php', $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php', - $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FilterServiceProvider.php', - $basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/RouteServiceProvider.php', + $basePath.'/vendor/laravel/framework/src/Illuminate/Routing/FilterServiceProvider.php', + $basePath.'/vendor/laravel/framework/src/Illuminate/Routing/RouteServiceProvider.php', $basePath.'/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php', $basePath.'/vendor/laravel/framework/src/Illuminate/Support/Traits/MacroableTrait.php', $basePath.'/vendor/laravel/framework/src/Illuminate/Support/Arr.php',
true
Other
laravel
framework
397f8275e28e0099681f5847c2a3c857584efdd9.json
Move service providers to more logical spots.
src/Illuminate/Routing/FilterServiceProvider.php
@@ -1,4 +1,4 @@ -<?php namespace Illuminate\Foundation\Providers; +<?php namespace Illuminate\Routing; use Illuminate\Support\ServiceProvider;
true
Other
laravel
framework
397f8275e28e0099681f5847c2a3c857584efdd9.json
Move service providers to more logical spots.
src/Illuminate/Routing/RouteServiceProvider.php
@@ -1,4 +1,4 @@ -<?php namespace Illuminate\Foundation\Providers; +<?php namespace Illuminate\Routing; use Illuminate\Support\ServiceProvider;
true
Other
laravel
framework
69219d3be44391bab7fc2e707a886e7ec849e418.json
Use generator paths.
src/Illuminate/Foundation/Console/CommandMakeCommand.php
@@ -121,7 +121,7 @@ protected function getPath() if (is_null($path)) { - return $this->laravel['path'].'/src/Console'; + return $this->laravel['path.commands']; } else {
true
Other
laravel
framework
69219d3be44391bab7fc2e707a886e7ec849e418.json
Use generator paths.
src/Illuminate/Foundation/Console/RequestMakeCommand.php
@@ -82,7 +82,7 @@ protected function buildRequestClass($name) */ protected function getPath($name) { - return $this->laravel['path'].'/src/Web/Requests/'.$name.'.php'; + return $this->laravel['path.requests'].'/'.$name.'.php'; } /**
true
Other
laravel
framework
69219d3be44391bab7fc2e707a886e7ec849e418.json
Use generator paths.
src/Illuminate/Routing/ControllerServiceProvider.php
@@ -37,11 +37,11 @@ protected function registerGenerator() // The controller generator is responsible for building resourceful controllers // quickly and easily for the developers via the Artisan CLI. We'll go ahead // and register this command instances in this container for registration. - $path = $app['path'].'/src/Web/Controllers'; - $generator = new ControllerGenerator($app['files']); - return new MakeControllerCommand($generator, $path); + return new MakeControllerCommand( + $generator, $app['path.controllers'] + ); }); }
true
Other
laravel
framework
e395ff353aee82e5e8d8a5dfb723d1ebb52efa45.json
Use app function in routes cache stub.
src/Illuminate/Foundation/Console/stubs/routes.stub
@@ -11,6 +11,6 @@ | */ -$app->make('router')->setRoutes( +app('router')->setRoutes( unserialize(base64_decode('{{routes}}')) );
false
Other
laravel
framework
dda4c05b2c5527a4b8ca9a460fec20fc0a264cf7.json
Fix route cache path.
src/Illuminate/Foundation/Application.php
@@ -738,7 +738,7 @@ public function routesAreCached() */ public function getRouteCachePath() { - return $this['path'].'/routing/cache.php'; + return $this['path.storage'].'/meta/routes.php'; } /**
true
Other
laravel
framework
dda4c05b2c5527a4b8ca9a460fec20fc0a264cf7.json
Fix route cache path.
src/Illuminate/Foundation/Console/RouteClearCommand.php
@@ -49,7 +49,7 @@ public function __construct(Filesystem $files) */ public function fire() { - $this->files->delete($this->laravel['path'].'/routing/cache.php'); + $this->files->delete($this->laravel->getRouteCachePath()); $this->info('Route cache cleared!'); }
true
Other
laravel
framework
553e08bb46a0c7eabd28197aaba962774c646b65.json
Fix typo in HasOneOrMany
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -269,7 +269,7 @@ public function getPlainForeignKey() } /** - * Get the key value of the paren's local key. + * Get the key value of the parent's local key. * * @return mixed */
false
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Container/Container.php
@@ -200,7 +200,7 @@ public function singleton($abstract, $concrete = null) * Wrap a Closure such that it is shared. * * @param \Closure $closure - * @return Closure + * @return \Closure */ public function share(Closure $closure) {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Database/Connection.php
@@ -775,7 +775,7 @@ public function getDoctrineConnection() /** * Get the current PDO connection. * - * @return PDO + * @return \PDO */ public function getPdo() { @@ -785,7 +785,7 @@ public function getPdo() /** * Get the current PDO connection used for reading. * - * @return PDO + * @return \PDO */ public function getReadPdo() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Database/Connectors/Connector.php
@@ -36,7 +36,7 @@ public function getOptions(array $config) * @param string $dsn * @param array $config * @param array $options - * @return PDO + * @return \PDO */ public function createConnection($dsn, array $config, array $options) {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Database/Connectors/PostgresConnector.php
@@ -20,7 +20,7 @@ class PostgresConnector extends Connector implements ConnectorInterface { * Establish a database connection. * * @param array $config - * @return PDO + * @return \PDO */ public function connect(array $config) {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Database/Connectors/SqlServerConnector.php
@@ -20,7 +20,7 @@ class SqlServerConnector extends Connector implements ConnectorInterface { * Establish a database connection. * * @param array $config - * @return PDO + * @return \PDO */ public function connect(array $config) {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Exception/Handler.php
@@ -297,7 +297,7 @@ protected function handlesException(Closure $handler, $exception) /** * Determine if the given handler type hints the exception. * - * @param ReflectionFunction $reflection + * @param \ReflectionFunction $reflection * @param \Exception $exception * @return bool */
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Foundation/Application.php
@@ -482,7 +482,7 @@ public function bound($abstract) * (Overriding Container::extend) * * @param string $abstract - * @param Closure $closure + * @param \Closure $closure * @return void * * @throws \InvalidArgumentException
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Foundation/Console/RoutesCommand.php
@@ -176,7 +176,7 @@ protected function getMethodPatterns($uri, $method) /** * Get after filters * - * @param Route $route + * @param \Illuminate\Routing\Route $route * @return string */ protected function getAfterFilters($route)
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Pagination/Paginator.php
@@ -432,7 +432,7 @@ public function getFactory() /** * Get an iterator for the items. * - * @return ArrayIterator + * @return \ArrayIterator */ public function getIterator() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Queue/BeanstalkdQueue.php
@@ -9,7 +9,7 @@ class BeanstalkdQueue extends Queue implements QueueInterface { /** * The Pheanstalk instance. * - * @var Pheanstalk + * @var \Pheanstalk_Pheanstalk */ protected $pheanstalk; @@ -30,7 +30,7 @@ class BeanstalkdQueue extends Queue implements QueueInterface { /** * Create a new Beanstalkd queue instance. * - * @param Pheanstalk $pheanstalk + * @param \Pheanstalk_Pheanstalk $pheanstalk * @param string $default * @param int $timeToRun * @return void @@ -132,7 +132,7 @@ public function getQueue($queue) /** * Get the underlying Pheanstalk instance. * - * @return Pheanstalk + * @return \Pheanstalk_Pheanstalk */ public function getPheanstalk() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Queue/IronQueue.php
@@ -227,7 +227,7 @@ public function getQueue($queue) /** * Get the underlying IronMQ instance. * - * @return IronMQ + * @return \IronMQ */ public function getIron() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Queue/Jobs/BeanstalkdJob.php
@@ -9,14 +9,14 @@ class BeanstalkdJob extends Job { /** * The Pheanstalk instance. * - * @var Pheanstalk + * @var \Pheanstalk_Pheanstalk */ protected $pheanstalk; /** * The Pheanstalk job instance. * - * @var Pheanstalk_Job + * @var \Pheanstalk_Job */ protected $job; @@ -130,7 +130,7 @@ public function getContainer() /** * Get the underlying Pheanstalk instance. * - * @return Pheanstalk + * @return \Pheanstalk_Pheanstalk */ public function getPheanstalk() { @@ -140,7 +140,7 @@ public function getPheanstalk() /** * Get the underlying Pheanstalk job. * - * @return Pheanstalk_Job + * @return \Pheanstalk_Job */ public function getPheanstalkJob() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Routing/ControllerInspector.php
@@ -62,7 +62,7 @@ public function getRoutable($controller, $prefix) /** * Determine if the given controller method is routable. * - * @param ReflectionMethod $method + * @param \ReflectionMethod $method * @param string $controller * @return bool */ @@ -76,7 +76,7 @@ public function isRoutable(ReflectionMethod $method, $controller) /** * Get the method data for a given method. * - * @param ReflectionMethod $method + * @param \ReflectionMethod $method * @param string $prefix * @return array */
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Routing/RouteCollection.php
@@ -287,7 +287,7 @@ public function getRoutes() /** * Get an iterator for the items. * - * @return ArrayIterator + * @return \ArrayIterator */ public function getIterator() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/Support/Collection.php
@@ -723,7 +723,7 @@ public function toJson($options = 0) /** * Get an iterator for the items. * - * @return ArrayIterator + * @return \ArrayIterator */ public function getIterator() {
true
Other
laravel
framework
c75735eff4e1f0ac96ce8fd7dd46ef14415cf994.json
Use FQN in phpdocs
src/Illuminate/View/Factory.php
@@ -358,7 +358,7 @@ public function composer($views, $callback, $priority = null) * @param \Closure|string $callback * @param string $prefix * @param int|null $priority - * @return Closure + * @return \Closure */ protected function addViewEvent($view, $callback, $prefix = 'composing: ', $priority = null) {
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Cache/RedisStore.php
@@ -131,7 +131,7 @@ public function flush() /** * Begin executing a new tags operation. * - * @param array|dynamic $names + * @param array|mixed $names * @return \Illuminate\Cache\RedisTaggedCache */ public function tags($names)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Cache/TaggableStore.php
@@ -16,7 +16,7 @@ public function section($name) /** * Begin executing a new tags operation. * - * @param array|dynamic $names + * @param array|mixed $names * @return \Illuminate\Cache\TaggedCache */ public function tags($names)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Console/Application.php
@@ -137,7 +137,7 @@ public function resolve($command) /** * Resolve an array of commands through the application. * - * @param array|dynamic $commands + * @param array|mixed $commands * @return void */ public function resolveCommands($commands)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Cookie/CookieJar.php
@@ -101,7 +101,7 @@ public function queued($key, $default = null) /** * Queue a cookie to send with the next response. * - * @param dynamic + * @param mixed * @return void */ public function queue()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Database/Eloquent/Builder.php
@@ -711,7 +711,7 @@ protected function getHasRelationQuery($relation) /** * Set the relationships that should be eager loaded. * - * @param dynamic $relations + * @param mixed $relations * @return $this */ public function with($relations)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Database/Query/Builder.php
@@ -1262,7 +1262,7 @@ public function rememberForever($key = null) /** * Indicate that the results, if cached, should use the given cache tags. * - * @param array|dynamic $cacheTags + * @param array|mixed $cacheTags * @return $this */ public function cacheTags($cacheTags)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Foundation/Application.php
@@ -224,7 +224,7 @@ public function startExceptionHandling() /** * Get or check the current application environment. * - * @param dynamic + * @param mixed * @return string */ public function environment()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Http/RedirectResponse.php
@@ -100,7 +100,7 @@ public function onlyInput() /** * Flash an array of input to the session. * - * @param dynamic string + * @param mixed string * @return \Illuminate\Http\RedirectResponse */ public function exceptInput()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Http/Request.php
@@ -120,7 +120,7 @@ public function segments() /** * Determine if the current request URI matches a pattern. * - * @param dynamic string + * @param mixed string * @return bool */ public function is() @@ -383,7 +383,7 @@ public function flash($filter = null, $keys = array()) /** * Flash only some of the input to the session. * - * @param dynamic string + * @param mixed string * @return void */ public function flashOnly($keys) @@ -396,7 +396,7 @@ public function flashOnly($keys) /** * Flash only some of the input to the session. * - * @param dynamic string + * @param mixed string * @return void */ public function flashExcept($keys)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Log/Writer.php
@@ -248,7 +248,7 @@ protected function fireLogEvent($level, $message, array $context = array()) /** * Dynamically pass log calls into the writer. * - * @param dynamic (level, param, param) + * @param mixed (level, param, param) * @return mixed */ public function write()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Remote/RemoteManager.php
@@ -26,7 +26,7 @@ public function __construct($app) /** * Get a remote connection instance. * - * @param string|array|dynamic $name + * @param string|array|mixed $name * @return \Illuminate\Remote\ConnectionInterface */ public function into($name)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Routing/Router.php
@@ -1592,7 +1592,7 @@ public function currentRouteName() /** * Alias for the "currentRouteNamed" method. * - * @param dynamic string + * @param mixed string * @return bool */ public function is() @@ -1636,7 +1636,7 @@ public function currentRouteAction() /** * Alias for the "currentRouteUses" method. * - * @param dynamic string + * @param mixed string * @return bool */ public function uses()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Session/Store.php
@@ -392,7 +392,7 @@ public function reflash() /** * Reflash a subset of the current flash data. * - * @param array|dynamic $keys + * @param array|mixed $keys * @return void */ public function keep($keys = null)
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Support/Facades/Facade.php
@@ -34,7 +34,7 @@ public static function swap($instance) /** * Initiate a mock expectation on the facade. * - * @param dynamic + * @param mixed * @return \Mockery\Expectation */ public static function shouldReceive()
true
Other
laravel
framework
3c45bc8e19c15475f11e78bee69af2e92494f1a8.json
Replace 'dynamic' keyword with 'mixed' 'dynamic' is not a valid keyword, see http://phpdoc.org/docs/latest/guides/types.html#keywords
src/Illuminate/Support/helpers.php
@@ -492,7 +492,7 @@ function data_get($target, $key, $default = null) /** * Dump the passed variables and end the script. * - * @param dynamic mixed + * @param mixed * @return void */ function dd()
true
Other
laravel
framework
a427a4d8f093e016f7f73200b8b31542843fd059.json
Use tab characters instead of spaces
src/Illuminate/View/Factory.php
@@ -495,10 +495,10 @@ public function startSection($section, $content = '') { if ($content === '') { - if (ob_start()) - { - $this->sectionStack[] = $section; - } + if (ob_start()) + { + $this->sectionStack[] = $section; + } } else {
false