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
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/CookieStore.php
@@ -8,7 +8,7 @@ class CookieStore extends Store { /** * The Illuminate cookie creator. * - * @var Illuminate\CookieJar + * @var \Illuminate\CookieJar */ protected $cookies; @@ -22,7 +22,7 @@ class CookieStore extends Store { /** * Create a new Cookie based session store. * - * @param Illuminate\Cookie\CookieJar $cookies + * @param \Illuminate\Cookie\CookieJar $cookies * @param string $payload * @return void */ @@ -85,7 +85,7 @@ public function setPayloadName($name) /** * Get the cookie jar instance. * - * @return Illuminate\Cookie\CookieJar + * @return \Illuminate\Cookie\CookieJar */ public function getCookieJar() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/DatabaseStore.php
@@ -9,14 +9,14 @@ class DatabaseStore extends Store implements Sweeper { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; /** * The encrypter instance. * - * @var Illuminate\Encrypter + * @var \Illuminate\Encrypter */ protected $encrypter; @@ -30,8 +30,8 @@ class DatabaseStore extends Store implements Sweeper { /** * Create a new database session store. * - * @param Illuminate\Database\Connection $connection - * @param Illuminate\Encrypter $encrypter + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Encrypter $encrypter * @param string $table * @return void */ @@ -108,7 +108,7 @@ public function sweep($expiration) /** * Get a query builder instance for the table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function table() { @@ -118,7 +118,7 @@ protected function table() /** * Get the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -128,7 +128,7 @@ public function getConnection() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return \Illuminate\Encrypter */ public function getEncrypter() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/FileStore.php
@@ -8,7 +8,7 @@ class FileStore extends Store implements Sweeper { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -22,7 +22,7 @@ class FileStore extends Store implements Sweeper { /** * Create a new file session store instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @param string $path */ public function __construct(Filesystem $files, $path)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/SessionManager.php
@@ -7,7 +7,7 @@ class SessionManager extends Manager { /** * Create an instance of the cookie session driver. * - * @return Illuminate\Session\CookieStore + * @return \Illuminate\Session\CookieStore */ protected function createCookieDriver() { @@ -19,7 +19,7 @@ protected function createCookieDriver() /** * Create an instance of the file session driver. * - * @return Illuminate\Session\FileStore + * @return \Illuminate\Session\FileStore */ protected function createFileDriver() { @@ -31,7 +31,7 @@ protected function createFileDriver() /** * Create an instance of the APC session driver. * - * @return Illuminate\Session\CacheDrivenStore + * @return \Illuminate\Session\CacheDrivenStore */ protected function createApcDriver() { @@ -41,7 +41,7 @@ protected function createApcDriver() /** * Create an instance of the Memcached session driver. * - * @return Illuminate\Session\CacheDrivenStore + * @return \Illuminate\Session\CacheDrivenStore */ protected function createMemcachedDriver() { @@ -51,7 +51,7 @@ protected function createMemcachedDriver() /** * Create an instance of the Wincache session driver. * - * @return Illuminate\Session\CacheDrivenStore + * @return \Illuminate\Session\CacheDrivenStore */ protected function createWincacheDriver() { @@ -61,7 +61,7 @@ protected function createWincacheDriver() /** * Create an instance of the Redis session driver. * - * @return Illuminate\Session\CacheDrivenStore + * @return \Illuminate\Session\CacheDrivenStore */ protected function createRedisDriver() { @@ -71,7 +71,7 @@ protected function createRedisDriver() /** * Create an instance of the "array" session driver. * - * @return Illuminate\Session\ArrayStore + * @return \Illuminate\Session\ArrayStore */ protected function createArrayDriver() { @@ -81,7 +81,7 @@ protected function createArrayDriver() /** * Create an instance of the database session driver. * - * @return Illuminate\Session\DatabaseStore + * @return \Illuminate\Session\DatabaseStore */ protected function createDatabaseDriver() { @@ -95,7 +95,7 @@ protected function createDatabaseDriver() /** * Get the database connection for the database driver. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ protected function getDatabaseConnection() { @@ -107,7 +107,7 @@ protected function getDatabaseConnection() /** * Create an instance of a cache driven driver. * - * @return Illuminate\Session\CacheDrivenStore + * @return \Illuminate\Session\CacheDrivenStore */ protected function createCacheBased($driver) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/SessionServiceProvider.php
@@ -108,7 +108,7 @@ protected function registerSessionEvents() /** * Register the session booting event. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @return void */ protected function registerBootingEvent($app) @@ -122,7 +122,7 @@ protected function registerBootingEvent($app) /** * Register the session close event. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @param array $config * @return void */ @@ -151,7 +151,7 @@ protected function registerCloseEvent($app, $config) /** * Create a session cookie based on the given config. * - * @param Illuminate\Session\Store $session + * @param \Illuminate\Session\Store $session * @param array $config * @return Symfony\Component\HttpFoundation\Cookie */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Session/Store.php
@@ -82,7 +82,7 @@ abstract public function updateSession($id, array $session, Response $response); /** * Load the session for the request. * - * @param Illuminate\Cookie\CookieJar $cookies + * @param \Illuminate\Cookie\CookieJar $cookies * @param string $name * @return void */ @@ -459,7 +459,7 @@ public function hitsLottery() /** * Write the session cookie to the response. * - * @param Illuminate\Cookie\CookieJar $cookie + * @param \Illuminate\Cookie\CookieJar $cookie * @param string $name * @param int $lifetime * @param string $path
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Collection.php
@@ -82,7 +82,7 @@ public function pop() * Execute a callback over each item. * * @param Closure $callback - * @return Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public function each(Closure $callback) { @@ -106,7 +106,7 @@ public function map(Closure $callback) * Run a filter over each of the items. * * @param Closure $callback - * @return Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public function filter(Closure $callback) { @@ -118,7 +118,7 @@ public function filter(Closure $callback) /** * Reset the keys on the underlying array. * - * @return \Illuminate\Support\Collection + * @return \\Illuminate\Support\Collection */ public function values() { @@ -151,7 +151,7 @@ public function flatten() /** * Merge the collection itmes into a single array. * - * @return Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public function merge() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Contracts/MessageProviderInterface.php
@@ -5,7 +5,7 @@ interface MessageProviderInterface { /** * Get the messages for the instance. * - * @return ILluminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function getMessageBag();
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Facades/Facade.php
@@ -7,7 +7,7 @@ abstract class Facade { /** * The application instance being facaded. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected static $app; @@ -128,7 +128,7 @@ public static function clearResolvedInstances() /** * Get the application instance behind the facade. * - * @return Illuminate\Foundation\Application + * @return \Illuminate\Foundation\Application */ public static function getFacadeApplication() { @@ -138,7 +138,7 @@ public static function getFacadeApplication() /** * Set the application instance. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @return void */ public static function setFacadeApplication($app)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Facades/Schema.php
@@ -6,7 +6,7 @@ class Schema extends Facade { * Get a schema builder instance for a connection. * * @param string $name - * @return Illuminate\Database\Schema\Builder + * @return \Illuminate\Database\Schema\Builder */ public static function connection($name) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Fluent.php
@@ -57,7 +57,7 @@ public function getAttributes() * * @param string $method * @param array $parameters - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function __call($method, $parameters) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/Manager.php
@@ -7,7 +7,7 @@ abstract class Manager { /** * The application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $app; @@ -28,7 +28,7 @@ abstract class Manager { /** * Create a new manager instance. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @return void */ public function __construct($app)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/MessageBag.php
@@ -40,7 +40,7 @@ public function __construct(array $messages = array()) * * @param string $key * @param string $message - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function add($key, $message) { @@ -56,7 +56,7 @@ public function add($key, $message) * Merge a new array of messages into the bag. * * @param array $messages - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function merge(array $messages) { @@ -195,7 +195,7 @@ public function getMessages() /** * Get the messages for the instance. * - * @return ILluminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function getMessageBag() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Support/ServiceProvider.php
@@ -7,7 +7,7 @@ abstract class ServiceProvider { /** * The application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $app; @@ -21,7 +21,7 @@ abstract class ServiceProvider { /** * Create a new service provider instance. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @return void */ public function __construct($app)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Translation/FileLoader.php
@@ -7,7 +7,7 @@ class FileLoader implements LoaderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -28,7 +28,7 @@ class FileLoader implements LoaderInterface { /** * Create a new file loader instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @return void */ public function __construct(Filesystem $files, $path)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Translation/Translator.php
@@ -9,7 +9,7 @@ class Translator extends NamespacedItemResolver implements TranslatorInterface { /** * The loader implementation. * - * @var Illuminate\Translation\LoaderInterface + * @var \Illuminate\Translation\LoaderInterface */ protected $loader; @@ -30,7 +30,7 @@ class Translator extends NamespacedItemResolver implements TranslatorInterface { /** * Create a new translator instance. * - * @param Illuminate\Translation\LoaderInterface $loader + * @param \Illuminate\Translation\LoaderInterface $loader * @param string $locale * @return void */ @@ -253,7 +253,7 @@ public function setSelector(MessageSelector $selector) /** * Get the language line loader implementation. * - * @return Illuminate\Translation\LoaderInterface + * @return \Illuminate\Translation\LoaderInterface */ public function getLoader() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Validation/DatabasePresenceVerifier.php
@@ -7,7 +7,7 @@ class DatabasePresenceVerifier implements PresenceVerifierInterface { /** * The database connection instance. * - * @var Illuminate\Database\ConnectionResolverInterface + * @var \Illuminate\Database\ConnectionResolverInterface */ protected $db; @@ -21,7 +21,7 @@ class DatabasePresenceVerifier implements PresenceVerifierInterface { /** * Create a new database presence verifier. * - * @param Illuminate\Database\ConnectionResolverInterface $db + * @param \Illuminate\Database\ConnectionResolverInterface $db * @return void */ public function __construct(ConnectionResolverInterface $db) @@ -68,7 +68,7 @@ public function getMultiCount($collection, $column, array $values) * Get a query builder for the given table. * * @param string $table - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function table($table) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Validation/Factory.php
@@ -15,7 +15,7 @@ class Factory { /** * The Presence Verifier implementation. * - * @var Illuminate\Validation\PresenceVerifierInterface + * @var \Illuminate\Validation\PresenceVerifierInterface */ protected $presenceVerifier; @@ -57,7 +57,7 @@ public function __construct(TranslatorInterface $translator) * @param array $data * @param array $rules * @param array $messages - * @return Illuminate\Validation\Validator + * @return \Illuminate\Validation\Validator */ public function make(array $data, array $rules, array $messages = array()) { @@ -89,7 +89,7 @@ public function make(array $data, array $rules, array $messages = array()) * @param array $data * @param array $rules * @param array $messages - * @return Illuminate\Validation\Validator + * @return \Illuminate\Validation\Validator */ protected function resolve($data, $rules, $messages) { @@ -151,7 +151,7 @@ public function getTranslator() /** * Get the Presence Verifier implementation. * - * @return Illuminate\Validation\PresenceVerifierInterface + * @return \Illuminate\Validation\PresenceVerifierInterface */ public function getPresenceVerifier() { @@ -161,7 +161,7 @@ public function getPresenceVerifier() /** * Set the Presence Verifier implementation. * - * @param Illuminate\Validation\PresenceVerifierInterface $presenceVerifier + * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier * @return void */ public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Validation/Validator.php
@@ -18,14 +18,14 @@ class Validator implements MessageProviderInterface { /** * The Presence Verifier implementation. * - * @var Illuminate\Validation\PresenceVerifierInterface + * @var \Illuminate\Validation\PresenceVerifierInterface */ protected $presenceVerifier; /** * The message bag instance. * - * @var Illuminate\Support\MessageBag + * @var \Illuminate\Support\MessageBag */ protected $messages; @@ -1425,7 +1425,7 @@ public function getRules() * Set the custom attributes on the validator. * * @param array $attributes - * @return Illuminate\Validation\Validator + * @return \Illuminate\Validation\Validator */ public function setAttributeNames(array $attributes) { @@ -1448,7 +1448,7 @@ public function getFiles() * Set the files under validation. * * @param array $files - * @return Illuminate\Validation\Validator + * @return \Illuminate\Validation\Validator */ public function setFiles(array $files) { @@ -1460,7 +1460,7 @@ public function setFiles(array $files) /** * Get the Presence Verifier implementation. * - * @return Illuminate\Validation\PresenceVerifierInterface + * @return \Illuminate\Validation\PresenceVerifierInterface */ public function getPresenceVerifier() { @@ -1475,7 +1475,7 @@ public function getPresenceVerifier() /** * Set the Presence Verifier implementation. * - * @param Illuminate\Validation\PresenceVerifierInterface $presenceVerifier + * @param \Illuminate\Validation\PresenceVerifierInterface $presenceVerifier * @return void */ public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) @@ -1507,7 +1507,7 @@ public function setTranslator(TranslatorInterface $translator) /** * Get the message container for the validator. * - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function messages() { @@ -1517,7 +1517,7 @@ public function messages() /** * An alternative more semantic shortcut to the message container. * - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function errors() { @@ -1527,7 +1527,7 @@ public function errors() /** * Get the messages for the instance. * - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function getMessageBag() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/Compilers/Compiler.php
@@ -7,7 +7,7 @@ abstract class Compiler { /** * The Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -21,7 +21,7 @@ abstract class Compiler { /** * Create a new compiler instance. * - * @param Illuminate\Filesystem\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @param string $cachePath * @return void */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/Engines/CompilerEngine.php
@@ -7,14 +7,14 @@ class CompilerEngine extends PhpEngine { /** * The Blade compiler instance. * - * @var Illuminate\View\Compilers\CompilerInterface + * @var \Illuminate\View\Compilers\CompilerInterface */ protected $compiler; /** * Create a new Blade view engine instance. * - * @param Illuminate\View\Compilers\CompilerInterface $compiler + * @param \Illuminate\View\Compilers\CompilerInterface $compiler * @return void */ public function __construct(CompilerInterface $compiler) @@ -25,7 +25,7 @@ public function __construct(CompilerInterface $compiler) /** * Get the evaluated contents of the view. * - * @param Illuminate\View\Environment $environment + * @param \Illuminate\View\Environment $environment * @param string $view * @param array $data * @return string @@ -48,7 +48,7 @@ public function get($path, array $data = array()) /** * Get the compiler implementation. * - * @return Illuminate\View\Compilers\CompilerInterface + * @return \Illuminate\View\Compilers\CompilerInterface */ public function getCompiler() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/Engines/EngineResolver.php
@@ -34,7 +34,7 @@ public function register($engine, Closure $resolver) * Resolver an engine instance by name. * * @param string $engine - * @return Illuminate\View\Engines\EngineInterface + * @return \Illuminate\View\Engines\EngineInterface */ public function resolve($engine) {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/Environment.php
@@ -10,28 +10,28 @@ class Environment { /** * The engine implementation. * - * @var Illuminate\View\Engines\EngineResolver + * @var \Illuminate\View\Engines\EngineResolver */ protected $engines; /** * The view finder implementation. * - * @var Illuminate\View\ViewFinderInterface + * @var \Illuminate\View\ViewFinderInterface */ protected $finder; /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; /** * The IoC container instance. * - * @var Illuminate\Container + * @var \Illuminate\Container */ protected $container; @@ -80,9 +80,9 @@ class Environment { /** * Create a new view environment instance. * - * @param Illuminate\View\Engines\EngineResolver $engines - * @param Illuminate\View\ViewFinderInterface $finder - * @param Illuminate\Events\Dispatcher $events + * @param \Illuminate\View\Engines\EngineResolver $engines + * @param \Illuminate\View\ViewFinderInterface $finder + * @param \Illuminate\Events\Dispatcher $events * @return void */ public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) @@ -99,7 +99,7 @@ public function __construct(EngineResolver $engines, ViewFinderInterface $finder * * @param string $view * @param mixed $data - * @return Illuminate\View\View + * @return \Illuminate\View\View */ public function make($view, $data = array()) { @@ -176,7 +176,7 @@ public function renderEach($view, $data, $iterator, $empty = 'raw|') * Get the appropriate view engine for the given path. * * @param string $path - * @return Illuminate\View\Engines\EngineInterface + * @return \Illuminate\View\Engines\EngineInterface */ protected function getEngineFromPath($path) { @@ -311,7 +311,7 @@ protected function parseClassComposer($class) /** * Call the composer for a given view. * - * @param Illuminate\View\View $view + * @param \Illuminate\View\View $view * @return void */ public function callComposer(View $view) @@ -506,7 +506,7 @@ public function getExtensions() /** * Get the engine resolver instance. * - * @return Illuminate\View\Engines\EngineResolver + * @return \Illuminate\View\Engines\EngineResolver */ public function getEngineResolver() { @@ -516,7 +516,7 @@ public function getEngineResolver() /** * Get the view finder instance. * - * @return Illuminate\View\ViewFinderInterface + * @return \Illuminate\View\ViewFinderInterface */ public function getFinder() { @@ -526,7 +526,7 @@ public function getFinder() /** * Get the event dispatcher instance. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getDispatcher() { @@ -536,7 +536,7 @@ public function getDispatcher() /** * Get the IoC container instance. * - * @return Illuminate\Container\Container + * @return \Illuminate\Container\Container */ public function getContainer() { @@ -546,7 +546,7 @@ public function getContainer() /** * Set the IoC container instance. * - * @param Illuminate\Container\Container $container + * @param \Illuminate\Container\Container $container * @return void */ public function setContainer(Container $container)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/FileViewFinder.php
@@ -7,7 +7,7 @@ class FileViewFinder implements ViewFinderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -35,7 +35,7 @@ class FileViewFinder implements ViewFinderInterface { /** * Create a new file view loader instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @param array $paths * @param array $extensions * @return void @@ -187,7 +187,7 @@ public function addExtension($extension) /** * Get the filesystem instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem */ public function getFilesystem() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/View.php
@@ -10,14 +10,14 @@ class View implements ArrayAccess, Renderable { /** * The view environment instance. * - * @var Illuminate\View\Environment + * @var \Illuminate\View\Environment */ protected $environment; /** * The engine implementation. * - * @var Illuminate\View\Engines\EngineInterface + * @var \Illuminate\View\Engines\EngineInterface */ protected $engine; @@ -45,8 +45,8 @@ class View implements ArrayAccess, Renderable { /** * Create a new view instance. * - * @param Illuminate\View\Environment $environment - * @param Illuminate\View\Engines\EngineInterface $engine + * @param \Illuminate\View\Environment $environment + * @param \Illuminate\View\Engines\EngineInterface $engine * @param string $view * @param string $path * @param array $data @@ -125,7 +125,7 @@ protected function gatherData() * * @param string|array $key * @param mixed $value - * @return Illuminate\View\View + * @return \Illuminate\View\View */ public function with($key, $value = null) { @@ -147,7 +147,7 @@ public function with($key, $value = null) * @param string $key * @param string $view * @param array $data - * @return Illuminate\View\View + * @return \Illuminate\View\View */ public function nest($key, $view, array $data = array()) { @@ -157,7 +157,7 @@ public function nest($key, $view, array $data = array()) /** * Get the view environment instance. * - * @return Illuminate\View\Environment + * @return \Illuminate\View\Environment */ public function getEnvironment() { @@ -167,7 +167,7 @@ public function getEnvironment() /** * Get the view's rendering engine. * - * @return Illuminate\View\Engines\EngineInterface + * @return \Illuminate\View\Engines\EngineInterface */ public function getEngine() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/View/ViewServiceProvider.php
@@ -57,7 +57,7 @@ public function registerEngineResolver() /** * Register the PHP engine implementation. * - * @param Illuminate\View\Engines\EngineResolver $resolver + * @param \Illuminate\View\Engines\EngineResolver $resolver * @return void */ public function registerPhpEngine($resolver) @@ -68,7 +68,7 @@ public function registerPhpEngine($resolver) /** * Register the Blade engine implementation. * - * @param Illuminate\View\Engines\EngineResolver $resolver + * @param \Illuminate\View\Engines\EngineResolver $resolver * @return void */ public function registerBladeEngine($resolver) @@ -166,7 +166,7 @@ protected function registerSessionBinder() /** * Determine if the application session has errors. * - * @param Illuminate\Foundation\Application $app + * @param \Illuminate\Foundation\Application $app * @return bool */ public function sessionHasErrors($app)
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php
@@ -25,14 +25,14 @@ class WorkbenchMakeCommand extends Command { /** * The package creator instance. * - * @var Illuminate\Workbench\PackageCreator + * @var \Illuminate\Workbench\PackageCreator */ protected $creator; /** * Create a new make workbench command instance. * - * @param Illuminate\Workbench\PackageCreator $creator + * @param \Illuminate\Workbench\PackageCreator $creator * @return void */ public function __construct(PackageCreator $creator) @@ -59,7 +59,7 @@ public function fire() /** * Run the package creator class for a given Package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @return string */ protected function runCreator($package) @@ -87,7 +87,7 @@ protected function callComposerUpdate($path) /** * Build the package details from user input. * - * @return Illuminate\Workbench\Package + * @return \Illuminate\Workbench\Package */ protected function buildPackage() {
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Workbench/PackageCreator.php
@@ -7,7 +7,7 @@ class PackageCreator { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem */ protected $files; @@ -38,7 +38,7 @@ class PackageCreator { /** * Create a new package creator instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @return void */ public function __construct(Filesystem $files) @@ -49,7 +49,7 @@ public function __construct(Filesystem $files) /** * Create a new package stub. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $path * @param bool $plain * @return string @@ -95,7 +95,7 @@ protected function getBlocks($plain) /** * Write the support files to the package root. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -110,7 +110,7 @@ public function writeSupportFiles(Package $package, $directory, $plain) /** * Write the PHPUnit stub file. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -124,7 +124,7 @@ protected function writePhpUnitFile(Package $package, $directory) /** * Write the Travis stub file. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -138,7 +138,7 @@ protected function writeTravisFile(Package $package, $directory) /** * Write the Composer.json stub file. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -167,7 +167,7 @@ protected function getComposerStub($plain) /** * Write the stub .gitignore file for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -179,7 +179,7 @@ public function writeIgnoreFile(Package $package, $directory, $plain) /** * Create the support directories for a package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -194,7 +194,7 @@ public function writeSupportDirectories(Package $package, $directory) /** * Write a specific support directory for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $support * @param string $directory * @return void @@ -214,7 +214,7 @@ protected function writeSupportDirectory(Package $package, $support, $directory) /** * Create the public directory for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -230,7 +230,7 @@ public function writePublicDirectory(Package $package, $directory, $plain) /** * Create the test directory for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -244,7 +244,7 @@ public function writeTestDirectory(Package $package, $directory) /** * Write the stub ServiceProvider for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return void */ @@ -261,7 +261,7 @@ public function writeServiceProvider(Package $package, $directory, $plain) /** * Write the service provider stub for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @param string $stub * @return void @@ -281,7 +281,7 @@ protected function writeProviderStub(Package $package, $directory, $stub) /** * Get the stub for a ServiceProvider. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param bool $plain * @return string */ @@ -297,7 +297,7 @@ protected function getProviderStub(Package $package, $plain) /** * Create the main source directory for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $directory * @return string */ @@ -316,7 +316,7 @@ protected function createClassDirectory(Package $package, $directory) /** * Format a generic package stub file. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $stub * @return string */ @@ -333,7 +333,7 @@ protected function formatPackageStub(Package $package, $stub) /** * Create a workbench directory for the package. * - * @param Illuminate\Workbench\Package $package + * @param \Illuminate\Workbench\Package $package * @param string $path * @return string */
true
Other
laravel
framework
c1700d2e748c9dd70e8d0a6bcc793d2a82517b7e.json
Fix docBlocks for PHPStorm.
src/Illuminate/Workbench/Starter.php
@@ -6,7 +6,7 @@ class Starter { * Load the workbench vendor auto-load files. * * @param string $path - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem $files * @return void */ public static function start($path, $finder = null, $files = null)
true
Other
laravel
framework
8d6310851b53e176f748d6e3750408cb148df5f6.json
Add Html composer.json and added to split script.
build/illuminate-split.sh
@@ -11,6 +11,7 @@ git subsplit publish --no-tags src/Illuminate/Events:git@github.com:illuminate/e git subsplit publish --no-tags src/Illuminate/Exception:git@github.com:illuminate/exception.git git subsplit publish --no-tags src/Illuminate/Filesystem:git@github.com:illuminate/filesystem.git git subsplit publish --no-tags src/Illuminate/Hashing:git@github.com:illuminate/hashing.git +git subsplit publish --no-tags src/Illuminate/Html:git@github.com:illuminate/html.git git subsplit publish --no-tags src/Illuminate/Http:git@github.com:illuminate/http.git git subsplit publish --no-tags src/Illuminate/Log:git@github.com:illuminate/log.git git subsplit publish --no-tags src/Illuminate/Mail:git@github.com:illuminate/mail.git
true
Other
laravel
framework
8d6310851b53e176f748d6e3750408cb148df5f6.json
Add Html composer.json and added to split script.
src/Illuminate/Database/Eloquent/Model.php
@@ -468,11 +468,11 @@ public function morphTo($name = null, $type = null, $id = null) $name = snake_case($caller['function']); } - list($type, $id) = $this->getMorphs($name, $type, $id); - // Next we will guess the type and ID if necessary. The type and IDs may also // be passed into the function so that the developers may manually specify // them on the relations. Otherwise, we will just make a great estimate. + list($type, $id) = $this->getMorphs($name, $type, $id); + $class = $this->$type; return $this->belongsTo($class, $id);
true
Other
laravel
framework
8d6310851b53e176f748d6e3750408cb148df5f6.json
Add Html composer.json and added to split script.
src/Illuminate/Html/FormBuilder.php
@@ -30,7 +30,7 @@ class FormBuilder { /** * The session store implementation. * - * @var Illuminate\Support\Contracts\SessionStoreInterface + * @var Illuminate\Session\Store */ protected $session;
true
Other
laravel
framework
8d6310851b53e176f748d6e3750408cb148df5f6.json
Add Html composer.json and added to split script.
src/Illuminate/Html/composer.json
@@ -0,0 +1,30 @@ +{ + "name": "illuminate/html", + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "require": { + "php": ">=5.3.0", + "illuminate/http": "4.0.x", + "illuminate/session": "4.0.x", + "illuminate/support": "4.0.x" + }, + "require-dev": { + "mockery/mockery": "0.7.2" + }, + "autoload": { + "psr-0": { + "Illuminate\\Html": "" + } + }, + "target-dir": "Illuminate/Html", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "minimum-stability": "dev" +}
true
Other
laravel
framework
02920076c104b0318a6135e5e7fe230f81fc0ad9.json
Fix whereNull short-cut.
src/Illuminate/Database/Query/Builder.php
@@ -284,7 +284,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and' // that method for convenience so the developer doesn't have to check. if (is_null($value)) { - return $this->whereNull($column, $boolean); + return $this->whereNull($column, $boolean, $operator != '='); } // Now that we are working with just a simple query we can put the elements
false
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
src/Illuminate/Database/Eloquent/Model.php
@@ -109,6 +109,13 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa */ protected $dates = array(); + /** + * The relationships that should be touched on save. + * + * @var array + */ + protected $touches = array(); + /** * The relations to eager load on every query. * @@ -744,6 +751,8 @@ protected function finishSave() $this->syncOriginal(); $this->fireModelEvent('saved', false); + + $this->touchOwners(); } /** @@ -814,6 +823,19 @@ protected function performInsert($query) return true; } + /** + * Touch the owning relations of the model. + * + * @return void + */ + public function touchOwners() + { + foreach ($this->touches as $relation) + { + $this->$relation()->touch(); + } + } + /** * Fire the given event for the model. * @@ -1012,6 +1034,16 @@ public function getKeyName() return $this->primaryKey; } + /** + * Get the table qualified key name. + * + * @return string + */ + public function getQualifiedKeyName() + { + return $this->getTable().'.'.$this->getKeyName(); + } + /** * Determine if the model uses timestamps. *
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -306,6 +306,34 @@ protected function buildDictionary(Collection $results) return $dictionary; } + /** + * Touch all of the related models for the relationship. + * + * @return void + */ + public function touch() + { + $key = $this->getRelated()->getKeyName(); + + $columns = array($this->getRelated()->getUpdatedAtColumn() => new DateTime); + + $this->getRelated()->newQuery()->whereIn($key, $this->getRelatedIds())->update($columns); + } + + /** + * Get all of the IDs for the related models. + * + * @return array + */ + protected function getRelatedIds() + { + $related = $this->getRelated(); + + $fullKey = $related->getQualifiedKeyName(); + + return $this->getQuery()->select($fullKey)->lists($related->getKeyName()); + } + /** * Save a new model and attach it to the parent model. *
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -132,12 +132,14 @@ protected function buildDictionary(Collection $results) { $dictionary = array(); + $foreign = $this->getPlainForeignKey(); + // First we will create a dictionary of models keyed by the foreign key of the // relationship as this will allow us to quickly access all of the related // models without having to do nested looping which will be quite slow. foreach ($results as $result) { - $dictionary[$result->{$this->foreignKey}][] = $result; + $dictionary[$result->{$foreign}][] = $result; } return $dictionary; @@ -151,7 +153,7 @@ protected function buildDictionary(Collection $results) */ public function save(Model $model) { - $model->setAttribute($this->foreignKey, $this->parent->getKey()); + $model->setAttribute($this->getPlainForeignKey(), $this->parent->getKey()); $model->save(); @@ -179,7 +181,9 @@ public function saveMany(array $models) */ public function create(array $attributes) { - $foreign = array($this->foreignKey => $this->parent->getKey()); + $foreign = array( + $this->getPlainForeignKey() => $this->parent->getKey() + ); // Here we will set the raw attributes to avoid hitting the "fill" method so // that we do not have to worry about a mass accessor rules blocking sets @@ -237,4 +241,16 @@ public function getForeignKey() return $this->foreignKey; } + /** + * Get the plain foreign key. + * + * @return string + */ + public function getPlainForeignKey() + { + $segments = explode('.', $this->getForeignKey()); + + return $segments[count($segments) - 1]; + } + } \ No newline at end of file
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
src/Illuminate/Database/Eloquent/Relations/Relation.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Database\Eloquent\Relations; +use DateTime; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Collection; @@ -84,6 +85,31 @@ abstract public function match(array $models, Collection $results, $relation); */ abstract public function getResults(); + /** + * Touch all of the related models for the relationship. + * + * @return void + */ + public function touch() + { + $table = $this->getRelated()->getTable(); + + $column = $this->getRelated()->getUpdatedAtColumn(); + + $this->rawUpdate(array($table.'.'.$column => new DateTime)); + } + + /** + * Run a raw update against the base query. + * + * @param array $attributes + * @return int + */ + public function rawUpdate(array $attributes = array()) + { + return $this->query->update($attributes); + } + /** * Remove the original where clause set by the relationship. *
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
tests/Database/DatabaseEloquentHasManyTest.php
@@ -49,7 +49,6 @@ public function testRelationIsProperlyInitialized() public function testEagerConstraintsAreProperlyAdded() { $relation = $this->getRelation(); - $relation->getRelated()->shouldReceive('getTable')->once()->andReturn('table'); $relation->getQuery()->shouldReceive('whereIn')->once()->with('table.foreign_key', array(1, 2)); $model1 = new EloquentHasManyModelStub; $model1->id = 1; @@ -92,14 +91,14 @@ public function testModelsAreProperlyMatchedToParents() protected function getRelation() { $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldReceive('where')->with('foreign_key', '=', 1); + $builder->shouldReceive('where')->with('table.foreign_key', '=', 1); $related = m::mock('Illuminate\Database\Eloquent\Model'); $builder->shouldReceive('getModel')->andReturn($related); $parent = m::mock('Illuminate\Database\Eloquent\Model'); $parent->shouldReceive('getKey')->andReturn(1); $parent->shouldReceive('getCreatedAtColumn')->andReturn('created_at'); $parent->shouldReceive('getUpdatedAtColumn')->andReturn('updated_at'); - return new HasMany($builder, $parent, 'foreign_key'); + return new HasMany($builder, $parent, 'table.foreign_key'); } }
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
tests/Database/DatabaseEloquentHasOneTest.php
@@ -61,7 +61,6 @@ public function testRelationIsProperlyInitialized() public function testEagerConstraintsAreProperlyAdded() { $relation = $this->getRelation(); - $relation->getRelated()->shouldReceive('getTable')->once()->andReturn('table'); $relation->getQuery()->shouldReceive('whereIn')->once()->with('table.foreign_key', array(1, 2)); $model1 = new EloquentHasOneModelStub; $model1->id = 1; @@ -98,14 +97,14 @@ public function testModelsAreProperlyMatchedToParents() protected function getRelation() { $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldReceive('where')->with('foreign_key', '=', 1); + $builder->shouldReceive('where')->with('table.foreign_key', '=', 1); $related = m::mock('Illuminate\Database\Eloquent\Model'); $builder->shouldReceive('getModel')->andReturn($related); $parent = m::mock('Illuminate\Database\Eloquent\Model'); $parent->shouldReceive('getKey')->andReturn(1); $parent->shouldReceive('getCreatedAtColumn')->andReturn('created_at'); $parent->shouldReceive('getUpdatedAtColumn')->andReturn('updated_at'); - return new HasOne($builder, $parent, 'foreign_key'); + return new HasOne($builder, $parent, 'table.foreign_key'); } }
true
Other
laravel
framework
02029baad080d54bca1c5653b55432c60f2878b6.json
Fix some issues in Eloquent.
tests/Database/DatabaseEloquentMorphTest.php
@@ -21,9 +21,8 @@ public function testMorphOneSetsProperConstraints() public function testMorphOneEagerConstraintsAreProperlyAdded() { $relation = $this->getOneRelation(); - $relation->getRelated()->shouldReceive('getTable')->once()->andReturn('table'); $relation->getQuery()->shouldReceive('whereIn')->once()->with('table.morph_id', array(1, 2)); - $relation->getQuery()->shouldReceive('where')->once()->with('morph_type', get_class($relation->getParent())); + $relation->getQuery()->shouldReceive('where')->once()->with('table.morph_type', get_class($relation->getParent())); $model1 = new EloquentMorphResetModelStub; $model1->id = 1; @@ -62,9 +61,8 @@ public function testMorphManySetsProperConstraints() public function testMorphManyEagerConstraintsAreProperlyAdded() { $relation = $this->getManyRelation(); - $relation->getRelated()->shouldReceive('getTable')->once()->andReturn('table'); $relation->getQuery()->shouldReceive('whereIn')->once()->with('table.morph_id', array(1, 2)); - $relation->getQuery()->shouldReceive('where')->once()->with('morph_type', get_class($relation->getParent())); + $relation->getQuery()->shouldReceive('where')->once()->with('table.morph_type', get_class($relation->getParent())); $model1 = new EloquentMorphResetModelStub; $model1->id = 1; @@ -95,7 +93,7 @@ public function testCreateFunctionOnMorph() // Doesn't matter which relation type we use since they share the code... $relation = $this->getOneRelation(); $created = m::mock('stdClass'); - $relation->getRelated()->shouldReceive('newInstance')->once()->with(array('name' => 'taylor', 'morph_id' => 1, 'morph_type' => get_class($relation->getParent())))->andReturn($created); + $relation->getRelated()->shouldReceive('newInstance')->once()->with(array('name' => 'taylor', 'table.morph_id' => 1, 'table.morph_type' => get_class($relation->getParent())))->andReturn($created); $created->shouldReceive('save')->once()->andReturn(true); $this->assertEquals($created, $relation->create(array('name' => 'taylor'))); @@ -105,26 +103,26 @@ public function testCreateFunctionOnMorph() protected function getOneRelation() { $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldReceive('where')->once()->with('morph_id', '=', 1); + $builder->shouldReceive('where')->once()->with('table.morph_id', '=', 1); $related = m::mock('Illuminate\Database\Eloquent\Model'); $builder->shouldReceive('getModel')->andReturn($related); $parent = m::mock('Illuminate\Database\Eloquent\Model'); $parent->shouldReceive('getKey')->andReturn(1); - $builder->shouldReceive('where')->once()->with('morph_type', get_class($parent)); - return new MorphOne($builder, $parent, 'morph_type', 'morph_id'); + $builder->shouldReceive('where')->once()->with('table.morph_type', get_class($parent)); + return new MorphOne($builder, $parent, 'table.morph_type', 'table.morph_id'); } protected function getManyRelation() { $builder = m::mock('Illuminate\Database\Eloquent\Builder'); - $builder->shouldReceive('where')->once()->with('morph_id', '=', 1); + $builder->shouldReceive('where')->once()->with('table.morph_id', '=', 1); $related = m::mock('Illuminate\Database\Eloquent\Model'); $builder->shouldReceive('getModel')->andReturn($related); $parent = m::mock('Illuminate\Database\Eloquent\Model'); $parent->shouldReceive('getKey')->andReturn(1); - $builder->shouldReceive('where')->once()->with('morph_type', get_class($parent)); - return new MorphMany($builder, $parent, 'morph_type', 'morph_id'); + $builder->shouldReceive('where')->once()->with('table.morph_type', get_class($parent)); + return new MorphMany($builder, $parent, 'table.morph_type', 'table.morph_id'); } }
true
Other
laravel
framework
908741f04f6862bc72c0b8227167a0adb9d020e7.json
Fix double table prepend.
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -48,9 +48,7 @@ public function addConstraints() */ public function addEagerConstraints(array $models) { - $key = $this->related->getTable().'.'.$this->foreignKey; - - $this->query->whereIn($key, $this->getKeys($models)); + $this->query->whereIn($this->foreignKey, $this->getKeys($models)); } /**
false
Other
laravel
framework
c60c766bf8398bcdd05d476cbac99901f7a2f73c.json
Fix Eloquent save events.
readme.md
@@ -3,6 +3,7 @@ ## Beta 4 - Added `Model::creating(Closure)` and `Model::updating(Closure)` methods for hooking into Eloquent save events. +- Added `Model::saving(Closure)` and `Model::saved(Closure)` methods for hooking into Eloquent save events. - Added `Event::queue` and `Event::flush`. - Added a `Str` class in support component. Adopted Patchwork UTF-8 to provide solid UTF-8 handling for the framework. - Allow Eloquent attributes to be accessed by camelCase in addition to snake_case.
true
Other
laravel
framework
c60c766bf8398bcdd05d476cbac99901f7a2f73c.json
Fix Eloquent save events.
src/Illuminate/Database/Eloquent/Model.php
@@ -689,7 +689,9 @@ public function save() $this->updateTimestamps(); } - // If the saving event returns false, we will cancel the save operation + // If the "saving" event returns false we'll bail out of the save and return + // false, indicating that the save failed. This gives an opportunities to + // listeners to cancel save operations if validations fail or whatever. if ($this->fireModelEvent('saving') === false) { return false; @@ -713,11 +715,21 @@ public function save() $this->exists = $saved; } + if ($saved) $this->finishSave(); + + return $saved; + } + + /** + * Finish processing on a successful save operation. + * + * @return void + */ + protected function finishSave() + { $this->syncOriginal(); $this->fireModelEvent('saved', false); - - return $saved; } /**
true
Other
laravel
framework
13522832fb15dec1e09a979badae64238fc4a743.json
Fix transaction handling for Microsoft SQL Server.
readme.md
@@ -67,6 +67,7 @@ - Routes with too many leading or trailing slashes will now 404. - Added `callSecure` test helper. - Added `values` method to the `Collection` class. +- Fix transaction handling for Microsoft SQL Server. ## Beta 3
true
Other
laravel
framework
13522832fb15dec1e09a979badae64238fc4a743.json
Fix transaction handling for Microsoft SQL Server.
src/Illuminate/Database/SqlServerConnection.php
@@ -2,6 +2,39 @@ class SqlServerConnection extends Connection { + /** + * Execute a Closure within a transaction. + * + * @param Closure $callback + * @return mixed + */ + public function transaction(Closure $callback) + { + $this->pdo->exec('BEGIN TRAN'); + + // We'll simply execute the given callback within a try / catch block + // and if we catch any exception we can rollback the transaction + // so that none of the changes are persisted to the database. + try + { + $result = $callback($this); + + $this->pdo->exec('COMMIT TRAN'); + } + + // If we catch an exception, we will roll back so nothing gets messed + // up in the database. Then we'll re-throw the exception so it can + // be handled how the developer sees fit for their applications. + catch (\Exception $e) + { + $this->pdo->exec('ROLLBACK TRAN'); + + throw $e; + } + + return $result; + } + /** * Get the default query grammar instance. *
true
Other
laravel
framework
6a4ce06778839cdd3c4d8f37cc8301e0dfdabe02.json
Tweak a comment.
readme.md
@@ -66,6 +66,7 @@ - Added `link_to`, `link_to_asset`, `link_to_route`, `link_to_action` helpers. - Routes with too many leading or trailing slashes will now 404. - Added `callSecure` test helper. +- Added `values` method to the `Collection` class. ## Beta 3
true
Other
laravel
framework
6a4ce06778839cdd3c4d8f37cc8301e0dfdabe02.json
Tweak a comment.
src/Illuminate/Support/Collection.php
@@ -116,9 +116,9 @@ public function filter(Closure $callback) } /** - * Reset items index. + * Reset the keys on the underlying array. * - * @return Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ public function values() {
true
Other
laravel
framework
4c75d5d801f264c3557dbd2ac001236294e6a3bc.json
Add two tests to the Collection.
tests/Support/SupportCollectionTest.php
@@ -104,6 +104,26 @@ public function testIterable() } + public function testFilter() + { + $c = new Collection(array(array('id' => 1, 'name' => 'Hello'), array('id' => 2, 'name' => 'World'))); + $this->assertEquals(array(1 => array('id' => 2, 'name' => 'World')), $c->filter(function($item) + { + return $item['id'] == 2; + })->all()); + } + + + public function testValues() + { + $c = new Collection(array(array('id' => 1, 'name' => 'Hello'), array('id' => 2, 'name' => 'World'))); + $this->assertEquals(array(array('id' => 2, 'name' => 'World')), $c->filter(function($item) + { + return $item['id'] == 2; + })->values()->all()); + } + + public function testFlatten() { $c = new Collection(array(array('#foo', '#bar'), array('#baz'))); @@ -117,4 +137,4 @@ public function testMerge() $this->assertEquals(array($object1, $object2), $data->merge()->all()); } -} \ No newline at end of file +}
false
Other
laravel
framework
5474989fb34fa2eb1e8665b250a69b164f47be50.json
Add values method to the Collection.
src/Illuminate/Support/Collection.php
@@ -115,6 +115,18 @@ public function filter(Closure $callback) return $this; } + /** + * Reset items index. + * + * @return Illuminate\Support\Collection + */ + public function values() + { + $this->items = array_values($this->items); + + return $this; + } + /** * Fetch a nested element of the collection. * @@ -263,4 +275,4 @@ public function __toString() return $this->toJson(); } -} \ No newline at end of file +}
false
Other
laravel
framework
0051c0fa2174b8c1ac51e44f224725474cb1c0e8.json
Add link helpers.
src/Illuminate/Support/helpers.php
@@ -429,6 +429,82 @@ function head($array) } } +if ( ! function_exists('link_to')) +{ + /** + * Generate a HTML link. + * + * @param string $url + * @param string $title + * @param array $attributes + * @param bool $secure + * @return string + */ + function link_to($url, $title = null, $attributes = array(), $secure = null) + { + $app = app(); + + return $app['html']->link($url, $title, $attributes, $secure); + } +} + +if ( ! function_exists('link_to_asset')) +{ + /** + * Generate a HTML link to an asset. + * + * @param string $url + * @param string $title + * @param array $attributes + * @param bool $secure + * @return string + */ + function link_to_asset($url, $title = null, $attributes = array(), $secure = null) + { + $app = app(); + + return $app['html']->linkToAsset($url, $title, $attributes, $secure); + } +} + +if ( ! function_exists('link_to_route')) +{ + /** + * Generate a HTML link to a named route. + * + * @param string $name + * @param string $title + * @param array $parameters + * @param array $attributes + * @return string + */ + function link_to_route($name, $title = null, $parameters = array(), $attributes = array()) + { + $app = app(); + + return $app['html']->linkToRoute($name, $title, $parameters, $attributes); + } +} + +if ( ! function_exists('link_to_action')) +{ + /** + * Generate a HTML link to a controller action. + * + * @param string $action + * @param string $title + * @param array $parameters + * @param array $attributes + * @return string + */ + function link_to_action($action, $title = null, $parameters = array(), $attributes = array()) + { + $app = app(); + + return $app['html']->linkToAction($action, $title, $parameters, $attributes); + } +} + if ( ! function_exists('public_path')) { /**
false
Other
laravel
framework
89d1b87fde7cc37f6a0ab164ccb4037acde2ac0e.json
Remove locks from file system.
src/Illuminate/Filesystem/Filesystem.php
@@ -74,7 +74,7 @@ public function requireOnce($file) */ public function put($path, $contents) { - return file_put_contents($path, $contents, LOCK_EX); + return file_put_contents($path, $contents); } /** @@ -86,7 +86,7 @@ public function put($path, $contents) */ public function append($path, $data) { - return file_put_contents($path, $data, LOCK_EX | FILE_APPEND); + return file_put_contents($path, $data, FILE_APPEND); } /**
false
Other
laravel
framework
c222355edb06e01a9718c37676485ecab36f7d74.json
Add support for "mail" driver.
src/Illuminate/Mail/MailServiceProvider.php
@@ -3,6 +3,7 @@ use Swift_Mailer; use Illuminate\Support\ServiceProvider; use Swift_SmtpTransport as SmtpTransport; +use Swift_MailTransport as MailTransport; class MailServiceProvider extends ServiceProvider { @@ -74,6 +75,27 @@ protected function registerSwiftMailer() * @return void */ protected function registerSwiftTransport($config) + { + switch ($config['driver']) + { + case 'smtp': + return $this->registerSmtpTransport($config); + + case 'mail': + return $this->registerMailTransport($config); + + default: + throw new \InvalidArgumentException('Invalid mail driver.'); + } + } + + /** + * Register the SMTP Swift Transport instance. + * + * @param array $config + * @return void + */ + protected function registerSmtpTransport($config) { $this->app['swift.transport'] = $this->app->share(function($app) use ($config) { @@ -103,6 +125,20 @@ protected function registerSwiftTransport($config) }); } + /** + * Register the Mail Swift Transport instance. + * + * @param array $config + * @return void + */ + protected function registerMailTransport($config) + { + $this->app['swift.transport'] = $this->app->share(function() + { + return MailTransport::newInstance(); + }); + } + /** * Get the services provided by the provider. *
false
Other
laravel
framework
c3b19a2ed40ecb36c07ed74898b63fb92fa480cd.json
Fix bug in postgres processor.
src/Illuminate/Database/Query/Processors/PostgresProcessor.php
@@ -21,7 +21,7 @@ public function processInsertGetId(Builder $query, $sql, $values, $sequence = nu $result = (array) $results[0]; - return (int) $row[$sequence]; + return (int) $result[$sequence]; } } \ No newline at end of file
false
Other
laravel
framework
de37fe0e07eba65c276c13bcb09e2be5ff956b1b.json
Pass console command to database seeders.
readme.md
@@ -58,6 +58,7 @@ - Added `pop` and `shift` methods to Eloquent collection. - Allow `Input::get` to be used on JSON requests to give unified API across request types. - Allow `sync` to also update the other pivot table attributes. +- Pass console `Command` instance to database seeders. ## Beta 3
true
Other
laravel
framework
de37fe0e07eba65c276c13bcb09e2be5ff956b1b.json
Pass console command to database seeders.
src/Illuminate/Console/Command.php
@@ -129,7 +129,7 @@ public function call($command, array $arguments = array()) * @param string $key * @return string|array */ - protected function argument($key = null) + public function argument($key = null) { if (is_null($key)) return $this->input->getArguments(); @@ -142,7 +142,7 @@ protected function argument($key = null) * @param string $key * @return string|array */ - protected function option($key = null) + public function option($key = null) { if (is_null($key)) return $this->input->getOptions(); @@ -156,7 +156,7 @@ protected function option($key = null) * @param bool $default * @return bool */ - protected function confirm($question, $default = true) + public function confirm($question, $default = true) { $dialog = $this->getHelperSet()->get('dialog'); @@ -170,7 +170,7 @@ protected function confirm($question, $default = true) * @param string $default * @return string */ - protected function ask($question, $default = null) + public function ask($question, $default = null) { $dialog = $this->getHelperSet()->get('dialog'); @@ -184,7 +184,7 @@ protected function ask($question, $default = null) * @param string $default * @return string */ - protected function secret($question, $default = null) + public function secret($question, $default = null) { $dialog = $this->getHelperSet()->get('dialog'); @@ -197,7 +197,7 @@ protected function secret($question, $default = null) * @param string $string * @return void */ - protected function line($string) + public function line($string) { $this->output->writeln($string); } @@ -208,7 +208,7 @@ protected function line($string) * @param string $string * @return void */ - protected function info($string) + public function info($string) { $this->output->writeln("<info>$string</info>"); } @@ -219,7 +219,7 @@ protected function info($string) * @param string $string * @return void */ - protected function comment($string) + public function comment($string) { $this->output->writeln("<comment>$string</comment>"); } @@ -230,7 +230,7 @@ protected function comment($string) * @param string $string * @return void */ - protected function question($string) + public function question($string) { $this->output->writeln("<question>$string</question>"); } @@ -241,7 +241,7 @@ protected function question($string) * @param string $string * @return void */ - protected function error($string) + public function error($string) { $this->output->writeln("<error>$string</error>"); }
true
Other
laravel
framework
de37fe0e07eba65c276c13bcb09e2be5ff956b1b.json
Pass console command to database seeders.
src/Illuminate/Database/Console/SeedCommand.php
@@ -62,7 +62,9 @@ public function fire() */ protected function getSeeder() { - return $this->laravel->make($this->input->getOption('class')); + $class = $this->laravel->make($this->input->getOption('class')); + + return $class->setContainer($this->laravel)->setCommand($this); } /**
true
Other
laravel
framework
de37fe0e07eba65c276c13bcb09e2be5ff956b1b.json
Pass console command to database seeders.
src/Illuminate/Database/Seeder.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Database; +use Illuminate\Console\Command; use Illuminate\Container\Container; use Illuminate\Filesystem\Filesystem; @@ -12,6 +13,13 @@ class Seeder { */ protected $container; + /** + * The console command instance. + * + * @var Illuminate\Console\Command + */ + protected $command; + /** * Run the database seeds. * @@ -42,7 +50,7 @@ protected function resolve($class) { $instance = $this->container->make($class); - return $instance->setContainer($this->container); + return $instance->setContainer($this->container)->setCommand($this->command); } else { @@ -63,4 +71,17 @@ public function setContainer(Container $container) return $this; } + /** + * Set the console command instance. + * + * @param Illuminate\Console\Command $command + * @return void + */ + public function setCommand(Command $command) + { + $this->command = $command; + + return $this; + } + } \ No newline at end of file
true
Other
laravel
framework
de37fe0e07eba65c276c13bcb09e2be5ff956b1b.json
Pass console command to database seeders.
tests/Database/DatabaseSeederTest.php
@@ -15,8 +15,10 @@ public function testCallResolveTheClassAndCallsRun() { $seeder = new Seeder; $seeder->setContainer($container = m::mock('Illuminate\Container\Container')); + $seeder->setCommand($command = m::mock('Illuminate\Console\Command')); $container->shouldReceive('make')->once()->with('ClassName')->andReturn($child = m::mock('StdClass')); $child->shouldReceive('setContainer')->once()->with($container)->andReturn($child); + $child->shouldReceive('setCommand')->once()->with($command)->andReturn($child); $child->shouldReceive('run')->once(); $seeder->call('ClassName');
true
Other
laravel
framework
c369d6745e07cda661cf8f5ffcef40d0cb7b0132.json
Fix doc blocks.
src/Illuminate/Database/Eloquent/Model.php
@@ -96,7 +96,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa protected $fillable = array(); /** - * The attribute that aren't mass assignable. + * The attributes that aren't mass assignable. * * @var array */
true
Other
laravel
framework
c369d6745e07cda661cf8f5ffcef40d0cb7b0132.json
Fix doc blocks.
src/Illuminate/Database/Eloquent/Relations/Pivot.php
@@ -26,7 +26,7 @@ class Pivot extends Model { protected $otherKey; /** - * The attribute that aren't mass assignable. + * The attributes that aren't mass assignable. * * @var array */
true
Other
laravel
framework
e0bfe4b3ebcf9e6ee96832be7501f73c9fd69a53.json
Fix bug in postgres processor.
src/Illuminate/Database/Query/Processors/PostgresProcessor.php
@@ -19,7 +19,9 @@ public function processInsertGetId(Builder $query, $sql, $values, $sequence = nu $sequence = $sequence ?: 'id'; - return $results[0]->$sequence; + $result = (array) $results[0]; + + return (int) $row[$sequence]; } } \ No newline at end of file
false
Other
laravel
framework
9acec8dcb91e6e7b0dbf774d764906345f3b1743.json
Fix bug with check state in form builder.
src/Illuminate/Html/FormBuilder.php
@@ -483,13 +483,28 @@ public function radio($name, $value = null, $checked = null, $options = array()) */ protected function checkable($type, $name, $value, $checked, $options) { - if (is_null($checked)) $checked = (bool) $this->getValueAttribute($name, null); + if (is_null($checked)) $checked = $this->getCheckedState($type, $name, $value); if ($checked) $options['checked'] = 'checked'; return $this->input($type, $name, $value, $options); } + /** + * Get the check state for a checkable input. + * + * @param string $type + * @param string $name + * @param mixed $value + * @return void + */ + protected function getCheckedState($type, $name, $value) + { + if ($type == 'checkbox') return (bool) $this->getValueAttribute($name); + + return $this->getValueAttribute($name) == $value; + } + /** * Create a submit button element. * @@ -662,7 +677,7 @@ protected function getIdAttribute($name, $attributes) * @param string $value * @return string */ - protected function getValueAttribute($name, $value) + protected function getValueAttribute($name, $value = null) { if ( ! is_null($value)) return $value;
false
Other
laravel
framework
eb0d4340d81af3c99962cb15d7365b67fc866581.json
Add a space.
src/Illuminate/Foundation/Testing/TestCase.php
@@ -219,7 +219,7 @@ public function assertSessionHasAll(array $bindings) { foreach ($bindings as $key => $value) { - if(is_int($key)) + if (is_int($key)) { $this->assertSessionHas($value); }
false
Other
laravel
framework
bf376dad59d4cd414bf43369e0891cdae0fa9022.json
Add an "addSelect" clause to the query builder.
readme.md
@@ -50,6 +50,7 @@ - Changed cache stores to be implementors of a `StoreInterface` rather than extenders of a `Store` abstract class. Injected implementations into a `Cache\Repository` class. - Added `array_fetch` and `array_flatten`. Added `fetch` and `flatten` to `Collection` class. - Added `merge` method to the Collection class. +- Added an `addSelect` method to the query builder. ## Beta 3
true
Other
laravel
framework
bf376dad59d4cd414bf43369e0891cdae0fa9022.json
Add an "addSelect" clause to the query builder.
src/Illuminate/Database/Query/Builder.php
@@ -153,6 +153,21 @@ public function select($columns = array('*')) return $this; } + /** + * Add a new select column to the query. + * + * @param mixed $column + * @return Illuminate\Database\Query\Builder + */ + public function addSelect($column) + { + if ( ! isset($this->columns)) $this->columns = array(); + + $this->columns = array_merge($this->columns, $column); + + return $this; + } + /** * Force the query to only return distinct results. *
true
Other
laravel
framework
00f62c86e2d03e5ede76496780975c1c0f9163e8.json
Add unit tests for dropTimestamps() function Signed-off-by: Dries Vints <dries.vints@gmail.com>
tests/Database/DatabaseMySqlSchemaGrammarTest.php
@@ -155,6 +155,17 @@ public function testDropForeign() } + public function testDropTimestamps() + { + $blueprint = new Blueprint('users'); + $blueprint->dropTimestamps(); + $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); + + $this->assertEquals(1, count($statements)); + $this->assertEquals('alter table `users` drop `created_at`, drop `updated_at`', $statements[0]); + } + + public function testRenameTable() { $blueprint = new Blueprint('users');
true
Other
laravel
framework
00f62c86e2d03e5ede76496780975c1c0f9163e8.json
Add unit tests for dropTimestamps() function Signed-off-by: Dries Vints <dries.vints@gmail.com>
tests/Database/DatabasePostgresSchemaGrammarTest.php
@@ -127,6 +127,17 @@ public function testDropForeign() } + public function testDropTimestamps() + { + $blueprint = new Blueprint('users'); + $blueprint->dropTimestamps(); + $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); + + $this->assertEquals(1, count($statements)); + $this->assertEquals('alter table "users" drop column "created_at", drop column "updated_at"', $statements[0]); + } + + public function testRenameTable() { $blueprint = new Blueprint('users');
true
Other
laravel
framework
00f62c86e2d03e5ede76496780975c1c0f9163e8.json
Add unit tests for dropTimestamps() function Signed-off-by: Dries Vints <dries.vints@gmail.com>
tests/Database/DatabaseSqlServerSchemaGrammarTest.php
@@ -116,6 +116,17 @@ public function testDropForeign() } + public function testDropTimestamps() + { + $blueprint = new Blueprint('users'); + $blueprint->dropTimestamps(); + $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); + + $this->assertEquals(1, count($statements)); + $this->assertEquals('alter table "users" drop "created_at", drop "updated_at"', $statements[0]); + } + + public function testRenameTable() { $blueprint = new Blueprint('users');
true
Other
laravel
framework
cd06c78fb4668ac7f624004f9164895c9f467b48.json
Add function dropTimestamps() Function to quickly drop the timestamps columns on a database table. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Database/Schema/Blueprint.php
@@ -251,6 +251,16 @@ public function dropForeign($index) return $this->dropIndexCommand('dropForeign', $index); } + /** + * Indicate that the timestamp columns should be dropped. + * + * @return void + */ + public function dropTimestamps() + { + $this->dropColumns('created_at', 'updated_at'); + } + /** * Rename the table to a given name. *
false
Other
laravel
framework
13a27926dacc4c8683ead862de3fc31d8c7e1c78.json
Implement console command for clearing the cache.
src/Illuminate/Cache/CommandsServiceProvider.php
@@ -0,0 +1,41 @@ +<?php namespace Illuminate\Cache; + +use Illuminate\Support\ServiceProvider; + +class CommandsServiceProvider extends ServiceProvider { + + /** + * Indicates if loading of the provider is deferred. + * + * @var bool + */ + protected $defer = true; + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $app = $this->app; + + $app['command.cache.clear'] = $app->share(function($app) + { + return new Console\ClearCommand($app['cache']); + }); + + $this->commands('command.cache.clear'); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array('command.cache.clear'); + } + +} \ No newline at end of file
true
Other
laravel
framework
13a27926dacc4c8683ead862de3fc31d8c7e1c78.json
Implement console command for clearing the cache.
src/Illuminate/Cache/Console/ClearCommand.php
@@ -0,0 +1,51 @@ +<?php namespace Illuminate\Cache\Console; + +use Illuminate\Console\Command; + +class ClearCommand extends Command { + + /** + * The console command name. + * + * @var string + */ + protected $name = 'cache:clear'; + + /** + * The console command description. + * + * @var string + */ + protected $description = "Flush the entire cache."; + + /** + * The cache manager instance. + * + * @var \Illuminate\Cache\CacheManager + */ + protected $cache; + + /** + * Create a new cache clear command instance. + * + * @param \Illuminate\Cache\CacheManager $cache + * @return void + */ + public function __construct(CacheManager $cache) + { + parent::__construct(); + + $this->cache = $cache; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $this->cache->flush(); + } + +} \ No newline at end of file
true
Other
laravel
framework
41e402b3126c18122996550b5d72a16b59e11b72.json
Shorten some code.
src/Illuminate/Http/Request.php
@@ -148,10 +148,7 @@ public function has($key) return true; } - if (is_array($this->input($key))) - { - return true; - } + if (is_array($this->input($key))) return true; return trim((string) $this->input($key)) !== ''; }
false
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Auth/Reminders/PasswordBroker.php
@@ -45,9 +45,9 @@ class PasswordBroker { /** * Create a new password broker instance. * - * @param Illuminate\Auth\ReminderRepositoryInterface $reminders + * @param Illuminate\Auth\Reminders\ReminderRepositoryInterface $reminders * @param Illuminate\Auth\UserProviderInterface $users - * @param Illuminate\Routing\Redirector $redirector + * @param Illuminate\Routing\Redirector $redirect * @param Illuminate\Mail\Mailer $mailer * @param string $reminderView * @return void @@ -97,7 +97,7 @@ public function remind(array $credentials, Closure $callback = null) /** * Send the password reminder e-mail. * - * @param Illuminate\Auth\RemindableInterface $user + * @param Illuminate\Auth\Reminders\RemindableInterface $user * @param string $token * @param Closure $callback * @return void
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Cookie/CookieJar.php
@@ -147,7 +147,7 @@ public function getRequest() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return Illuminate\Encryption\Encrypter */ public function getEncrypter() {
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Database/Connection.php
@@ -488,6 +488,7 @@ protected function handleQueryException(\Exception $e, $query, $bindings) * * @param string $query * @param array $bindings + * @param $time * @return void */ public function logQuery($query, $bindings, $time = null)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Database/Eloquent/Model.php
@@ -356,7 +356,7 @@ public static function with($relations) * * @param string $related * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relation\HasOne + * @return Illuminate\Database\Eloquent\Relations\HasOne */ public function hasOne($related, $foreignKey = null) { @@ -374,7 +374,7 @@ public function hasOne($related, $foreignKey = null) * @param string $name * @param string $type * @param string $id - * @return Illuminate\Database\Eloquent\Relation\MorphOne + * @return Illuminate\Database\Eloquent\Relations\MorphOne */ public function morphOne($related, $name, $type = null, $id = null) { @@ -467,7 +467,7 @@ public function hasMany($related, $foreignKey = null) * @param string $name * @param string $type * @param string $id - * @return Illuminate\Database\Eloquent\Relation\MorphMany + * @return Illuminate\Database\Eloquent\Relations\MorphMany */ public function morphMany($related, $name, $type = null, $id = null) {
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Encryption/Encrypter.php
@@ -82,7 +82,7 @@ protected function padAndMcrypt($value, $iv) /** * Decrypt the given value. * - * @param string $value + * @param string $payload * @return string */ public function decrypt($payload)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Events/Dispatcher.php
@@ -1,256 +1,256 @@ -<?php namespace Illuminate\Events; - -use Illuminate\Container\Container; - -class Dispatcher { - - /** - * The IoC container instance. - * - * @var Illuminate\Container - */ - protected $container; - - /** - * The registered event listeners. - * - * @var array - */ - protected $listeners = array(); - - /** - * The sorted event listeners. - * - * @var array - */ - protected $sorted = array(); - - /** - * Create a new event dispatcher instance. - * - * @param Illuminate\Container $container - * @return void - */ - public function __construct(Container $container = null) - { - $this->container = $container; - } - - /** - * Register an event listener with the dispatcher. - * - * @param string $event - * @param mixed $listener - * @param int $priority - * @return void - */ - public function listen($event, $listener, $priority = 0) - { - $this->listeners[$event][$priority][] = $this->makeListener($listener); - - unset($this->sorted[$event]); - } - - /** - * Determine if a given event has listeners. - * - * @param string $eventName - * @return bool - */ - public function hasListeners($eventName) - { - return isset($this->listeners[$eventName]); - } - - /** - * Register a queued event and payload. - * - * @param string $event - * @param array $payload - * @return void - */ - public function queue($event, $payload = array()) - { - $me = $this; - - $this->listen($event.'_queue', function() use ($me, $event, $payload) - { - $me->fire($event, $payload); - }); - } - - /** - * Register an event subscriber with the dispatcher. - * - * @param string $subscriber - * @return void - */ - public function subscribe($subscriber) - { - $subscriber = $this->resolveSubscriber($subscriber); - - $subscriber->subscribe($this); - } - - /** - * Resolve the subscriber instance. - * - * @param mixed $subscriber - * @return mixed - */ - protected function resolveSubscriber($subscriber) - { - if (is_string($subscriber)) - { - return $this->container->make($subscriber); - } - - return $subscriber; - } - - /** - * Fire an event until the first non-null response is returned. - * - * @param string $event - * @param array $payload - * @return mixed - */ - public function until($event, $payload = array()) - { - return $this->fire($event, $payload, true); - } - - /** - * Flush a set of queued events. - * - * @param string $event - * @return void - */ - public function flush($event) - { - $this->fire($event.'_queue'); - } - - /** - * Fire an event and call the listeners. - * - * @param string $event - * @param mixed $payload - * @return void - */ - public function fire($event, $payload = array(), $halt = false) - { - $responses = array(); - - // If an array is not given to us as the payload, we will turn it into one so - // we can easily use call_user_func_array on the listeners, passing in the - // payload to each of them so that they receive each of these arguments. - if ( ! is_array($payload)) $payload = array($payload); - - foreach ($this->getListeners($event) as $listener) - { - $response = call_user_func_array($listener, $payload); - - // If a response is returned from the listener and event halting is enabled - // we will just return this response, and not call the rest of the event - // listeners. Otherwise we will add the response on the response list. - if ( ! is_null($response) and $halt) - { - return $response; - } - - // If a boolean false is returned from a listener, we will stop propogating - // the event to any further listeners down in the chain, else we keep on - // looping through the listeners and firing every one in our sequence. - if ($response === false) break; - - $responses[] = $response; - } - - return $halt ? null : $responses; - } - - /** - * Get all of the listeners for a given event name. - * - * @param string $eventName - * @return array - */ - public function getListeners($eventName) - { - if ( ! isset($this->sorted[$eventName])) - { - $this->sortListeners($eventName); - } - - return $this->sorted[$eventName]; - } - - /** - * Sort the listeners for a given event by priority. - * - * @param string $eventName - * @return array - */ - protected function sortListeners($eventName) - { - $this->sorted[$eventName] = array(); - - // If listeners exist for the given event, we will sort them by the priority - // so that we can call them in the correct order. We will cache off these - // sorted event listeners so we do not have to re-sort on every events. - if (isset($this->listeners[$eventName])) - { - krsort($this->listeners[$eventName]); - - $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]); - } - } - - /** - * Register an event listener with the dispatcher. - * - * @param mixed $listener - * @return void - */ - public function makeListener($listener) - { - if (is_string($listener)) - { - $listener = $this->createClassListener($listener); - } - - return $listener; - } - - /** - * Create a class based listener using the IoC container. - * - * @param mixed $listener - * @return Closure - */ - public function createClassListener($listener) - { - $container = $this->container; - - return function() use ($listener, $container) - { - // If the listener has an @ sign, we will assume it is being used to delimit - // the class name from the handle method name. This allows for handlers - // to run multiple handler methods in a single class for convenience. - $segments = explode('@', $listener); - - $method = count($segments) == 2 ? $segments[1] : 'handle'; - - $callable = array($container->make($segments[0]), $method); - - // We will make a callable of the listener instance and a method that should - // be called on that instance, then we will pass in the arguments that we - // received in this method into this listener class instance's methods. - $data = func_get_args(); - - return call_user_func_array($callable, $data); - }; - } - +<?php namespace Illuminate\Events; + +use Illuminate\Container\Container; + +class Dispatcher { + + /** + * The IoC container instance. + * + * @var Illuminate\Container\Container + */ + protected $container; + + /** + * The registered event listeners. + * + * @var array + */ + protected $listeners = array(); + + /** + * The sorted event listeners. + * + * @var array + */ + protected $sorted = array(); + + /** + * Create a new event dispatcher instance. + * + * @param Illuminate\Container\Container $container + * @return void + */ + public function __construct(Container $container = null) + { + $this->container = $container; + } + + /** + * Register an event listener with the dispatcher. + * + * @param string $event + * @param mixed $listener + * @param int $priority + * @return void + */ + public function listen($event, $listener, $priority = 0) + { + $this->listeners[$event][$priority][] = $this->makeListener($listener); + + unset($this->sorted[$event]); + } + + /** + * Determine if a given event has listeners. + * + * @param string $eventName + * @return bool + */ + public function hasListeners($eventName) + { + return isset($this->listeners[$eventName]); + } + + /** + * Register a queued event and payload. + * + * @param string $event + * @param array $payload + * @return void + */ + public function queue($event, $payload = array()) + { + $me = $this; + + $this->listen($event.'_queue', function() use ($me, $event, $payload) + { + $me->fire($event, $payload); + }); + } + + /** + * Register an event subscriber with the dispatcher. + * + * @param string $subscriber + * @return void + */ + public function subscribe($subscriber) + { + $subscriber = $this->resolveSubscriber($subscriber); + + $subscriber->subscribe($this); + } + + /** + * Resolve the subscriber instance. + * + * @param mixed $subscriber + * @return mixed + */ + protected function resolveSubscriber($subscriber) + { + if (is_string($subscriber)) + { + return $this->container->make($subscriber); + } + + return $subscriber; + } + + /** + * Fire an event until the first non-null response is returned. + * + * @param string $event + * @param array $payload + * @return mixed + */ + public function until($event, $payload = array()) + { + return $this->fire($event, $payload, true); + } + + /** + * Flush a set of queued events. + * + * @param string $event + * @return void + */ + public function flush($event) + { + $this->fire($event.'_queue'); + } + + /** + * Fire an event and call the listeners. + * + * @param string $event + * @param mixed $payload + * @return void + */ + public function fire($event, $payload = array(), $halt = false) + { + $responses = array(); + + // If an array is not given to us as the payload, we will turn it into one so + // we can easily use call_user_func_array on the listeners, passing in the + // payload to each of them so that they receive each of these arguments. + if ( ! is_array($payload)) $payload = array($payload); + + foreach ($this->getListeners($event) as $listener) + { + $response = call_user_func_array($listener, $payload); + + // If a response is returned from the listener and event halting is enabled + // we will just return this response, and not call the rest of the event + // listeners. Otherwise we will add the response on the response list. + if ( ! is_null($response) and $halt) + { + return $response; + } + + // If a boolean false is returned from a listener, we will stop propogating + // the event to any further listeners down in the chain, else we keep on + // looping through the listeners and firing every one in our sequence. + if ($response === false) break; + + $responses[] = $response; + } + + return $halt ? null : $responses; + } + + /** + * Get all of the listeners for a given event name. + * + * @param string $eventName + * @return array + */ + public function getListeners($eventName) + { + if ( ! isset($this->sorted[$eventName])) + { + $this->sortListeners($eventName); + } + + return $this->sorted[$eventName]; + } + + /** + * Sort the listeners for a given event by priority. + * + * @param string $eventName + * @return array + */ + protected function sortListeners($eventName) + { + $this->sorted[$eventName] = array(); + + // If listeners exist for the given event, we will sort them by the priority + // so that we can call them in the correct order. We will cache off these + // sorted event listeners so we do not have to re-sort on every events. + if (isset($this->listeners[$eventName])) + { + krsort($this->listeners[$eventName]); + + $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]); + } + } + + /** + * Register an event listener with the dispatcher. + * + * @param mixed $listener + * @return void + */ + public function makeListener($listener) + { + if (is_string($listener)) + { + $listener = $this->createClassListener($listener); + } + + return $listener; + } + + /** + * Create a class based listener using the IoC container. + * + * @param mixed $listener + * @return Closure + */ + public function createClassListener($listener) + { + $container = $this->container; + + return function() use ($listener, $container) + { + // If the listener has an @ sign, we will assume it is being used to delimit + // the class name from the handle method name. This allows for handlers + // to run multiple handler methods in a single class for convenience. + $segments = explode('@', $listener); + + $method = count($segments) == 2 ? $segments[1] : 'handle'; + + $callable = array($container->make($segments[0]), $method); + + // We will make a callable of the listener instance and a method that should + // be called on that instance, then we will pass in the arguments that we + // received in this method into this listener class instance's methods. + $data = func_get_args(); + + return call_user_func_array($callable, $data); + }; + } + } \ No newline at end of file
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Foundation/Application.php
@@ -455,7 +455,7 @@ public function run() /** * Handle the given request and get the response. * - * @param Illuminate\Foundation\Request $request + * @param Illuminate\Http\Request $request * @return Symfony\Component\HttpFoundation\Response */ public function dispatch(Request $request) @@ -470,7 +470,7 @@ public function dispatch(Request $request) * * @implements HttpKernelInterface::handle * - * @param Illuminate\Foundation\Request $request + * @param Illuminate\Http\Request $request * @param int $type * @param bool $catch * @return Symfony\Component\HttpFoundation\Response @@ -547,8 +547,8 @@ protected function fireAppCallbacks(array $callbacks) /** * Prepare the request by injecting any services. * - * @param Illuminate\Foundation\Request $request - * @return Illuminate\Foundation\Request + * @param Illuminate\Http\Request $request + * @return Illuminate\Http\Request */ public function prepareRequest(Request $request) { @@ -564,7 +564,7 @@ public function prepareRequest(Request $request) * Prepare the given value as a Response object. * * @param mixed $value - * @param Illuminate\Foundation\Request $request + * @param Illuminate\Http\Request $request * @return Symfony\Component\HttpFoundation\Response */ public function prepareResponse($value, Request $request)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Mail/Mailer.php
@@ -311,7 +311,7 @@ public function setLogger(Writer $logger) /** * Set the IoC container instance. * - * @param Illuminate\Container $container + * @param Illuminate\Container\Container $container * @return void */ public function setContainer(Container $container)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Pagination/Environment.php
@@ -60,7 +60,7 @@ class Environment { * * @param Symfony\Component\HttpFoundation\Request $request * @param Illuminate\View\Environment $view - * @param Illuminate\Translation\TranslatorInterface $trans + * @param Symfony\Component\Translation\TranslatorInterface $trans * @return void */ public function __construct(Request $request, ViewEnvironment $view, TranslatorInterface $trans)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Routing/Controllers/Controller.php
@@ -93,7 +93,7 @@ protected function prepareFilter($filter, $options) /** * Execute an action on the controller. * - * @param Illuminate\Container $container + * @param Illuminate\Container\Container $container * @param Illuminate\Routing\Router $router * @param string $method * @param array $parameters
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Routing/Router.php
@@ -111,7 +111,7 @@ class Router { /** * Create a new router instance. * - * @param Illuminate\Container $container + * @param Illuminate\Container\Container $container * @return void */ public function __construct(Container $container = null) @@ -1164,7 +1164,7 @@ public function matchFilter($pattern, $names) /** * Find the patterned filters matching a request. * - * @param Illuminate\Foundation\Request $request + * @param Illuminate\Http\Request $request * @return array */ public function findPatternFilters(Request $request) @@ -1315,7 +1315,7 @@ public function performBinding($key, $value, $route) * Prepare the given value as a Response object. * * @param mixed $value - * @param Illuminate\Foundation\Request $request + * @param Illuminate\Http\Request $request * @return Symfony\Component\HttpFoundation\Response */ public function prepare($value, Request $request)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Routing/UrlGenerator.php
@@ -90,6 +90,7 @@ public function to($path, $parameters = array(), $secure = null) * Generate a secure, absolute URL to the given path. * * @param string $path + * @param array $parameters * @return string */ public function secure($path, $parameters = array())
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Session/CookieStore.php
@@ -22,7 +22,7 @@ class CookieStore extends Store { /** * Create a new Cookie based session store. * - * @param Illuminate\CookieJar $cookies + * @param Illuminate\Cookie\CookieJar $cookies * @param string $payload * @return void */ @@ -85,7 +85,7 @@ public function setPayloadName($name) /** * Get the cookie jar instance. * - * @return Illuminate\CookieJar + * @return Illuminate\Cookie\CookieJar */ public function getCookieJar() {
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Session/Store.php
@@ -82,7 +82,7 @@ abstract public function updateSession($id, array $session, Response $response); /** * Load the session for the request. * - * @param Illuminate\CookieJar $cookies + * @param Illuminate\Cookie\CookieJar $cookies * @param string $name * @return void */
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Support/Facades/Response.php
@@ -1,72 +1,72 @@ -<?php namespace Illuminate\Support\Facades; - -use Illuminate\Support\Contracts\ArrayableInterface; -use Symfony\Component\HttpFoundation\BinaryFileResponse; - -class Response { - - /** - * Return a new response from the application. - * - * @param string $content - * @param int $status - * @param array $headers - * @return Symfony\Component\HttpFoundation\Response - */ - public static function make($content = '', $status = 200, array $headers = array()) - { - return new \Illuminate\Http\Response($content, $status, $headers); - } - - /** - * Return a new JSON response from the application. - * - * @param string $content - * @param int $status - * @param array $headers - * @return Symfony\Component\HttpFoundation\JsonResponse - */ - public static function json($data = array(), $status = 200, array $headers = array()) - { - if ($data instanceof ArrayableInterface) - { - $data = $data->toArray(); - } - - return new \Symfony\Component\HttpFoundation\JsonResponse($data, $status, $headers); - } - - /** - * Return a new streamed response from the application. - * - * @param Closure $callback - * @param int $status - * @param array $headers - * @return Symfony\Component\HttpFoundation\StreamedResponse - */ - public static function stream($callback, $status = 200, array $headers = array()) - { - return new \Symfony\Component\HttpFoundation\StreamedResponse($callback, $status, $headers); - } - - /** - * Create a new file download response. - * - * @param SplFileInfo|string $file - * @param int $status - * @param array $headers - * @return Symfony\Component\HttpFoundation\BinaryFileResponse - */ - public static function download($file, $name = null, $headers = array()) - { - $response = new BinaryFileResponse($file, 200, $headers, true, 'attachment'); - - if ( ! is_null($name)) - { - return $response->setContentDisposition('attachment', $name); - } - - return $response; - } - +<?php namespace Illuminate\Support\Facades; + +use Illuminate\Support\Contracts\ArrayableInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; + +class Response { + + /** + * Return a new response from the application. + * + * @param string $content + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\Response + */ + public static function make($content = '', $status = 200, array $headers = array()) + { + return new \Illuminate\Http\Response($content, $status, $headers); + } + + /** + * Return a new JSON response from the application. + * + * @param string|array $data + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\JsonResponse + */ + public static function json($data = array(), $status = 200, array $headers = array()) + { + if ($data instanceof ArrayableInterface) + { + $data = $data->toArray(); + } + + return new \Symfony\Component\HttpFoundation\JsonResponse($data, $status, $headers); + } + + /** + * Return a new streamed response from the application. + * + * @param Closure $callback + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\StreamedResponse + */ + public static function stream($callback, $status = 200, array $headers = array()) + { + return new \Symfony\Component\HttpFoundation\StreamedResponse($callback, $status, $headers); + } + + /** + * Create a new file download response. + * + * @param SplFileInfo|string $file + * @param int $status + * @param array $headers + * @return Symfony\Component\HttpFoundation\BinaryFileResponse + */ + public static function download($file, $name = null, $headers = array()) + { + $response = new BinaryFileResponse($file, 200, $headers, true, 'attachment'); + + if ( ! is_null($name)) + { + return $response->setContentDisposition('attachment', $name); + } + + return $response; + } + } \ No newline at end of file
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/Support/Str.php
@@ -252,7 +252,7 @@ public static function snake($value, $delimiter = '_') * Determine if a string starts with a given needle. * * @param string $haystack - * @param string|array $needle + * @param string|array $needles * @return bool */ public static function startsWith($haystack, $needles)
true
Other
laravel
framework
341d0f9890d48867229e29183f396dd2d61aaa27.json
Fix some namespace/parameters in phpdocs
src/Illuminate/View/Environment.php
@@ -536,7 +536,7 @@ public function getDispatcher() /** * Get the IoC container instance. * - * @return Illuminate\Container + * @return Illuminate\Container\Container */ public function getContainer() { @@ -546,7 +546,7 @@ public function getContainer() /** * Set the IoC container instance. * - * @param Illuminate\Container $container + * @param Illuminate\Container\Container $container * @return void */ public function setContainer(Container $container)
true
Other
laravel
framework
289e8c6589664c9856a4d0997b43c590c815b848.json
Pass the parameters to the scope.
src/Illuminate/Database/Eloquent/Builder.php
@@ -441,7 +441,7 @@ public function __call($method, $parameters) { if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) { - $this->model->$scope($this); + call_user_func_array(array($this->model, $scope), $parameters); } else {
false
Other
laravel
framework
332d383545041b355419d84c809b98353ecac8ba.json
Implement query scopes on Eloquent models.
src/Illuminate/Database/Eloquent/Builder.php
@@ -439,7 +439,14 @@ public function setModel(Model $model) */ public function __call($method, $parameters) { - $result = call_user_func_array(array($this->query, $method), $parameters); + if (method_exists($this->model, $scope = 'scope'.ucfirst($method))) + { + $this->model->$scope($this); + } + else + { + $result = call_user_func_array(array($this->query, $method), $parameters); + } return in_array($method, $this->passthru) ? $result : $this; }
true
Other
laravel
framework
332d383545041b355419d84c809b98353ecac8ba.json
Implement query scopes on Eloquent models.
tests/Database/DatabaseEloquentBuilderTest.php
@@ -252,6 +252,18 @@ public function testQueryPassThru() } + public function testQueryScopes() + { + $builder = $this->getBuilder(); + $builder->getQuery()->shouldReceive('from'); + $builder->getQuery()->shouldReceive('where')->once()->with('foo', 'bar'); + $builder->setModel($model = new EloquentBuilderTestScopeStub); + $result = $builder->approved(); + + $this->assertEquals($builder, $result); + } + + protected function getBuilder() { return new Builder(m::mock('Illuminate\Database\Query\Builder')); @@ -265,4 +277,10 @@ protected function getMocks() } -class EloquentBuilderTestModelStub extends Illuminate\Database\Eloquent\Model {} \ No newline at end of file +class EloquentBuilderTestModelStub extends Illuminate\Database\Eloquent\Model {} +class EloquentBuilderTestScopeStub extends Illuminate\Database\Eloquent\Model { + public function scopeApproved($query) + { + $query->where('foo', 'bar'); + } +} \ No newline at end of file
true
Other
laravel
framework
8be20fde8c25545677367908d25da4e222da2d17.json
Prefer old input data over form field values.
src/Illuminate/Html/FormBuilder.php
@@ -658,19 +658,23 @@ protected function getIdAttribute($name, $attributes) /** * Get the value that should be assigned to the field. * + * This returns either old input for this field, the + * value passed to this method or the equally-named attribute of the + * current model instance (in this order of precedence). + * * @param string $name * @param string $value * @return string */ protected function getValueAttribute($name, $value) { - if ( ! is_null($value)) return $value; - if (isset($this->session) and $this->session->hasOldInput($name)) { return $this->session->getOldInput($name); } + if ( ! is_null($value)) return $value; + if (isset($this->model) and isset($this->model[$name])) { return $this->model[$name];
false
Other
laravel
framework
4c36ed37b2f92fe63dce1cb16cd169c578417f70.json
Give submit button sensible default
src/Illuminate/Html/FormBuilder.php
@@ -383,7 +383,7 @@ protected function getSelectOption($display, $value, $selected) { return $this->optionGroup($display, $value, $selected); } - + return $this->option($display, $value, $selected); } @@ -497,7 +497,7 @@ protected function checkable($type, $name, $value, $checked, $options) * @param array $options * @return string */ - public function submit($value = null, $options = array()) + public function submit($value = 'Submit', $options = array()) { return $this->input('submit', null, $value, $options); }
false
Other
laravel
framework
4bd86ec5862415f8594f9cb88c40c55b298a9439.json
Write gitignore stub from workbench.
src/Illuminate/Workbench/PackageCreator.php
@@ -19,7 +19,7 @@ class PackageCreator { protected $basicBlocks = array( 'SupportFiles', 'TestDirectory', - 'ServiceProvider' + 'ServiceProvider', ); /** @@ -32,7 +32,7 @@ class PackageCreator { 'SupportDirectories', 'PublicDirectory', 'TestDirectory', - 'ServiceProvider' + 'ServiceProvider', ); /** @@ -77,7 +77,7 @@ public function create(Package $package, $path, $plain = false) */ public function writeSupportFiles(Package $package, $directory, $plain) { - foreach (array('PhpUnit', 'Travis', 'Composer') as $file) + foreach (array('PhpUnit', 'Travis', 'Composer', 'Ignore') as $file) { $this->{"write{$file}File"}($package, $directory, $plain); } @@ -136,6 +136,18 @@ protected function getComposerStub($plain) return $this->files->get(__DIR__.'/stubs/composer.json'); } + /** + * Write the stub .gitignore file for the package. + * + * @param Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writeIgnoreFile(Package $package, $directory, $plain) + { + $this->files->copy(__DIR__.'/stubs/gitignore.txt', $directory.'/.gitignore'); + } + /** * Create the support directories for a package. * @@ -292,4 +304,4 @@ protected function createDirectory(Package $package, $path) throw new \InvalidArgumentException("Package exists."); } -} +}
true
Other
laravel
framework
4bd86ec5862415f8594f9cb88c40c55b298a9439.json
Write gitignore stub from workbench.
src/Illuminate/Workbench/stubs/gitignore.txt
@@ -0,0 +1,4 @@ +/vendor +composer.phar +composer.lock +.DS_Store \ No newline at end of file
true
Other
laravel
framework
81bf19b1e413164349e98b8e09c0603abaa5af33.json
Add comment to queue listen command.
src/Illuminate/Queue/Console/ListenCommand.php
@@ -61,6 +61,9 @@ public function fire() $timeout = $this->input->getOption('timeout'); + // We need to get the right queue for the connection which is set in the queue + // configuration file for the application. We will pull it based on the set + // connection being run for the queue operation currently being executed. $queue = $this->getQueue($connection); $this->listener->listen($connection, $queue, $delay, $memory, $timeout);
false
Other
laravel
framework
9a565be05a8fd78641ca80038573f49712454de4.json
Allow isset on view objects.
src/Illuminate/View/View.php
@@ -280,6 +280,28 @@ public function __set($key, $value) $this->with($key, $value); } + /** + * Check if a piece of data is bound to the view. + * + * @param string $key + * @return bool + */ + public function __isset($key) + { + return isset($this->data[$key]); + } + + /** + * Remove a piece of bound data from the view. + * + * @param string $key + * @return bool + */ + public function __unset($key) + { + unset($this->data[$key]); + } + /** * Get the string contents of the view. *
false
Other
laravel
framework
fd6b262ca5e6e76282c4c81116bc550004fcf28d.json
Fix variable name.
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -80,7 +80,7 @@ protected function compileClasses() */ protected function getClassFiles() { - $app = $this->app; + $app = $this->laravel; $core = require __DIR__.'/Optimize/config.php';
false