diff --git a/src/Illuminate/Auth/AuthManager.php b/src/Illuminate/Auth/AuthManager.php index b4b0519ec531..781c60ec999b 100644 --- a/src/Illuminate/Auth/AuthManager.php +++ b/src/Illuminate/Auth/AuthManager.php @@ -1,90 +1,90 @@ -setCookieJar($this->app['cookie']); - - $guard->setDispatcher($this->app['events']); - - return $guard; - } - - /** - * Create an instance of the database driver. - * - * @return Illuminate\Auth\Guard - */ - protected function createDatabaseDriver() - { - $provider = $this->createDatabaseProvider(); - - return new Guard($provider, $this->app['session']); - } - - /** - * Create an instance of the database user provider. - * - * @return Illuminate\Auth\DatabaseUserProvider - */ - protected function createDatabaseProvider() - { - $connection = $this->app['db']->connection(); - - // When using the basic database user provider, we need to inject the table we - // want to use, since this is not an Eloquent model we will have no way to - // know without telling the provider, so we'll inject the config value. - $table = $this->app['config']['auth.table']; - - return new DatabaseUserProvider($connection, $this->app['hash'], $table); - } - - /** - * Create an instance of the Eloquent driver. - * - * @return Illuminate\Auth\Guard - */ - public function createEloquentDriver() - { - $provider = $this->createEloquentProvider(); - - return new Guard($provider, $this->app['session']); - } - - /** - * Create an instance of the Eloquent user provider. - * - * @return Illuminate\Auth\EloquentUserProvider - */ - protected function createEloquentProvider() - { - $model = $this->app['config']['auth.model']; - - return new EloquentUserProvider($this->app['hash'], $model); - } - - /** - * Get the default authentication driver name. - * - * @return string - */ - protected function getDefaultDriver() - { - return $this->app['config']['auth.driver']; - } - +setCookieJar($this->app['cookie']); + + $guard->setDispatcher($this->app['events']); + + return $guard; + } + + /** + * Create an instance of the database driver. + * + * @return \Illuminate\Auth\Guard + */ + protected function createDatabaseDriver() + { + $provider = $this->createDatabaseProvider(); + + return new Guard($provider, $this->app['session']); + } + + /** + * Create an instance of the database user provider. + * + * @return \Illuminate\Auth\DatabaseUserProvider + */ + protected function createDatabaseProvider() + { + $connection = $this->app['db']->connection(); + + // When using the basic database user provider, we need to inject the table we + // want to use, since this is not an Eloquent model we will have no way to + // know without telling the provider, so we'll inject the config value. + $table = $this->app['config']['auth.table']; + + return new DatabaseUserProvider($connection, $this->app['hash'], $table); + } + + /** + * Create an instance of the Eloquent driver. + * + * @return \Illuminate\Auth\Guard + */ + public function createEloquentDriver() + { + $provider = $this->createEloquentProvider(); + + return new Guard($provider, $this->app['session']); + } + + /** + * Create an instance of the Eloquent user provider. + * + * @return \Illuminate\Auth\EloquentUserProvider + */ + protected function createEloquentProvider() + { + $model = $this->app['config']['auth.model']; + + return new EloquentUserProvider($this->app['hash'], $model); + } + + /** + * Get the default authentication driver name. + * + * @return string + */ + protected function getDefaultDriver() + { + return $this->app['config']['auth.driver']; + } + } \ No newline at end of file diff --git a/src/Illuminate/Auth/DatabaseUserProvider.php b/src/Illuminate/Auth/DatabaseUserProvider.php index fad75d39fce5..9d0e1224a54c 100644 --- a/src/Illuminate/Auth/DatabaseUserProvider.php +++ b/src/Illuminate/Auth/DatabaseUserProvider.php @@ -15,7 +15,7 @@ class DatabaseUserProvider implements UserProviderInterface { /** * The hasher implementation. * - * @var Illuminate\Hashing\HasherInterface + * @var \Illuminate\Hashing\HasherInterface */ protected $hasher; @@ -29,8 +29,8 @@ class DatabaseUserProvider implements UserProviderInterface { /** * Create a new database user provider. * - * @param Illuminate\Database\Connection $conn - * @param Illuminate\Hashing\HasherInterface $hasher + * @param \Illuminate\Database\Connection $conn + * @param \Illuminate\Hashing\HasherInterface $hasher * @param string $table * @return void */ @@ -45,7 +45,7 @@ public function __construct(Connection $conn, HasherInterface $hasher, $table) * Retrieve a user by their unique idenetifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier) { @@ -61,7 +61,7 @@ public function retrieveByID($identifier) * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials) { @@ -92,7 +92,7 @@ public function retrieveByCredentials(array $credentials) /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ diff --git a/src/Illuminate/Auth/EloquentUserProvider.php b/src/Illuminate/Auth/EloquentUserProvider.php index 773265036f27..4c2e11746e72 100644 --- a/src/Illuminate/Auth/EloquentUserProvider.php +++ b/src/Illuminate/Auth/EloquentUserProvider.php @@ -7,7 +7,7 @@ class EloquentUserProvider implements UserProviderInterface { /** * The hasher implementation. * - * @var Illuminate\Hashing\HasherInterface + * @var \Illuminate\Hashing\HasherInterface */ protected $hasher; @@ -21,7 +21,7 @@ class EloquentUserProvider implements UserProviderInterface { /** * Create a new database user provider. * - * @param Illuminate\Hashing\HasherInterface $hasher + * @param \Illuminate\Hashing\HasherInterface $hasher * @param string $model * @return void */ @@ -35,7 +35,7 @@ public function __construct(HasherInterface $hasher, $model) * Retrieve a user by their unique identifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier) { @@ -46,7 +46,7 @@ public function retrieveByID($identifier) * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials) { @@ -66,7 +66,7 @@ public function retrieveByCredentials(array $credentials) /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ @@ -80,7 +80,7 @@ public function validateCredentials(UserInterface $user, array $credentials) /** * Create a new instance of the model. * - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function createModel() { diff --git a/src/Illuminate/Auth/Guard.php b/src/Illuminate/Auth/Guard.php index 26106e390bb8..de2d71592593 100644 --- a/src/Illuminate/Auth/Guard.php +++ b/src/Illuminate/Auth/Guard.php @@ -18,21 +18,21 @@ class Guard { /** * The user provider implementation. * - * @var Illuminate\Auth\UserProviderInterface + * @var \Illuminate\Auth\UserProviderInterface */ protected $provider; /** * The session store used by the guard. * - * @var Illuminate\Session\Store + * @var \Illuminate\Session\Store */ protected $session; /** * The Illuminate cookie creator service. * - * @var Illuminate\CookieJar + * @var \Illuminate\Cookie\CookieJar */ protected $cookie; @@ -46,15 +46,15 @@ class Guard { /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; /** * Create a new authentication guard. * - * @param Illuminate\Auth\UserProviderInterface $provider - * @param Illuminate\Session\Store $session + * @param \Illuminate\Auth\UserProviderInterface $provider + * @param \Illuminate\Session\Store $session * @return void */ public function __construct(UserProviderInterface $provider, @@ -87,7 +87,7 @@ public function guest() /** * Get the currently authenticated user. * - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function user() { @@ -153,7 +153,7 @@ public function attempt(array $credentials = array(), $remember = false) /** * Log a user into the application. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param bool $remember * @return void */ @@ -186,7 +186,7 @@ public function login(UserInterface $user, $remember = false) * Create a remember me cookie for a given ID. * * @param mixed $id - * @return Symfony\Component\HttpFoundation\Cookie + * @return \Symfony\Component\HttpFoundation\Cookie */ protected function createRecaller($id) { @@ -227,7 +227,7 @@ protected function clearUserDataFromStorage() /** * Get the cookie creator instance used by the guard. * - * @return Illuminate\CookieJar + * @return \Illuminate\CookieJar */ public function getCookieJar() { @@ -242,7 +242,7 @@ public function getCookieJar() /** * Set the cookie creator instance used by the guard. * - * @param Illuminate\CookieJar $cookie + * @param \Illuminate\CookieJar $cookie * @return void */ public function setCookieJar(CookieJar $cookie) @@ -253,7 +253,7 @@ public function setCookieJar(CookieJar $cookie) /** * Get the event dispatcher instance. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getDispatcher() { @@ -263,7 +263,7 @@ public function getDispatcher() /** * Set the event dispatcher instance. * - * @param Illuminate\Events\Dispatcher + * @param \Illuminate\Events\Dispatcher $events */ public function setDispatcher(Dispatcher $events) { @@ -273,7 +273,7 @@ public function setDispatcher(Dispatcher $events) /** * Get the session store used by the guard. * - * @return Illuminate\Session\Store + * @return \Illuminate\Session\Store */ public function getSession() { @@ -293,7 +293,7 @@ public function getQueuedCookies() /** * Get the user provider used by the guard. * - * @return Illuminate\Auth\UserProviderInterface + * @return \Illuminate\Auth\UserProviderInterface */ public function getProvider() { @@ -303,7 +303,7 @@ public function getProvider() /** * Return the currently cached user of the application. * - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function getUser() { @@ -313,7 +313,7 @@ public function getUser() /** * Set the current user of the application. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @return void */ public function setUser(UserInterface $user) diff --git a/src/Illuminate/Auth/UserProviderInterface.php b/src/Illuminate/Auth/UserProviderInterface.php index cfe7b4d07dde..7a5ee44f49cd 100644 --- a/src/Illuminate/Auth/UserProviderInterface.php +++ b/src/Illuminate/Auth/UserProviderInterface.php @@ -6,7 +6,7 @@ interface UserProviderInterface { * Retrieve a user by their unique idenetifier. * * @param mixed $identifier - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByID($identifier); @@ -14,14 +14,14 @@ public function retrieveByID($identifier); * Retrieve a user by the given credentials. * * @param array $credentials - * @return Illuminate\Auth\UserInterface|null + * @return \Illuminate\Auth\UserInterface|null */ public function retrieveByCredentials(array $credentials); /** * Validate a user against the given credentials. * - * @param Illuminate\Auth\UserInterface $user + * @param \Illuminate\Auth\UserInterface $user * @param array $credentials * @return bool */ diff --git a/src/Illuminate/Cache/ApcStore.php b/src/Illuminate/Cache/ApcStore.php index 3c423517c03a..b000a7d6726d 100644 --- a/src/Illuminate/Cache/ApcStore.php +++ b/src/Illuminate/Cache/ApcStore.php @@ -5,7 +5,7 @@ class ApcStore extends Store { /** * The APC wrapper instance. * - * @var Illuminate\Cache\ApcWrapper + * @var \Illuminate\Cache\ApcWrapper */ protected $apc; @@ -19,7 +19,7 @@ class ApcStore extends Store { /** * Create a new APC store. * - * @param Illuminate\Cache\ApcWrapper $apc + * @param \Illuminate\Cache\ApcWrapper $apc * @param string $prefix * @return void */ diff --git a/src/Illuminate/Cache/CacheManager.php b/src/Illuminate/Cache/CacheManager.php index ba5f27271f8c..8c497b974551 100644 --- a/src/Illuminate/Cache/CacheManager.php +++ b/src/Illuminate/Cache/CacheManager.php @@ -1,108 +1,108 @@ -app['config']['cache.path']; - - return new FileStore($this->app['files'], $path); - } - - /** - * Create an instance of the Memcached cache driver. - * - * @return Illuminate\Cache\MemcachedStore - */ - protected function createMemcachedDriver() - { - $servers = $this->app['config']['cache.memcached']; - - $memcached = $this->app['memcached.connector']->connect($servers); - - return new MemcachedStore($memcached, $this->app['config']['cache.prefix']); - } - - /** - * Create an instance of the Redis cache driver. - * - * @return Illuminate\Cache\RedisStore - */ - protected function createRedisDriver() - { - $redis = $this->app['redis']->connection(); - - return new RedisStore($redis, $this->app['config']['cache.prefix']); - } - - /** - * Create an instance of the database cache driver. - * - * @return Illuminate\Cache\DatabaseStore - */ - protected function createDatabaseDriver() - { - $connection = $this->getDatabaseConnection(); - - $encrypter = $this->app['encrypter']; - - // We allow the developer to specify which connection and table should be used - // to store the cached items. We also need to grab a prefix in case a table - // is being used by multiple applications although this is very unlikely. - $table = $this->app['config']['cache.table']; - - $prefix = $this->app['config']['cache.prefix']; - - return new DatabaseStore($connection, $encrypter, $table, $prefix); - } - - /** - * Get the database connection for the database driver. - * - * @return Illuminate\Database\Connection - */ - protected function getDatabaseConnection() - { - $connection = $this->app['config']['cache.connection']; - - return $this->app['db']->connection($connection); - } - - /** - * Get the default cache driver name. - * - * @return string - */ - protected function getDefaultDriver() - { - return $this->app['config']['cache.driver']; - } - +app['config']['cache.path']; + + return new FileStore($this->app['files'], $path); + } + + /** + * Create an instance of the Memcached cache driver. + * + * @return \Illuminate\Cache\MemcachedStore + */ + protected function createMemcachedDriver() + { + $servers = $this->app['config']['cache.memcached']; + + $memcached = $this->app['memcached.connector']->connect($servers); + + return new MemcachedStore($memcached, $this->app['config']['cache.prefix']); + } + + /** + * Create an instance of the Redis cache driver. + * + * @return \Illuminate\Cache\RedisStore + */ + protected function createRedisDriver() + { + $redis = $this->app['redis']->connection(); + + return new RedisStore($redis, $this->app['config']['cache.prefix']); + } + + /** + * Create an instance of the database cache driver. + * + * @return \Illuminate\Cache\DatabaseStore + */ + protected function createDatabaseDriver() + { + $connection = $this->getDatabaseConnection(); + + $encrypter = $this->app['encrypter']; + + // We allow the developer to specify which connection and table should be used + // to store the cached items. We also need to grab a prefix in case a table + // is being used by multiple applications although this is very unlikely. + $table = $this->app['config']['cache.table']; + + $prefix = $this->app['config']['cache.prefix']; + + return new DatabaseStore($connection, $encrypter, $table, $prefix); + } + + /** + * Get the database connection for the database driver. + * + * @return \Illuminate\Database\Connection + */ + protected function getDatabaseConnection() + { + $connection = $this->app['config']['cache.connection']; + + return $this->app['db']->connection($connection); + } + + /** + * Get the default cache driver name. + * + * @return string + */ + protected function getDefaultDriver() + { + return $this->app['config']['cache.driver']; + } + } \ No newline at end of file diff --git a/src/Illuminate/Cache/DatabaseStore.php b/src/Illuminate/Cache/DatabaseStore.php index d8cb9b880811..c8371c550a07 100644 --- a/src/Illuminate/Cache/DatabaseStore.php +++ b/src/Illuminate/Cache/DatabaseStore.php @@ -8,7 +8,7 @@ class DatabaseStore extends Store { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; @@ -36,8 +36,8 @@ class DatabaseStore extends Store { /** * Create a new database store. * - * @param Illuminate\Database\Connection $connection - * @param Illuminate\Encrypter $encrypter + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Encryption\Encrypter $encrypter * @param string $table * @param string $prefix * @return void @@ -151,7 +151,7 @@ protected function flushItems() /** * Get a query builder for the cache table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function table() { @@ -161,7 +161,7 @@ protected function table() /** * Get the underlying database connection. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -171,7 +171,7 @@ public function getConnection() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return \Illuminate\Encryption\Encrypter */ public function getEncrypter() { diff --git a/src/Illuminate/Cache/FileStore.php b/src/Illuminate/Cache/FileStore.php index 2d5844fbf35e..109d779d22ee 100644 --- a/src/Illuminate/Cache/FileStore.php +++ b/src/Illuminate/Cache/FileStore.php @@ -5,7 +5,7 @@ class FileStore extends Store { /** * The Illuminate Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; @@ -19,7 +19,7 @@ class FileStore extends Store { /** * Create a new file cache store instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @param string $directory * @return void */ @@ -137,7 +137,7 @@ protected function expiration($minutes) /** * Get the Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ public function getFilesystem() { diff --git a/src/Illuminate/Cache/MemcachedConnector.php b/src/Illuminate/Cache/MemcachedConnector.php index 923a69dc9ff4..9a68d19ae89e 100644 --- a/src/Illuminate/Cache/MemcachedConnector.php +++ b/src/Illuminate/Cache/MemcachedConnector.php @@ -6,7 +6,7 @@ class MemcachedConnector { * Create a new Memcached connection. * * @param array $servers - * @return Memcached + * @return \Memcached */ public function connect(array $servers) { @@ -31,7 +31,7 @@ public function connect(array $servers) /** * Get a new Memcached instance. * - * @return Memcached + * @return \Memcached */ protected function getMemcached() { diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index d8c5eb3f4ad1..3e15e1aee4d2 100644 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -7,7 +7,7 @@ class RedisStore extends Store { /** * The Redis database connection. * - * @var Illuminate\Redis\Database + * @var \Illuminate\Redis\Database */ protected $redis; @@ -21,7 +21,7 @@ class RedisStore extends Store { /** * Create a new APC store. * - * @param Illuminate\Redis\Database $redis + * @param \Illuminate\Redis\Database $redis * @param string $prefix * @return void */ @@ -96,7 +96,7 @@ protected function flushItems() /** * Get the Redis database instance. * - * @return Illuminate\Redis\Database + * @return \Illuminate\Redis\Database */ public function getRedis() { diff --git a/src/Illuminate/Config/FileLoader.php b/src/Illuminate/Config/FileLoader.php index 3a4d26c0dd36..e2a90aaee6a7 100644 --- a/src/Illuminate/Config/FileLoader.php +++ b/src/Illuminate/Config/FileLoader.php @@ -7,7 +7,7 @@ class FileLoader implements LoaderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; @@ -35,7 +35,7 @@ class FileLoader implements LoaderInterface { /** * Create a new file configuration loader. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @param string $defaultPath * @return void */ @@ -207,7 +207,7 @@ protected function getRequire($path) /** * Get the Filesystem instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem\Filesystem */ public function getFilesystem() { diff --git a/src/Illuminate/Config/Repository.php b/src/Illuminate/Config/Repository.php index 1e9f638aff36..5c75ab8d2866 100644 --- a/src/Illuminate/Config/Repository.php +++ b/src/Illuminate/Config/Repository.php @@ -9,7 +9,7 @@ class Repository extends NamespacedItemResolver implements ArrayAccess { /** * The loader implementation. * - * @var Illuminate\Config\LoaderInterface + * @var \Illuminate\Config\LoaderInterface */ protected $loader; @@ -44,7 +44,7 @@ class Repository extends NamespacedItemResolver implements ArrayAccess { /** * Create a new configuration repository. * - * @param Illuminate\Config\LoaderInterface $loader + * @param \Illuminate\Config\LoaderInterface $loader * @param string $environment * @return void */ @@ -294,7 +294,7 @@ public function addNamespace($namespace, $hint) /** * Get the loader implementation. * - * @return Illuminate\Config\LoaderInterface + * @return \Illuminate\Config\LoaderInterface */ public function getLoader() { diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 19df88b93305..17de1cd06cc1 100644 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -9,22 +9,22 @@ class Application extends \Symfony\Component\Console\Application { /** * The exception handler instance. * - * @var Illuminate\Exception\Handler + * @var \Illuminate\Exception\Handler */ protected $exceptionHandler; /** * The Laravel application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $laravel; /** * Start a new Console application. * - * @param Illuminate\Foundation\Application $app - * @return Illuminate\Console\Application + * @param \Illuminate\Foundation\Application $app + * @return \Illuminate\Console\Application */ public static function start($app) { @@ -44,8 +44,8 @@ public static function start($app) /** * Add a command to the console. * - * @param Symfony\Component\Console\Command\Command $command - * @return Symfony\Component\Console\Command\Command + * @param \Symfony\Component\Console\Command\Command $command + * @return \Symfony\Component\Console\Command\Command */ public function add(SymfonyCommand $command) { @@ -60,8 +60,8 @@ public function add(SymfonyCommand $command) /** * Add the command to the parent instance. * - * @param Symfony\Component\Console\Command $command - * @return Symfony\Component\Console\Command + * @param \Symfony\Component\Console\Command $command + * @return \Symfony\Component\Console\Command */ protected function addToParent($command) { @@ -98,7 +98,7 @@ public function resolveCommands($commands) /** * Get the default input definitions for the applications. * - * @return Symfony\Component\Console\Input\InputDefinition + * @return \Symfony\Component\Console\Input\InputDefinition */ protected function getDefaultInputDefinition() { @@ -112,7 +112,7 @@ protected function getDefaultInputDefinition() /** * Get the global environment option for the definition. * - * @return Symfony\Component\Console\Input\InputOption + * @return \Symfony\Component\Console\Input\InputOption */ protected function getEnvironmentOption() { @@ -124,8 +124,8 @@ protected function getEnvironmentOption() /** * Render the given exception. * - * @param Exception $e - * @param Symfony\Component\Console\Output\OutputInterface $output + * @param \Exception $e + * @param \Symfony\Component\Console\Output\OutputInterface $output * @return void */ public function renderException($e, $output) @@ -144,7 +144,7 @@ public function renderException($e, $output) /** * Set the exception handler instance. * - * @param Illuminate\Exception\Handler $handler + * @param \Illuminate\Exception\Handler $handler * @return void */ public function setExceptionHandler($handler) @@ -155,7 +155,7 @@ public function setExceptionHandler($handler) /** * Set the Laravel application instance. * - * @param Illuminate\Foundation\Application $laravel + * @param \Illuminate\Foundation\Application $laravel * @return void */ public function setLaravel($laravel) diff --git a/src/Illuminate/Console/Command.php b/src/Illuminate/Console/Command.php index 0b07258e5fe7..08e94737b6c5 100644 --- a/src/Illuminate/Console/Command.php +++ b/src/Illuminate/Console/Command.php @@ -9,21 +9,21 @@ class Command extends \Symfony\Component\Console\Command\Command { /** * The Laravel application instance. * - * @var Illuminate\Foundation\Application + * @var \Illuminate\Foundation\Application */ protected $laravel; /** * The input interface implementation. * - * @var Symfony\Component\Console\Input\InputInterface + * @var \Symfony\Component\Console\Input\InputInterface */ protected $input; /** * The output interface implementation. * - * @var Symfony\Component\Console\Output\OutputInterface + * @var \Symfony\Component\Console\Output\OutputInterface */ protected $output; @@ -82,8 +82,8 @@ protected function specifyParameters() /** * Run the conosle command. * - * @param Symfony\Component\Console\Input\InputInterface $input - * @param Symfony\Component\Console\Output\OutputInterface $output + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output * @return mixed */ public function run(InputInterface $input, OutputInterface $output) @@ -98,8 +98,8 @@ public function run(InputInterface $input, OutputInterface $output) /** * Execute the console command. * - * @param Symfony\Component\Console\Input\InputInterface $input - * @param Symfony\Component\Console\Output\OutputInterface $output + * @param \Symfony\Component\Console\Input\InputInterface $input + * @param \Symfony\Component\Console\Output\OutputInterface $output * @return mixed */ protected function execute(InputInterface $input, OutputInterface $output) @@ -255,7 +255,7 @@ protected function getOptions() /** * Get the output implementation. * - * @return Symfony\Component\Console\Output\OutputInterface + * @return \Symfony\Component\Console\Output\OutputInterface */ public function getOutput() { @@ -265,7 +265,7 @@ public function getOutput() /** * Set the Laravel application instance. * - * @return Illuminate\Foundation\Application + * @return \Illuminate\Foundation\Application */ public function getLaravel() { @@ -275,7 +275,7 @@ public function getLaravel() /** * Set the Laravel application instance. * - * @param Illuminate\Foundation\Application $laravel + * @param \Illuminate\Foundation\Application $laravel * @return void */ public function setLaravel($laravel) diff --git a/src/Illuminate/Cookie/CookieJar.php b/src/Illuminate/Cookie/CookieJar.php index 2e6d3620dc21..40134b9a3020 100644 --- a/src/Illuminate/Cookie/CookieJar.php +++ b/src/Illuminate/Cookie/CookieJar.php @@ -18,7 +18,7 @@ class CookieJar { /** * The encrypter instance. * - * @var Illuminate\Encryption\Encrypter + * @var \Illuminate\Encryption\Encrypter */ protected $encrypter; @@ -32,8 +32,8 @@ class CookieJar { /** * Create a new cookie manager instance. * - * @param Symfony\Component\HttpFoundation\Request $request - * @param Illuminate\Encryption\Encrypter $encrypter + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Illuminate\Encryption\Encrypter $encrypter * @param array $defaults * @return void */ @@ -98,7 +98,7 @@ protected function decrypt($value) * @param string $name * @param string $value * @param int $minutes - * @return Symfony\Component\HttpFoundation\Cookie + * @return \Symfony\Component\HttpFoundation\Cookie */ public function make($name, $value, $minutes = 0) { @@ -119,7 +119,7 @@ public function make($name, $value, $minutes = 0) * * @param string $name * @param string $value - * @return Symfony\Component\HttpFoundation\Cookie + * @return \Symfony\Component\HttpFoundation\Cookie */ public function forever($name, $value) { @@ -130,7 +130,7 @@ public function forever($name, $value) * Expire the given cookie. * * @param string $name - * @return Symfony\Component\HttpFoundation\Cookie + * @return \Symfony\Component\HttpFoundation\Cookie */ public function forget($name) { @@ -140,7 +140,7 @@ public function forget($name) /** * Get the request instance. * - * @return Symfony\Component\HttpFoundation\Request + * @return \Symfony\Component\HttpFoundation\Request */ public function getRequest() { @@ -150,7 +150,7 @@ public function getRequest() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return \Illuminate\Encryption\Encrypter */ public function getEncrypter() { diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php index 2f36d913a4c9..a54f824c4d72 100644 --- a/src/Illuminate/Database/Connection.php +++ b/src/Illuminate/Database/Connection.php @@ -17,35 +17,35 @@ class Connection implements ConnectionInterface { /** * The query grammar implementation. * - * @var Illuminate\Database\Query\Grammars\Grammar + * @var \Illuminate\Database\Query\Grammars\Grammar */ protected $queryGrammar; /** * The schema grammar implementation. * - * @var Illuminate\Database\Schema\Grammars\Grammar + * @var \Illuminate\Database\Schema\Grammars\Grammar */ protected $schemaGrammar; /** * The query post processor implementation. * - * @var Illuminate\Database\Query\Processors\Processor + * @var \Illuminate\Database\Query\Processors\Processor */ protected $postProcessor; /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; /** * The paginator environment instance. * - * @var Illuminate\Pagination\Paginator + * @var \Illuminate\Pagination\Paginator */ protected $paginator; @@ -124,7 +124,7 @@ public function useDefaultQueryGrammar() /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -144,7 +144,7 @@ public function useDefaultSchemaGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() {} @@ -161,7 +161,7 @@ public function useDefaultPostProcessor() /** * Get the default post processor instance. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ protected function getDefaultPostProcessor() { @@ -171,7 +171,7 @@ protected function getDefaultPostProcessor() /** * Get a schema builder instance for the connection. * - * @return Illuminate\Database\Schema\Builder + * @return \Illuminate\Database\Schema\Builder */ public function getSchemaBuilder() { @@ -184,7 +184,7 @@ public function getSchemaBuilder() * Begin a fluent query against a database table. * * @param string $table - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function table($table) { @@ -199,7 +199,7 @@ public function table($table) * Get a new raw query expression. * * @param mixed $value - * @return Illuminate\Database\Query\Expression + * @return \Illuminate\Database\Query\Expression */ public function raw($value) { @@ -472,7 +472,7 @@ public function getDriverName() /** * Get the query grammar used by the connection. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ public function getQueryGrammar() { @@ -493,7 +493,7 @@ public function setQueryGrammar(Query\Grammars\Grammar $grammar) /** * Get the schema grammar used by the connection. * - * @return Illuminate\Database\Query\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ public function getSchemaGrammar() { @@ -514,7 +514,7 @@ public function setSchemaGrammar(Schema\Grammars\Grammar $grammar) /** * Get the query post processor used by the connection. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ public function getPostProcessor() { @@ -535,7 +535,7 @@ public function setPostProcessor(Processor $processor) /** * Get the event dispatcher used by the connection. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getEventDispatcher() { @@ -556,7 +556,7 @@ public function setEventDispatcher(\Illuminate\Events\Dispatcher $events) /** * Get the paginator environment instance. * - * @return Illuminate\Pagination\Environment + * @return \Illuminate\Pagination\Environment */ public function getPaginator() { @@ -571,7 +571,7 @@ public function getPaginator() /** * Set the pagination environment instance. * - * @param Illuminate\Pagination\Environment|Closure $paginator + * @param \Illuminate\Pagination\Environment|Closure $paginator * @return void */ public function setPaginator($paginator) @@ -654,8 +654,8 @@ public function getTablePrefix() /** * Set the table prefix and return the grammar. * - * @param Illuminate\Database\Grammar $grammar - * @return Illuminate\Database\Grammar + * @param \Illuminate\Database\Grammar $grammar + * @return \Illuminate\Database\Grammar */ public function withTablePrefix(Grammar $grammar) { diff --git a/src/Illuminate/Database/ConnectionResolver.php b/src/Illuminate/Database/ConnectionResolver.php index 52ad672c06aa..d05cfe2e2313 100644 --- a/src/Illuminate/Database/ConnectionResolver.php +++ b/src/Illuminate/Database/ConnectionResolver.php @@ -34,7 +34,7 @@ public function __construct(array $connections = array()) * Get a database connection instance. * * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function connection($name = null) { @@ -47,7 +47,7 @@ public function connection($name = null) * Add a connection to the resolver. * * @param string $name - * @param Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Connection $connection * @return void */ public function addConnection($name, Connection $connection) diff --git a/src/Illuminate/Database/ConnectionResolverInterface.php b/src/Illuminate/Database/ConnectionResolverInterface.php index d0166d5bbb4f..7e9cfd651501 100644 --- a/src/Illuminate/Database/ConnectionResolverInterface.php +++ b/src/Illuminate/Database/ConnectionResolverInterface.php @@ -6,7 +6,7 @@ interface ConnectionResolverInterface { * Get a database connection instance. * * @param string $name - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function connection($name = null); diff --git a/src/Illuminate/Database/Connectors/ConnectionFactory.php b/src/Illuminate/Database/Connectors/ConnectionFactory.php index a7e91a65d14f..b74dd216d3a9 100644 --- a/src/Illuminate/Database/Connectors/ConnectionFactory.php +++ b/src/Illuminate/Database/Connectors/ConnectionFactory.php @@ -12,7 +12,7 @@ class ConnectionFactory { * Establish a PDO connection based on the configuration. * * @param array $config - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function make(array $config) { @@ -30,7 +30,7 @@ public function make(array $config) * Create a connector instance based on the configuration. * * @param array $config - * @return Illuminate\Database\Connectors\ConnectorInterface + * @return \Illuminate\Database\Connectors\ConnectorInterface */ public function createConnector(array $config) { @@ -64,7 +64,7 @@ public function createConnector(array $config) * @param PDO $connection * @param string $database * @param string $tablePrefix - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ protected function createConnection($driver, PDO $connection, $database, $tablePrefix = '') { diff --git a/src/Illuminate/Database/Connectors/ConnectorInterface.php b/src/Illuminate/Database/Connectors/ConnectorInterface.php index c734f9dbe06c..a3f5ea5715f1 100644 --- a/src/Illuminate/Database/Connectors/ConnectorInterface.php +++ b/src/Illuminate/Database/Connectors/ConnectorInterface.php @@ -6,7 +6,7 @@ interface ConnectorInterface { * Establish a database connection. * * @param array $config - * @return PDO + * @return \PDO */ public function connect(array $config); diff --git a/src/Illuminate/Database/Connectors/MySqlConnector.php b/src/Illuminate/Database/Connectors/MySqlConnector.php index b0c62eb81692..f6012d3e059b 100644 --- a/src/Illuminate/Database/Connectors/MySqlConnector.php +++ b/src/Illuminate/Database/Connectors/MySqlConnector.php @@ -6,7 +6,7 @@ class MySqlConnector extends Connector implements ConnectorInterface { * Establish a database connection. * * @param array $options - * @return PDO + * @return \PDO */ public function connect(array $config) { diff --git a/src/Illuminate/Database/Connectors/SQLiteConnector.php b/src/Illuminate/Database/Connectors/SQLiteConnector.php index b795b3b6fa1e..44163941a516 100644 --- a/src/Illuminate/Database/Connectors/SQLiteConnector.php +++ b/src/Illuminate/Database/Connectors/SQLiteConnector.php @@ -6,7 +6,7 @@ class SQLiteConnector extends Connector implements ConnectorInterface { * Establish a database connection. * * @param array $options - * @return PDO + * @return \PDO */ public function connect(array $config) { diff --git a/src/Illuminate/Database/Console/Migrations/InstallCommand.php b/src/Illuminate/Database/Console/Migrations/InstallCommand.php index d50264576b5d..09b63f439c70 100644 --- a/src/Illuminate/Database/Console/Migrations/InstallCommand.php +++ b/src/Illuminate/Database/Console/Migrations/InstallCommand.php @@ -23,14 +23,14 @@ class InstallCommand extends Command { /** * The repository instance. * - * @var Illuminate\Database\Console\Migrations\MigrationRepositoryInterface + * @var \Illuminate\Database\Migrations\MigrationRepositoryInterface */ protected $repository; /** * Create a new migration install command instance. * - * @param Illuminate\Database\Console\Migrations\MigrationRepositoryInterface $repository + * @param \Illuminate\Database\Migrations\MigrationRepositoryInterface $repository * @return void */ public function __construct(MigrationRepositoryInterface $repository) diff --git a/src/Illuminate/Database/Console/Migrations/MakeCommand.php b/src/Illuminate/Database/Console/Migrations/MakeCommand.php index 08531f6429f7..39645a5fd20d 100644 --- a/src/Illuminate/Database/Console/Migrations/MakeCommand.php +++ b/src/Illuminate/Database/Console/Migrations/MakeCommand.php @@ -24,7 +24,7 @@ class MakeCommand extends BaseCommand { /** * The migration creaotor instance. * - * @var Illuminate\Database\Migrations\MigrationCreator + * @var \Illuminate\Database\Migrations\MigrationCreator */ protected $creator; @@ -38,7 +38,7 @@ class MakeCommand extends BaseCommand { /** * Create a new migration install command instance. * - * @param Illuminate\Database\Migrations\MigrationCreator $creator + * @param \Illuminate\Database\Migrations\MigrationCreator $creator * @param string $packagePath * @return void */ diff --git a/src/Illuminate/Database/Console/Migrations/MigrateCommand.php b/src/Illuminate/Database/Console/Migrations/MigrateCommand.php index 3360fccc0f09..800507d2f8cc 100644 --- a/src/Illuminate/Database/Console/Migrations/MigrateCommand.php +++ b/src/Illuminate/Database/Console/Migrations/MigrateCommand.php @@ -24,7 +24,7 @@ class MigrateCommand extends BaseCommand { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; @@ -36,7 +36,7 @@ class MigrateCommand extends BaseCommand { /** * Create a new migration command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @param string $packagePath * @return void */ diff --git a/src/Illuminate/Database/Console/Migrations/ResetCommand.php b/src/Illuminate/Database/Console/Migrations/ResetCommand.php index a65b044e6667..386858daa9d4 100644 --- a/src/Illuminate/Database/Console/Migrations/ResetCommand.php +++ b/src/Illuminate/Database/Console/Migrations/ResetCommand.php @@ -23,14 +23,14 @@ class ResetCommand extends Command { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; /** * Create a new migration rollback command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @return void */ public function __construct(Migrator $migrator) diff --git a/src/Illuminate/Database/Console/Migrations/RollbackCommand.php b/src/Illuminate/Database/Console/Migrations/RollbackCommand.php index 5ff560d02f65..5d2ab4becdb7 100644 --- a/src/Illuminate/Database/Console/Migrations/RollbackCommand.php +++ b/src/Illuminate/Database/Console/Migrations/RollbackCommand.php @@ -23,14 +23,14 @@ class RollbackCommand extends Command { /** * The migrator instance. * - * @var Illuminate\Database\Migrations\Migrator + * @var \Illuminate\Database\Migrations\Migrator */ protected $migrator; /** * Create a new migration rollback command instance. * - * @param Illuminate\Database\Migrations\Migrator $migrator + * @param \Illuminate\Database\Migrations\Migrator $migrator * @return void */ public function __construct(Migrator $migrator) diff --git a/src/Illuminate/Database/Console/SeedCommand.php b/src/Illuminate/Database/Console/SeedCommand.php index 343b55ef9515..bd5aa8217a1c 100644 --- a/src/Illuminate/Database/Console/SeedCommand.php +++ b/src/Illuminate/Database/Console/SeedCommand.php @@ -26,21 +26,21 @@ class SeedCommand extends Command { /** * The connection resolver instance. * - * @var Illuminate\Database\ConnectionResolverInterface + * @var \Illuminate\Database\ConnectionResolverInterface */ protected $resolver; /** * The database seeder instance. * - * @var Illuminate\Database\Seeder + * @var \Illuminate\Database\Seeder */ protected $seeder; /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; @@ -54,9 +54,9 @@ class SeedCommand extends Command { /** * Create a new database seed command instance. * - * @param Illuminate\Database\ConnectionResolverInterface $resolver - * @param Illuminate\Database\Seeder $seeder - * @param Illuminate\Events\Dispatcher $events + * @param \Illuminate\Database\ConnectionResolverInterface $resolver + * @param \Illuminate\Database\Seeder $seeder + * @param \Illuminate\Events\Dispatcher $events * @param string $path * @return void */ diff --git a/src/Illuminate/Database/DatabaseManager.php b/src/Illuminate/Database/DatabaseManager.php index 44bdfba1d24f..e2cb1b275a22 100644 --- a/src/Illuminate/Database/DatabaseManager.php +++ b/src/Illuminate/Database/DatabaseManager.php @@ -1,146 +1,146 @@ -app = $app; - $this->factory = $factory; - } - - /** - * Get a database connection instance. - * - * @param string $name - * @return Illuminate\Database\Connection - */ - public function connection($name = null) - { - $name = $name ?: $this->getDefaultConnection(); - - // If we haven't created this connection, we'll create it based on the config - // provided in the application. Once we've created the connections we will - // set the "fetch mode" for PDO which determines the query return types. - if ( ! isset($this->connections[$name])) - { - $connection = $this->factory->make($this->getConfig($name)); - - $this->connections[$name] = $this->prepare($connection); - } - - return $this->connections[$name]; - } - - /** - * Prepare the database connection instance. - * - * @param Illuminate\Database\Connection $connection - * @return Illuminate\Database\Connection - */ - protected function prepare(Connection $connection) - { - $connection->setFetchMode($this->app['config']['database.fetch']); - - $connection->setEventDispatcher($this->app['events']); - - // We will setup a Closure to resolve the paginator instance on the connection - // since the Paginator isn't sued on every request and needs quite a few of - // our dependencies. It'll be more efficient to lazily resolve instances. - $app = $this->app; - - $connection->setPaginator(function() use ($app) - { - return $app['paginator']; - }); - - return $connection; - } - - /** - * Get the configuration for a connection. - * - * @param string $name - * @return array - */ - protected function getConfig($name) - { - $name = $name ?: $this->getDefaultConnection(); - - // To get the database connection configuration, we will just pull each of the - // connection configurations and get the configurations for the given name. - // If the configuration doesn't exist, we'll throw an exception and bail. - $connections = $this->app['config']['database.connections']; - - if (is_null($config = array_get($connections, $name))) - { - throw new \InvalidArgumentException("Database [$name] not configured."); - } - - return $config; - } - - /** - * Get the default connection name. - * - * @return string - */ - public function getDefaultConnection() - { - return $this->app['config']['database.default']; - } - - /** - * Set the default connection name. - * - * @param string $name - * @return void - */ - public function setDefaultConnection($name) - { - $this->app['config']['database.default'] = $name; - } - - /** - * Dynamically pass methods to the default connection. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return call_user_func_array(array($this->connection(), $method), $parameters); - } - +app = $app; + $this->factory = $factory; + } + + /** + * Get a database connection instance. + * + * @param string $name + * @return \Illuminate\Database\Connection + */ + public function connection($name = null) + { + $name = $name ?: $this->getDefaultConnection(); + + // If we haven't created this connection, we'll create it based on the config + // provided in the application. Once we've created the connections we will + // set the "fetch mode" for PDO which determines the query return types. + if ( ! isset($this->connections[$name])) + { + $connection = $this->factory->make($this->getConfig($name)); + + $this->connections[$name] = $this->prepare($connection); + } + + return $this->connections[$name]; + } + + /** + * Prepare the database connection instance. + * + * @param \Illuminate\Database\Connection $connection + * @return \Illuminate\Database\Connection + */ + protected function prepare(Connection $connection) + { + $connection->setFetchMode($this->app['config']['database.fetch']); + + $connection->setEventDispatcher($this->app['events']); + + // We will setup a Closure to resolve the paginator instance on the connection + // since the Paginator isn't sued on every request and needs quite a few of + // our dependencies. It'll be more efficient to lazily resolve instances. + $app = $this->app; + + $connection->setPaginator(function() use ($app) + { + return $app['paginator']; + }); + + return $connection; + } + + /** + * Get the configuration for a connection. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + $name = $name ?: $this->getDefaultConnection(); + + // To get the database connection configuration, we will just pull each of the + // connection configurations and get the configurations for the given name. + // If the configuration doesn't exist, we'll throw an exception and bail. + $connections = $this->app['config']['database.connections']; + + if (is_null($config = array_get($connections, $name))) + { + throw new \InvalidArgumentException("Database [$name] not configured."); + } + + return $config; + } + + /** + * Get the default connection name. + * + * @return string + */ + public function getDefaultConnection() + { + return $this->app['config']['database.default']; + } + + /** + * Set the default connection name. + * + * @param string $name + * @return void + */ + public function setDefaultConnection($name) + { + $this->app['config']['database.default'] = $name; + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return call_user_func_array(array($this->connection(), $method), $parameters); + } + } \ No newline at end of file diff --git a/src/Illuminate/Database/Eloquent/Builder.php b/src/Illuminate/Database/Eloquent/Builder.php index 397f3e117d46..c07c94ca2318 100644 --- a/src/Illuminate/Database/Eloquent/Builder.php +++ b/src/Illuminate/Database/Eloquent/Builder.php @@ -9,14 +9,14 @@ class Builder { /** * The base query builder instance. * - * @var Illuminate\Database\Query\Builder + * @var \Illuminate\Database\Query\Builder */ protected $query; /** * The model being queried. * - * @var Illuminate\Database\Eloquent\Model + * @var \Illuminate\Database\Eloquent\Model */ protected $model; @@ -40,7 +40,7 @@ class Builder { /** * Create a new Eloquent query builder instance. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return void */ public function __construct(QueryBuilder $query) @@ -53,7 +53,7 @@ public function __construct(QueryBuilder $query) * * @param mixed $id * @param array $columns - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function find($id, $columns = array('*')) { @@ -77,7 +77,7 @@ public function first($columns = array('*')) * Execute the query as a "select" statement. * * @param array $columns - * @return Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection */ public function get($columns = array('*')) { @@ -99,7 +99,7 @@ public function get($columns = array('*')) * * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ public function paginate($perPage = null, $columns = array('*')) { @@ -120,10 +120,10 @@ public function paginate($perPage = null, $columns = array('*')) /** * Get a paginator for a grouped statement. * - * @param Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ protected function groupedPaginate($paginator, $perPage, $columns) { @@ -135,10 +135,10 @@ protected function groupedPaginate($paginator, $perPage, $columns) /** * Get a paginator for an ungrouped statement. * - * @param Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ protected function ungroupedPaginate($paginator, $perPage, $columns) { @@ -295,7 +295,7 @@ protected function nestedRelations($relation) * Set the relationships that should be eager loaded. * * @param dynamic $relation - * @return Illuminate\Database\Eloquent\Builder + * @return \Illuminate\Database\Eloquent\Builder */ public function with($relations) { @@ -369,7 +369,7 @@ protected function parseNestedRelations($name, $results) /** * Get the underlying query builder instance. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function getQuery() { @@ -379,7 +379,7 @@ public function getQuery() /** * Set the underlying query builder instance. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return void */ public function setQuery($query) @@ -411,7 +411,7 @@ public function setEagerLoads(array $eagerLoad) /** * Get the model instance being queried. * - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function getModel() { @@ -421,7 +421,7 @@ public function getModel() /** * Set a model instance for the model being queried. * - * @param Illuminate\Database\Eloquent\Model $model + * @param \Illuminate\Database\Eloquent\Model $model * @return void */ public function setModel(Model $model) diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index acf348b6e6ee..e4a9443ad339 100644 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -54,7 +54,7 @@ public function load() * Add an item to the collection. * * @param mixed $item - * @return Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection */ public function add($item) { diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index fd68f9f394a5..e696b02af804 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -117,7 +117,7 @@ abstract class Model implements ArrayableInterface, JsonableInterface { /** * The connection resolver instance. * - * @var Illuminate\Database\ConnectionResolverInterface + * @var \Illuminate\Database\ConnectionResolverInterface */ protected static $resolver; @@ -136,7 +136,7 @@ public function __construct(array $attributes = array()) * Fill the model with an array of attributes. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function fill(array $attributes) { @@ -159,7 +159,7 @@ public function fill(array $attributes) * * @param array $attributes * @param bool $exists - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function newInstance($attributes = array(), $exists = false) { @@ -177,7 +177,7 @@ public function newInstance($attributes = array(), $exists = false) * Create a new model instance that is existing. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function newExisting($attributes = array()) { @@ -188,7 +188,7 @@ public function newExisting($attributes = array()) * Save a new model and return the instance. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public static function create(array $attributes) { @@ -203,7 +203,7 @@ public static function create(array $attributes) * Begin querying the model on a given connection. * * @param string $connection - * @return Illuminate\Database\Eloquent\Builder + * @return \Illuminate\Database\Eloquent\Builder */ public static function on($connection) { @@ -221,7 +221,7 @@ public static function on($connection) * Get all of the models from the database. * * @param array $columns - * @return Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection */ public static function all($columns = array('*')) { @@ -235,7 +235,7 @@ public static function all($columns = array('*')) * * @param mixed $id * @param array $columns - * @return Illuminate\Database\Eloquent\Model|Collection + * @return \Illuminate\Database\Eloquent\Model|Collection */ public static function find($id, $columns = array('*')) { @@ -253,7 +253,7 @@ public static function find($id, $columns = array('*')) * Being querying a model with eager loading. * * @param array $relations - * @return Illuminate\Database\Eloquent\Builder + * @return \Illuminate\Database\Eloquent\Builder */ public static function with($relations) { @@ -269,7 +269,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) { @@ -286,7 +286,7 @@ public function hasOne($related, $foreignKey = null) * @param string $related * @param string $name * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relation\MorphOne + * @return \Illuminate\Database\Eloquent\Relations\MorphOne */ public function morphOne($related, $name) { @@ -300,7 +300,7 @@ public function morphOne($related, $name) * * @param string $related * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relations\BelongsTo + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function belongsTo($related, $foreignKey = null) { @@ -328,7 +328,7 @@ public function belongsTo($related, $foreignKey = null) * Define an polymorphic, inverse one-to-one or many relationship. * * @param string $name - * @return Illuminate\Database\Eloquent\Relations\BelongsTo + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function morphTo($name = null) { @@ -350,7 +350,7 @@ public function morphTo($name = null) * * @param string $related * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relations\HasMany + * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function hasMany($related, $foreignKey = null) { @@ -367,7 +367,7 @@ public function hasMany($related, $foreignKey = null) * @param string $related * @param string $name * @param string $foreignKey - * @return Illuminate\Database\Eloquent\Relation\MorphMany + * @return \Illuminate\Database\Eloquent\Relation\MorphMany */ public function morphMany($related, $name) { @@ -383,7 +383,7 @@ public function morphMany($related, $name) * @param string $table * @param string $foreignKey * @param string $otherKey - * @return Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function belongsToMany($related, $table = null, $foreignKey = null, $otherKey = null) { @@ -555,7 +555,7 @@ public function newQuery() /** * Get a new query builder instance for the connection. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function newBaseQueryBuilder() { @@ -570,7 +570,7 @@ protected function newBaseQueryBuilder() * Create a new Eloquent Collection instance. * * @param array $models - * @return Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection */ public function newCollection(array $models = array()) { @@ -694,7 +694,7 @@ public function getFillable() * Set the fillable attributes for the model. * * @param array $fillable - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function fillable(array $fillable) { @@ -707,7 +707,7 @@ public function fillable(array $fillable) * Set the guarded attributes for the model. * * @param array $guarded - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function guard(array $guarded) { @@ -1055,7 +1055,7 @@ public function setRelation($relation, $value) /** * Get the database connection for the model. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -1087,7 +1087,7 @@ public function setConnection($name) * Resolve a connection instance by name. * * @param string $connection - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public static function resolveConnection($connection) { @@ -1097,7 +1097,7 @@ public static function resolveConnection($connection) /** * Get the connection resolver instance. * - * @return Illuminate\Database\ConnectionResolverInterface + * @return \Illuminate\Database\ConnectionResolverInterface */ public static function getConnectionResolver() { @@ -1107,7 +1107,7 @@ public static function getConnectionResolver() /** * Set the connection resolver instance. * - * @param Illuminate\Database\ConnectionResolverInterface $resolver + * @param \Illuminate\Database\ConnectionResolverInterface $resolver * @return void */ public static function setConnectionResolver(Resolver $resolver) diff --git a/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php b/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php index c84a2d3907f4..12a2cbb49936 100644 --- a/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php +++ b/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php @@ -16,8 +16,8 @@ class BelongsTo extends Relation { /** * Create a new has many relationship instance. * - * @param Illuminate\Database\Eloquent\Builder $query - * @param Illuminate\Database\Eloquent\Model $parent + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $parent * @param string $foreignKey * @return void */ diff --git a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php index 7ed284d03f4f..2dae860fa06b 100644 --- a/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php @@ -38,8 +38,8 @@ class BelongsToMany extends Relation { /** * Create a new has many relationship instance. * - * @param Illuminate\Database\Eloquent\Builder $query - * @param Illuminate\Database\Eloquent\Model $parent + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $parent * @param string $table * @param string $foreignKey * @param string $otherKey @@ -68,7 +68,7 @@ public function getResults() * Execute the query as a "select" statement. * * @param array $columns - * @return Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection */ public function get($columns = array('*')) { @@ -111,7 +111,7 @@ protected function hydratePivotRelation(array $models) /** * Get the pivot attributes from a model. * - * @param Illuminate\Database\Eloquent\Model $model + * @param \Illuminate\Database\Eloquent\Model $model * @return array */ protected function cleanPivotAttributes(Model $model) @@ -147,7 +147,7 @@ public function addConstraints() /** * Set the select clause for the relation query. * - * @return Illuminate\Database\Eloquent\Relation\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ protected function getSelectColumns() { @@ -181,7 +181,7 @@ protected function getAliasedPivotColumns() /** * Set the join clause for the relation query. * - * @return Illuminate\Database\Eloquent\Relation\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ protected function setJoin() { @@ -200,7 +200,7 @@ protected function setJoin() /** * Set the where clause for the relation query. * - * @return Illuminate\Database\Eloquent\Relation\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ protected function setWhere() { @@ -243,7 +243,7 @@ public function initRelation(array $models, $relation) * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ @@ -270,7 +270,7 @@ public function match(array $models, Collection $results, $relation) /** * Build model dictionary keyed by the relation's foreign key. * - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @return array */ protected function buildDictionary(Collection $results) @@ -293,9 +293,9 @@ protected function buildDictionary(Collection $results) /** * Save a new model and attach it to the parent model. * - * @param Illuminate\Database\Eloquent\Model $model + * @param \Illuminate\Database\Eloquent\Model $model * @param array $joining - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function save(Model $model, array $joining = array()) { @@ -311,7 +311,7 @@ public function save(Model $model, array $joining = array()) * * @param array $attributes * @param array $joining - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function create(array $attributes, array $joining = array()) { @@ -486,7 +486,7 @@ public function delete() /** * Create a new query builder for the pivot table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function newPivotQuery() { @@ -498,7 +498,7 @@ protected function newPivotQuery() /** * Get a new plain query builder for the pivot table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function newPivotStatement() { @@ -510,7 +510,7 @@ public function newPivotStatement() * * @param array $attributes * @param bool $exists - * @return Illuminate\Database\Eloquent\Relation\Pivot + * @return \Illuminate\Database\Eloquent\Relations\Pivot */ public function newPivot(array $attributes = array(), $exists = false) { @@ -527,7 +527,7 @@ public function newPivot(array $attributes = array(), $exists = false) * Create a new existing pivot model instance. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Relations\Pivot + * @return \Illuminate\Database\Eloquent\Relations\Pivot */ public function newExistingPivot(array $attributes = array()) { @@ -538,7 +538,7 @@ public function newExistingPivot(array $attributes = array()) * Set the columns on the pivot table to retrieve. * * @param array $columns - * @return Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function withPivot($columns) { @@ -550,7 +550,7 @@ public function withPivot($columns) /** * Specify that the pivot table has creation and update timestamps. * - * @return Illuminate\Database\Eloquent\Relations\BelongsToMany + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function withTimestamps() { diff --git a/src/Illuminate/Database/Eloquent/Relations/HasMany.php b/src/Illuminate/Database/Eloquent/Relations/HasMany.php index 0c875c16d074..171858258e7a 100644 --- a/src/Illuminate/Database/Eloquent/Relations/HasMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/HasMany.php @@ -35,7 +35,7 @@ public function initRelation(array $models, $relation) * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ diff --git a/src/Illuminate/Database/Eloquent/Relations/HasOne.php b/src/Illuminate/Database/Eloquent/Relations/HasOne.php index f0371be352f6..69437c2ade9e 100644 --- a/src/Illuminate/Database/Eloquent/Relations/HasOne.php +++ b/src/Illuminate/Database/Eloquent/Relations/HasOne.php @@ -35,7 +35,7 @@ public function initRelation(array $models, $relation) * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ diff --git a/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php b/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php index cc8ac57143d8..7f8d4b19d340 100644 --- a/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php @@ -16,8 +16,8 @@ abstract class HasOneOrMany extends Relation { /** * Create a new has many relationship instance. * - * @param Illuminate\Database\Eloquent\Builder $query - * @param Illuminate\Database\Eloquent\Model $parent + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $parent * @param string $foreignKey * @return void */ @@ -55,7 +55,7 @@ public function addEagerConstraints(array $models) * Match the eagerly loaded results to their single parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ @@ -68,7 +68,7 @@ public function matchOne(array $models, Collection $results, $relation) * Match the eagerly loaded results to their many parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ @@ -81,7 +81,7 @@ public function matchMany(array $models, Collection $results, $relation) * Match the eagerly loaded results to their many parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @param string $type * @return array @@ -125,7 +125,7 @@ protected function getRelationValue(array $dictionary, $key, $type) /** * Build model dictionary keyed by the relation's foreign key. * - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @return array */ protected function buildDictionary(Collection $results) @@ -146,8 +146,8 @@ protected function buildDictionary(Collection $results) /** * Attach a model instance to the parent model. * - * @param Illuminate\Database\Eloquent\Model $model - * @return Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\Model $model + * @return \Illuminate\Database\Eloquent\Model */ public function save(Model $model) { @@ -162,7 +162,7 @@ public function save(Model $model) * Create a new instance of the related model. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function create(array $attributes) { diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphMany.php b/src/Illuminate/Database/Eloquent/Relations/MorphMany.php index 5412042e90a5..710fab5fba59 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphMany.php @@ -35,7 +35,7 @@ public function initRelation(array $models, $relation) * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphOne.php b/src/Illuminate/Database/Eloquent/Relations/MorphOne.php index 3d7981d1190f..9d00c539b4a9 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphOne.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphOne.php @@ -35,7 +35,7 @@ public function initRelation(array $models, $relation) * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ diff --git a/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php b/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php index 58042eba0a28..407d3d0b98d1 100644 --- a/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php +++ b/src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php @@ -22,8 +22,8 @@ abstract class MorphOneOrMany extends HasOneOrMany { /** * Create a new has many relationship instance. * - * @param Illuminate\Database\Eloquent\Builder $query - * @param Illuminate\Database\Eloquent\Model $parent + * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $parent * @param string $morphName * @return void */ @@ -82,7 +82,7 @@ public function getAndResetWheres() * Create a new instance of the related model. * * @param array $attributes - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function create(array $attributes) { diff --git a/src/Illuminate/Database/Eloquent/Relations/Relation.php b/src/Illuminate/Database/Eloquent/Relations/Relation.php index 1f7d1aace593..b1f56db42e1d 100644 --- a/src/Illuminate/Database/Eloquent/Relations/Relation.php +++ b/src/Illuminate/Database/Eloquent/Relations/Relation.php @@ -9,21 +9,21 @@ abstract class Relation { /** * The Eloquent query builder instance. * - * @var Illuminate\Database\Eloquent\Builder + * @var \Illuminate\Database\Eloquent\Builder */ protected $query; /** * The parent model instance. * - * @var Illuminate\Database\Eloquent\Model + * @var \Illuminate\Database\Eloquent\Model */ protected $parent; /** * The related model instance. * - * @var Illuminate\Database\Eloquent\Model + * @var \Illuminate\Database\Eloquent\Model */ protected $related; @@ -71,7 +71,7 @@ abstract public function initRelation(array $models, $relation); * Match the eagerly loaded results to their parents. * * @param array $models - * @param Illuminate\Database\Eloquent\Collection $results + * @param \Illuminate\Database\Eloquent\Collection $results * @param string $relation * @return array */ @@ -133,7 +133,7 @@ protected function getKeys(array $models) /** * Get the underlying query for the relation. * - * @return Illuminate\Database\Eloquent\Builder + * @return \Illuminate\Database\Eloquent\Builder */ public function getQuery() { @@ -143,7 +143,7 @@ public function getQuery() /** * Get the base query builder driving the Eloquent builder. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function getBaseQuery() { @@ -163,7 +163,7 @@ public function getParent() /** * Get the related model of the relation. * - * @return Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model */ public function getRelated() { diff --git a/src/Illuminate/Database/Grammar.php b/src/Illuminate/Database/Grammar.php index 294eeacaff99..fec01bb829d8 100644 --- a/src/Illuminate/Database/Grammar.php +++ b/src/Illuminate/Database/Grammar.php @@ -122,7 +122,7 @@ public function parameter($value) /** * Get the value of a raw expression. * - * @param Illuminate\Database\Query\Expression $expression + * @param \Illuminate\Database\Query\Expression $expression * @return string */ public function getValue($expression) @@ -165,7 +165,7 @@ public function getTablePrefix() * Set the grammar's table prefix. * * @param string $prefix - * @return Illuminate\Database\Grammar + * @return \Illuminate\Database\Grammar */ public function setTablePrefix($prefix) { diff --git a/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php b/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php index 76008985afd9..a71ebddeb0e7 100644 --- a/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php +++ b/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php @@ -9,7 +9,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface { /** * The database connection resolver instance. * - * @var Illuminate\Database\ConnectionResolverInterface + * @var \Illuminate\Database\ConnectionResolverInterface */ protected $resolver; @@ -30,7 +30,7 @@ class DatabaseMigrationRepository implements MigrationRepositoryInterface { /** * Create a new database migration repository instance. * - * @param Illuminate\Database\ConnectionResolverInterface $resolver + * @param \Illuminate\Database\ConnectionResolverInterface $resolver * @return void */ public function __construct(Resolver $resolver, $table) @@ -143,7 +143,7 @@ public function repositoryExists() /** * Get a query builder for the migration table. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function table() { @@ -153,7 +153,7 @@ protected function table() /** * Get the connection resolver instance. * - * @return Illuminate\Database\ConnectionResolverInterface + * @return \Illuminate\Database\ConnectionResolverInterface */ public function getConnectionResolver() { @@ -163,7 +163,7 @@ public function getConnectionResolver() /** * Resolve the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { diff --git a/src/Illuminate/Database/Migrations/MigrationCreator.php b/src/Illuminate/Database/Migrations/MigrationCreator.php index c0547bf02f5f..3ec85d84fdcc 100644 --- a/src/Illuminate/Database/Migrations/MigrationCreator.php +++ b/src/Illuminate/Database/Migrations/MigrationCreator.php @@ -8,7 +8,7 @@ class MigrationCreator { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; @@ -22,7 +22,7 @@ class MigrationCreator { /** * Create a new migration creator instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(Filesystem $files) @@ -159,7 +159,7 @@ public function getStubPath() /** * Get the filesystem instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem\Filesystem */ public function getFilesystem() { diff --git a/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php b/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php index 41e24eb9d684..a6263f1aff25 100644 --- a/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php +++ b/src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php @@ -28,7 +28,7 @@ public function log($file, $batch); /** * Remove that a migration from the log. * - * @param StdClass $migration + * @param \StdClass $migration * @return void */ public function delete($migration); diff --git a/src/Illuminate/Database/Migrations/Migrator.php b/src/Illuminate/Database/Migrations/Migrator.php index e4fb63057960..b5dfa9dfdabe 100644 --- a/src/Illuminate/Database/Migrations/Migrator.php +++ b/src/Illuminate/Database/Migrations/Migrator.php @@ -12,21 +12,21 @@ class Migrator { /** * The migration repository implementation. * - * @var Illuminate\Database\Migrations\MigrationRepositoryInterface + * @var \Illuminate\Database\Migrations\MigrationRepositoryInterface */ protected $repository; /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * The connection resolver instance. * - * @var Illuminate\Database\ConnectionResolverInterface + * @var \Illuminate\Database\ConnectionResolverInterface */ protected $resolver; @@ -47,9 +47,9 @@ class Migrator { /** * Create a new migrator instance. * - * @param Illuminate\Database\Migrations\MigrationRepositoryInterface $repository - * @param Illuminate\Database\ConnectionResolverInterface $resolver - * @param Illuminate\Filesystem $files + * @param \Illuminate\Database\Migrations\MigrationRepositoryInterface $repository + * @param \Illuminate\Database\ConnectionResolverInterface $resolver + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(MigrationRepositoryInterface $repository, @@ -180,7 +180,7 @@ public function rollback($pretend = false) /** * Run "down" a migration instance. * - * @param StdClass $migration + * @param \StdClass $migration * @param bool $pretend * @return void */ @@ -314,7 +314,7 @@ public function getNotes() /** * Resolve the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function resolveConnection() { @@ -342,7 +342,7 @@ public function setConnection($name) /** * Get the migration repository instance. * - * @return Illuminate\Database\Migrations\MigrationRepositoryInterface + * @return \Illuminate\Database\Migrations\MigrationRepositoryInterface */ public function getRepository() { @@ -362,7 +362,7 @@ public function repositoryExists() /** * Get the file system instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem\Filesystem */ public function getFilesystem() { diff --git a/src/Illuminate/Database/MySqlConnection.php b/src/Illuminate/Database/MySqlConnection.php index bcf7f26a6e7c..9dcdcfc66c74 100644 --- a/src/Illuminate/Database/MySqlConnection.php +++ b/src/Illuminate/Database/MySqlConnection.php @@ -5,7 +5,7 @@ class MySqlConnection extends Connection { /** * Get a schema builder instance for the connection. * - * @return Illuminate\Database\Schema\Builder + * @return \Illuminate\Database\Schema\Builder */ public function getSchemaBuilder() { @@ -17,7 +17,7 @@ public function getSchemaBuilder() /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -27,7 +27,7 @@ protected function getDefaultQueryGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() { diff --git a/src/Illuminate/Database/PostgresConnection.php b/src/Illuminate/Database/PostgresConnection.php index f9fc023e8cff..e4c32dd0c7f3 100644 --- a/src/Illuminate/Database/PostgresConnection.php +++ b/src/Illuminate/Database/PostgresConnection.php @@ -5,7 +5,7 @@ class PostgresConnection extends Connection { /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -15,7 +15,7 @@ protected function getDefaultQueryGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() { @@ -25,7 +25,7 @@ protected function getDefaultSchemaGrammar() /** * Get the default post processor instance. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ protected function getDefaultPostProcessor() { diff --git a/src/Illuminate/Database/Query/Builder.php b/src/Illuminate/Database/Query/Builder.php index d22de29c31fd..355516df4d17 100644 --- a/src/Illuminate/Database/Query/Builder.php +++ b/src/Illuminate/Database/Query/Builder.php @@ -10,21 +10,21 @@ class Builder { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; /** * The database query grammar instance. * - * @var Illuminate\Database\Query\Grammars\Grammar + * @var \Illuminate\Database\Query\Grammars\Grammar */ protected $grammar; /** * The database query post processor instance. * - * @var Illuminate\Database\Query\Processors\Processor + * @var \Illuminate\Database\Query\Processors\Processor */ protected $processor; @@ -125,9 +125,9 @@ class Builder { /** * Create a new query builder instance. * - * @param Illuminate\Database\ConnectionInterface $connection - * @param Illuminate\Database\Query\Grammars\Grammar $grammar - * @param Illuminate\Database\Query\Processors\Processor $processor + * @param \Illuminate\Database\ConnectionInterface $connection + * @param \Illuminate\Database\Query\Grammars\Grammar $grammar + * @param \Illuminate\Database\Query\Processors\Processor $processor * @return void */ public function __construct(ConnectionInterface $connection, @@ -143,7 +143,7 @@ public function __construct(ConnectionInterface $connection, * Set the columns to be selected. * * @param array $columns - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function select($columns = array('*')) { @@ -155,7 +155,7 @@ public function select($columns = array('*')) /** * Force the query to only return distinct results. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function distinct() { @@ -168,7 +168,7 @@ public function distinct() * Set the table which the query is targeting. * * @param string $table - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function from($table) { @@ -185,7 +185,7 @@ public function from($table) * @param string $operator * @param string $second * @param string $type - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function join($table, $first, $operator = null, $second = null, $type = 'inner') { @@ -221,7 +221,7 @@ public function join($table, $first, $operator = null, $second = null, $type = ' * @param string $first * @param string $operator * @param string $second - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function leftJoin($table, $first, $operator = null, $second = null) { @@ -235,7 +235,7 @@ public function leftJoin($table, $first, $operator = null, $second = null) * @param string $operator * @param mixed $value * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function where($column, $operator = null, $value = null, $boolean = 'and') { @@ -284,7 +284,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and' * @param string $column * @param string $operator * @param mixed $value - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhere($column, $operator = null, $value = null) { @@ -297,7 +297,7 @@ public function orWhere($column, $operator = null, $value = null) * @param string $sql * @param array $bindings * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereRaw($sql, array $bindings = array(), $boolean = 'and') { @@ -315,7 +315,7 @@ public function whereRaw($sql, array $bindings = array(), $boolean = 'and') * * @param string $sql * @param array $bindings - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereRaw($sql, array $bindings = array()) { @@ -328,7 +328,7 @@ public function orWhereRaw($sql, array $bindings = array()) * @param string $column * @param array $values * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereBetween($column, array $values, $boolean = 'and') { @@ -346,7 +346,7 @@ public function whereBetween($column, array $values, $boolean = 'and') * * @param string $column * @param array $values - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereBetween($column, array $values) { @@ -358,7 +358,7 @@ public function orWhereBetween($column, array $values) * * @param Closure $callback * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereNested(Closure $callback, $boolean = 'and') { @@ -390,7 +390,7 @@ public function whereNested(Closure $callback, $boolean = 'and') * @param string $operator * @param Closure $callback * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function whereSub($column, $operator, Closure $callback, $boolean) { @@ -416,7 +416,7 @@ protected function whereSub($column, $operator, Closure $callback, $boolean) * @param Closure $callback * @param string $boolean * @param bool $not - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereExists(Closure $callback, $boolean = 'and', $not = false) { @@ -441,7 +441,7 @@ public function whereExists(Closure $callback, $boolean = 'and', $not = false) * * @param Closure $callback * @param bool $not - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereExists(Closure $callback, $not = false) { @@ -453,7 +453,7 @@ public function orWhereExists(Closure $callback, $not = false) * * @param Closure $calback * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereNotExists(Closure $callback, $boolean = 'and') { @@ -464,7 +464,7 @@ public function whereNotExists(Closure $callback, $boolean = 'and') * Add a where not exists clause to the query. * * @param Closure $calback - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereNotExists(Closure $callback) { @@ -478,7 +478,7 @@ public function orWhereNotExists(Closure $callback) * @param mixed $values * @param string $boolean * @param bool $not - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereIn($column, $values, $boolean = 'and', $not = false) { @@ -505,7 +505,7 @@ public function whereIn($column, $values, $boolean = 'and', $not = false) * @param string $column * @param mixed $values * @param mixed $value - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereIn($column, $values) { @@ -518,7 +518,7 @@ public function orWhereIn($column, $values) * @param string $column * @param mixed $values * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereNotIn($column, $values, $boolean = 'and') { @@ -530,7 +530,7 @@ public function whereNotIn($column, $values, $boolean = 'and') * * @param string $column * @param mixed $values - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereNotIn($column, $values) { @@ -544,7 +544,7 @@ public function orWhereNotIn($column, $values) * @param Closure $callback * @param string $boolean * @param bool $not - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ protected function whereInSub($column, Closure $callback, $boolean, $not) { @@ -570,7 +570,7 @@ protected function whereInSub($column, Closure $callback, $boolean, $not) * @param string $column * @param string $boolean * @param bool $not - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereNull($column, $boolean = 'and', $not = false) { @@ -585,7 +585,7 @@ public function whereNull($column, $boolean = 'and', $not = false) * Add an "or where null" clause to the query. * * @param string $column - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereNull($column) { @@ -597,7 +597,7 @@ public function orWhereNull($column) * * @param string $column * @param string $boolean - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function whereNotNull($column, $boolean = 'and') { @@ -608,7 +608,7 @@ public function whereNotNull($column, $boolean = 'and') * Add an "or where not null" clause to the query. * * @param string $column - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orWhereNotNull($column) { @@ -619,7 +619,7 @@ public function orWhereNotNull($column) * Add a "group by" clause to the query. * * @param dynamic $columns - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function groupBy() { @@ -634,7 +634,7 @@ public function groupBy() * @param string $column * @param string $operator * @param string $value - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function having($column, $operator = null, $value = null) { @@ -650,7 +650,7 @@ public function having($column, $operator = null, $value = null) * * @param string $column * @param string $direction - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function orderBy($column, $direction = 'asc') { @@ -663,7 +663,7 @@ public function orderBy($column, $direction = 'asc') * Set the "offset" value of the query. * * @param int $value - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function skip($value) { @@ -676,7 +676,7 @@ public function skip($value) * Set the "limit" value of the query. * * @param int $value - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function take($value) { @@ -690,7 +690,7 @@ public function take($value) * * @param int $page * @param int $perPage - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function forPage($page, $perPage = 15) { @@ -813,7 +813,7 @@ public function lists($column, $key = null) * * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ public function paginate($perPage = 15, $columns = array('*')) { @@ -832,10 +832,10 @@ public function paginate($perPage = 15, $columns = array('*')) /** * Create a paginator for a grouped pagination statement. * - * @param Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ protected function groupedPaginate($paginator, $perPage, $columns) { @@ -847,10 +847,10 @@ protected function groupedPaginate($paginator, $perPage, $columns) /** * Build a paginator instance from a raw result array. * - * @param Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param array $results * @param int $perPage - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ public function buildRawPaginator($paginator, $results, $perPage) { @@ -867,10 +867,10 @@ public function buildRawPaginator($paginator, $results, $perPage) /** * Create a paginator for an un-grouped pagination statement. * - * @param Illuminate\Pagination\Environment $paginator + * @param \Illuminate\Pagination\Environment $paginator * @param int $perPage * @param array $columns - * @return Illuminate\Pagination\Paginator + * @return \Illuminate\Pagination\Paginator */ protected function ungroupedPaginate($paginator, $perPage, $columns) { @@ -1098,7 +1098,7 @@ public function delete($id = null) /** * Get a new instance of the query builder. * - * @return Illuminate\Database\Query\Builder + * @return \Illuminate\Database\Query\Builder */ public function newQuery() { @@ -1151,7 +1151,7 @@ protected function cleanBindings(array $bindings) * Create a raw database expression. * * @param mixed $value - * @return Illuminate\Database\Query\Expression + * @return \Illuminate\Database\Query\Expression */ public function raw($value) { @@ -1182,7 +1182,7 @@ public function setBindings(array $bindings) /** * Merge an array of bindings into our bindings. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return void */ public function mergeBindings(Builder $query) @@ -1193,7 +1193,7 @@ public function mergeBindings(Builder $query) /** * Get the database connection instance. * - * @return Illuminate\Database\ConnectionInterface + * @return \Illuminate\Database\ConnectionInterface */ public function getConnection() { @@ -1203,7 +1203,7 @@ public function getConnection() /** * Get the database query processor instance. * - * @return Illuminate\Database\Query\Processors\Processor + * @return \Illuminate\Database\Query\Processors\Processor */ public function getProcessor() { @@ -1213,7 +1213,7 @@ public function getProcessor() /** * Get the query grammar instance. * - * @return Illuminate\Database\Grammar + * @return \Illuminate\Database\Grammar */ public function getGrammar() { diff --git a/src/Illuminate/Database/Query/Grammars/Grammar.php b/src/Illuminate/Database/Query/Grammars/Grammar.php index b0752d69d3cb..cea802ba820e 100644 --- a/src/Illuminate/Database/Query/Grammars/Grammar.php +++ b/src/Illuminate/Database/Query/Grammars/Grammar.php @@ -70,7 +70,7 @@ protected function compileComponents(Builder $query) /** * Compile an aggregated select clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $aggregate * @return string */ @@ -92,7 +92,7 @@ protected function compileAggregate(Builder $query, $aggregate) /** * Compile the "select *" portion of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $columns * @return string */ @@ -111,7 +111,7 @@ protected function compileColumns(Builder $query, $columns) /** * Compile the "from" portion of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param string $table * @return string */ @@ -123,7 +123,7 @@ protected function compileFrom(Builder $query, $table) /** * Compile the "join" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $joins * @return string */ @@ -181,7 +181,7 @@ protected function compileJoinConstraint(array $clause) /** * Compile the "where" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return string */ protected function compileWheres(Builder $query) @@ -214,7 +214,7 @@ protected function compileWheres(Builder $query) /** * Compile a nested where clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -228,7 +228,7 @@ protected function whereNested(Builder $query, $where) /** * Compile a where condition with a sub-select. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -242,7 +242,7 @@ protected function whereSub(Builder $query, $where) /** * Compile a basic where clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -256,7 +256,7 @@ protected function whereBasic(Builder $query, $where) /** * Compile a "between" where clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -268,7 +268,7 @@ protected function whereBetween(Builder $query, $where) /** * Compile a where exists clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -280,7 +280,7 @@ protected function whereExists(Builder $query, $where) /** * Compile a where exists clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -292,7 +292,7 @@ protected function whereNotExists(Builder $query, $where) /** * Compile a "where in" clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -306,7 +306,7 @@ protected function whereIn(Builder $query, $where) /** * Compile a "where not in" clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -320,7 +320,7 @@ protected function whereNotIn(Builder $query, $where) /** * Compile a where in sub-select clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -334,7 +334,7 @@ protected function whereInSub(Builder $query, $where) /** * Compile a where not in sub-select clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -348,7 +348,7 @@ protected function whereNotInSub(Builder $query, $where) /** * Compile a "where null" clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -360,7 +360,7 @@ protected function whereNull(Builder $query, $where) /** * Compile a "where not null" clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -372,7 +372,7 @@ protected function whereNotNull(Builder $query, $where) /** * Compile a raw where clause. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $where * @return string */ @@ -384,7 +384,7 @@ protected function whereRaw(Builder $query, $where) /** * Compile the "group by" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $groups * @return string */ @@ -396,7 +396,7 @@ protected function compileGroups(Builder $query, $groups) /** * Compile the "having" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $havings * @return string */ @@ -418,7 +418,7 @@ protected function compileHavings(Builder $query, $havings) /** * Compile the "order by" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $orders * @return string */ @@ -436,7 +436,7 @@ protected function compileOrders(Builder $query, $orders) /** * Compile the "limit" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param int $limit * @return string */ @@ -448,7 +448,7 @@ protected function compileLimit(Builder $query, $limit) /** * Compile the "offset" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param int $offset * @return string */ @@ -460,7 +460,7 @@ protected function compileOffset(Builder $query, $offset) /** * Compile an insert statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @return string */ @@ -493,7 +493,7 @@ public function compileInsert(Builder $query, array $values) /** * Compile an insert and get ID statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @param string $sequence * @return string @@ -506,7 +506,7 @@ public function compileInsertGetId(Builder $query, $values, $sequence) /** * Compile an update statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @return string */ @@ -537,7 +537,7 @@ public function compileUpdate(Builder $query, $values) /** * Compile a delete statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @return string */ diff --git a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php index 685eead0edba..36a44cc52754 100644 --- a/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Query/Grammars/PostgresGrammar.php @@ -7,7 +7,7 @@ class PostgresGrammar extends Grammar { /** * Compile an insert and get ID statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @param string $sequence * @return string diff --git a/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php b/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php index 4a59552d690e..d60259ba1bcc 100644 --- a/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php +++ b/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php @@ -7,7 +7,7 @@ class SQLiteGrammar extends Grammar { /** * Compile the "order by" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $orders * @return string */ @@ -25,7 +25,7 @@ protected function compileOrders(Builder $query, $orders) /** * Compile an insert statement into SQL. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $values * @return string */ diff --git a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php b/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php index a059f84ae4a1..1b57e8a8f9fb 100644 --- a/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php +++ b/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php @@ -28,7 +28,7 @@ public function compileSelect(Builder $query) /** * Compile the "select *" portion of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $columns * @return string */ @@ -52,7 +52,7 @@ protected function compileColumns(Builder $query, $columns) /** * Create a full ANSI offset clause for the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $components * @return string */ @@ -104,7 +104,7 @@ protected function compileOver($orderings) /** * Compile the limit / offset row constraint for a query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return string */ protected function compileRowConstraint($query) @@ -136,7 +136,7 @@ protected function compileTableExpression($sql, $constraint) /** * Compile the "limit" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param int $limit * @return string */ @@ -148,7 +148,7 @@ protected function compileLimit(Builder $query, $limit) /** * Compile the "offset" portions of the query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param int $offset * @return string */ diff --git a/src/Illuminate/Database/Query/JoinClause.php b/src/Illuminate/Database/Query/JoinClause.php index b840dcf8c121..d3f610ad2fd4 100644 --- a/src/Illuminate/Database/Query/JoinClause.php +++ b/src/Illuminate/Database/Query/JoinClause.php @@ -43,7 +43,7 @@ public function __construct($type, $table) * @param string $operator * @param string $second * @param string $boolean - * @return Illuminate\Database\Query\JoinClause + * @return \Illuminate\Database\Query\JoinClause */ public function on($first, $operator, $second, $boolean = 'and') { @@ -58,7 +58,7 @@ public function on($first, $operator, $second, $boolean = 'and') * @param string $first * @param string $operator * @param string $second - * @return Illuminate\Database\Query\JoinClause + * @return \Illuminate\Database\Query\JoinClause */ public function orOn($first, $operator, $second) { diff --git a/src/Illuminate/Database/Query/Processors/PostgresProcessor.php b/src/Illuminate/Database/Query/Processors/PostgresProcessor.php index 9808cbfb311c..d13e2ff3b068 100644 --- a/src/Illuminate/Database/Query/Processors/PostgresProcessor.php +++ b/src/Illuminate/Database/Query/Processors/PostgresProcessor.php @@ -7,7 +7,7 @@ class PostgresProcessor extends Processor { /** * Process an "insert get ID" query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param string $sql * @param array $values * @param string $sequence diff --git a/src/Illuminate/Database/Query/Processors/Processor.php b/src/Illuminate/Database/Query/Processors/Processor.php index 1d25fdb23286..3dd1e311f659 100644 --- a/src/Illuminate/Database/Query/Processors/Processor.php +++ b/src/Illuminate/Database/Query/Processors/Processor.php @@ -7,7 +7,7 @@ class Processor { /** * Process the results of a "select" query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param array $results * @return array */ @@ -19,7 +19,7 @@ public function processSelect(Builder $query, $results) /** * Process an "insert get ID" query. * - * @param Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @param string $sql * @param array $values * @param string $sequence diff --git a/src/Illuminate/Database/SQLiteConnection.php b/src/Illuminate/Database/SQLiteConnection.php index 37f3c551ece4..df27fcc881c8 100644 --- a/src/Illuminate/Database/SQLiteConnection.php +++ b/src/Illuminate/Database/SQLiteConnection.php @@ -5,7 +5,7 @@ class SQLiteConnection extends Connection { /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -15,7 +15,7 @@ protected function getDefaultQueryGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() { diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php index 0adbbb72ff0a..49c8552d24c9 100644 --- a/src/Illuminate/Database/Schema/Blueprint.php +++ b/src/Illuminate/Database/Schema/Blueprint.php @@ -45,8 +45,8 @@ public function __construct($table, Closure $callback = null) /** * Execute the blueprint against the database. * - * @param Illuminate\Database\Connection $connection - * @param Illuminate\Database\Schema\Grammars\Grammar $grammar + * @param \Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar * @return void */ public function build(Connection $connection, Grammar $grammar) @@ -60,7 +60,7 @@ public function build(Connection $connection, Grammar $grammar) /** * Get the raw SQL statements for the blueprint. * - * @param Illuminate\Database\Schema\Grammars\Grammar $grammar + * @param \Illuminate\Database\Schema\Grammars\Grammar $grammar * @return array */ public function toSql(Grammar $grammar) @@ -155,7 +155,7 @@ protected function creating() /** * Indicate that the table needs to be created. * - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function create() { @@ -165,7 +165,7 @@ public function create() /** * Indicate that the table should be dropped. * - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function drop() { @@ -175,7 +175,7 @@ public function drop() /** * Indicate that the table should be dropped if it exists. * - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropIfExists() { @@ -186,7 +186,7 @@ public function dropIfExists() * Indicate that the given columns should be dropped. * * @param string|array $columns - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropColumn($columns) { @@ -199,7 +199,7 @@ public function dropColumn($columns) * Indicate that the given columns should be dropped. * * @param dynamic - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropColumns() { @@ -210,7 +210,7 @@ public function dropColumns() * Indicate that the given primary key should be dropped. * * @param string|array $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropPrimary($index = null) { @@ -221,7 +221,7 @@ public function dropPrimary($index = null) * Indicate that the given unique key should be dropped. * * @param string|array $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropUnique($index) { @@ -232,7 +232,7 @@ public function dropUnique($index) * Indicate that the given index should be dropped. * * @param string|array $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropIndex($index) { @@ -243,7 +243,7 @@ public function dropIndex($index) * Indicate that the given foreign key should be dropped. * * @param string $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dropForeign($index) { @@ -254,7 +254,7 @@ public function dropForeign($index) * Rename the table to a given name. * * @param string $to - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function rename($to) { @@ -266,7 +266,7 @@ public function rename($to) * * @param string|array $columns * @param string $name - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function primary($columns, $name = null) { @@ -278,7 +278,7 @@ public function primary($columns, $name = null) * * @param string|array $columns * @param string $name - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function unique($columns, $name = null) { @@ -290,7 +290,7 @@ public function unique($columns, $name = null) * * @param string|array $columns * @param string $name - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function index($columns, $name = null) { @@ -302,7 +302,7 @@ public function index($columns, $name = null) * * @param string|array $columns * @param string $name - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function foreign($columns, $name = null) { @@ -313,7 +313,7 @@ public function foreign($columns, $name = null) * Create a new auto-incrementing column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function increments($column) { @@ -325,7 +325,7 @@ public function increments($column) * * @param string $column * @param int $length - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function string($column, $length = 255) { @@ -336,7 +336,7 @@ public function string($column, $length = 255) * Create a new text column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function text($column) { @@ -347,7 +347,7 @@ public function text($column) * Create a new integer column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function integer($column, $autoIncrement = false) { @@ -360,7 +360,7 @@ public function integer($column, $autoIncrement = false) * @param string $column * @param int $total * @param int $places - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function float($column, $total = 8, $places = 2) { @@ -373,7 +373,7 @@ public function float($column, $total = 8, $places = 2) * @param string $column * @param int $total * @param int $places - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function decimal($column, $total = 8, $places = 2) { @@ -384,7 +384,7 @@ public function decimal($column, $total = 8, $places = 2) * Create a new boolean column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function boolean($column) { @@ -396,7 +396,7 @@ public function boolean($column) * * @param string $column * @param array $allowed - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function enum($column, array $allowed) { @@ -407,7 +407,7 @@ public function enum($column, array $allowed) * Create a new date column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function date($column) { @@ -418,7 +418,7 @@ public function date($column) * Create a new date-time column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function dateTime($column) { @@ -429,7 +429,7 @@ public function dateTime($column) * Create a new time column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function time($column) { @@ -440,7 +440,7 @@ public function time($column) * Create a new timestamp column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function timestamp($column) { @@ -463,7 +463,7 @@ public function timestamps() * Create a new binary column on the table. * * @param string $column - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ public function binary($column) { @@ -475,7 +475,7 @@ public function binary($column) * * @param string $type * @param string|array $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ protected function dropIndexCommand($type, $index) { @@ -500,7 +500,7 @@ protected function dropIndexCommand($type, $index) * @param string $type * @param string|array $columns * @param string $index - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ protected function indexCommand($type, $columns, $index) { @@ -537,7 +537,7 @@ protected function createIndexName($type, array $columns) * @param string $type * @param string $name * @param array $parameters - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ protected function addColumn($type, $name, array $parameters = array()) { @@ -553,7 +553,7 @@ protected function addColumn($type, $name, array $parameters = array()) * * @param string $name * @param array $parameters - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ protected function addCommand($name, array $parameters = array()) { @@ -567,7 +567,7 @@ protected function addCommand($name, array $parameters = array()) * * @param string $name * @param array $parameters - * @return Illuminate\Support\Fluent + * @return \Illuminate\Support\Fluent */ protected function createCommand($name, array $parameters = array()) { diff --git a/src/Illuminate/Database/Schema/Builder.php b/src/Illuminate/Database/Schema/Builder.php index 59619915b957..b202779c7b7a 100644 --- a/src/Illuminate/Database/Schema/Builder.php +++ b/src/Illuminate/Database/Schema/Builder.php @@ -9,21 +9,21 @@ class Builder { /** * The database connection instance. * - * @var Illuminate\Database\Connection + * @var \Illuminate\Database\Connection */ protected $connection; /** * The schema grammar instance. * - * @var Illuminate\Database\Schema\Grammars\Grammar + * @var \Illuminate\Database\Schema\Grammars\Grammar */ protected $grammar; /** * Create a new database Schema manager. * - * @param Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Connection $connection * @return void */ public function __construct(Connection $connection) @@ -52,7 +52,7 @@ public function hasTable($table) * * @param string $table * @param Closure $callback - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ public function table($table, Closure $callback) { @@ -64,7 +64,7 @@ public function table($table, Closure $callback) * * @param string $table * @param Closure $callback - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ public function create($table, Closure $callback) { @@ -81,7 +81,7 @@ public function create($table, Closure $callback) * Drop a table from the schema. * * @param string $table - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ public function drop($table) { @@ -96,7 +96,7 @@ public function drop($table) * Drop a table from the schema if it exists. * * @param string $table - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ public function dropIfExists($table) { @@ -112,7 +112,7 @@ public function dropIfExists($table) * * @param string $from * @param string $to - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ public function rename($from, $to) { @@ -126,7 +126,7 @@ public function rename($from, $to) /** * Execute the blueprint to build / modify the table. * - * @param Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Database\Schema\Blueprint $blueprint * @return void */ protected function build(Blueprint $blueprint) @@ -139,7 +139,7 @@ protected function build(Blueprint $blueprint) * * @param string $table * @param Closure $callback - * @return Illuminate\Database\Schema\Blueprint + * @return \Illuminate\Database\Schema\Blueprint */ protected function createBlueprint($table, Closure $callback = null) { @@ -149,7 +149,7 @@ protected function createBlueprint($table, Closure $callback = null) /** * Get the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -159,8 +159,8 @@ public function getConnection() /** * Set the database connection instance. * - * @param Illuminate\Database\Connection - * @return Illuminate\Database\Schema + * @param \Illuminate\Database\Connection + * @return \Illuminate\Support\Facades\Schema */ public function setConnection(Connection $connection) { diff --git a/src/Illuminate/Database/Schema/Grammars/Grammar.php b/src/Illuminate/Database/Schema/Grammars/Grammar.php index 6eab37d20c63..acba5e9f57fb 100644 --- a/src/Illuminate/Database/Schema/Grammars/Grammar.php +++ b/src/Illuminate/Database/Schema/Grammars/Grammar.php @@ -9,8 +9,8 @@ abstract class Grammar extends BaseGrammar { /** * Compile a foreign key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileForeign(Blueprint $blueprint, Fluent $command) @@ -49,7 +49,7 @@ public function compileForeign(Blueprint $blueprint, Fluent $command) /** * Compile the blueprint's column definitions. * - * @param Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Database\Schema\Blueprint $blueprint * @return array */ protected function getColumns(Blueprint $blueprint) @@ -73,8 +73,8 @@ protected function getColumns(Blueprint $blueprint) * Add the column modifiers to the definition. * * @param string $sql - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string */ protected function addModifiers($sql, Blueprint $blueprint, Fluent $column) @@ -90,8 +90,8 @@ protected function addModifiers($sql, Blueprint $blueprint, Fluent $column) /** * Get the primary key command if it exists on the blueprint. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @return Illuminate\Support\Fluent|null + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @return \Illuminate\Support\Fluent|null */ protected function getCommandByName(Blueprint $blueprint, $name) { @@ -106,7 +106,7 @@ protected function getCommandByName(Blueprint $blueprint, $name) /** * Get all of the commands with a given name. * - * @param Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Database\Schema\Blueprint $blueprint * @param string $name * @return array */ @@ -121,7 +121,7 @@ protected function getCommandsByName(Blueprint $blueprint, $name) /** * Get the SQL for the column data type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function getType(Fluent $column) diff --git a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 42f2433634b3..13f3312be19f 100644 --- a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -32,8 +32,8 @@ public function compileTableExists() /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileCreate(Blueprint $blueprint, Fluent $command) @@ -46,8 +46,8 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileAdd(Blueprint $blueprint, Fluent $command) @@ -62,8 +62,8 @@ public function compileAdd(Blueprint $blueprint, Fluent $command) /** * Compile a primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compilePrimary(Blueprint $blueprint, Fluent $command) @@ -76,8 +76,8 @@ public function compilePrimary(Blueprint $blueprint, Fluent $command) /** * Compile a unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileUnique(Blueprint $blueprint, Fluent $command) @@ -88,8 +88,8 @@ public function compileUnique(Blueprint $blueprint, Fluent $command) /** * Compile a plain index key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileIndex(Blueprint $blueprint, Fluent $command) @@ -100,8 +100,8 @@ public function compileIndex(Blueprint $blueprint, Fluent $command) /** * Compile an index creation command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @param string $type * @return string */ @@ -117,8 +117,8 @@ protected function compileKey(Blueprint $blueprint, Fluent $command, $type) /** * Compile a drop table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDrop(Blueprint $blueprint, Fluent $command) @@ -129,8 +129,8 @@ public function compileDrop(Blueprint $blueprint, Fluent $command) /** * Compile a drop table (if exists) command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) @@ -141,8 +141,8 @@ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) /** * Compile a drop column command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropColumn(Blueprint $blueprint, Fluent $command) @@ -157,8 +157,8 @@ public function compileDropColumn(Blueprint $blueprint, Fluent $command) /** * Compile a drop primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) @@ -169,8 +169,8 @@ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) /** * Compile a drop unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropUnique(Blueprint $blueprint, Fluent $command) @@ -183,8 +183,8 @@ public function compileDropUnique(Blueprint $blueprint, Fluent $command) /** * Compile a drop index command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIndex(Blueprint $blueprint, Fluent $command) @@ -197,8 +197,8 @@ public function compileDropIndex(Blueprint $blueprint, Fluent $command) /** * Compile a drop foreign key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropForeign(Blueprint $blueprint, Fluent $command) @@ -211,8 +211,8 @@ public function compileDropForeign(Blueprint $blueprint, Fluent $command) /** * Compile a rename table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileRename(Blueprint $blueprint, Fluent $command) @@ -225,7 +225,7 @@ public function compileRename(Blueprint $blueprint, Fluent $command) /** * Create the column definition for a string type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeString(Fluent $column) @@ -236,7 +236,7 @@ protected function typeString(Fluent $column) /** * Create the column definition for a text type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeText(Fluent $column) @@ -247,7 +247,7 @@ protected function typeText(Fluent $column) /** * Create the column definition for a integer type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeInteger(Fluent $column) @@ -258,7 +258,7 @@ protected function typeInteger(Fluent $column) /** * Create the column definition for a float type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeFloat(Fluent $column) @@ -269,7 +269,7 @@ protected function typeFloat(Fluent $column) /** * Create the column definition for a decimal type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDecimal(Fluent $column) @@ -280,7 +280,7 @@ protected function typeDecimal(Fluent $column) /** * Create the column definition for a boolean type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBoolean(Fluent $column) @@ -291,7 +291,7 @@ protected function typeBoolean(Fluent $column) /** * Create the column definition for a enum type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeEnum(Fluent $column) @@ -302,7 +302,7 @@ protected function typeEnum(Fluent $column) /** * Create the column definition for a date type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDate(Fluent $column) @@ -313,7 +313,7 @@ protected function typeDate(Fluent $column) /** * Create the column definition for a date-time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDateTime(Fluent $column) @@ -324,7 +324,7 @@ protected function typeDateTime(Fluent $column) /** * Create the column definition for a time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTime(Fluent $column) @@ -335,7 +335,7 @@ protected function typeTime(Fluent $column) /** * Create the column definition for a timestamp type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTimestamp(Fluent $column) @@ -346,7 +346,7 @@ protected function typeTimestamp(Fluent $column) /** * Create the column definition for a binary type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBinary(Fluent $column) @@ -357,8 +357,8 @@ protected function typeBinary(Fluent $column) /** * Get the SQL for an unsigned column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyUnsigned(Blueprint $blueprint, Fluent $column) @@ -372,8 +372,8 @@ protected function modifyUnsigned(Blueprint $blueprint, Fluent $column) /** * Get the SQL for a nullable column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) @@ -384,8 +384,8 @@ protected function modifyNullable(Blueprint $blueprint, Fluent $column) /** * Get the SQL for a default column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyDefault(Blueprint $blueprint, Fluent $column) @@ -399,8 +399,8 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column) /** * Get the SQL for an auto-increment column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyIncrement(Blueprint $blueprint, Fluent $column) diff --git a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index c8227e65c716..b3fc16112ce4 100644 --- a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -32,8 +32,8 @@ public function compileTableExists() /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileCreate(Blueprint $blueprint, Fluent $command) @@ -46,8 +46,8 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileAdd(Blueprint $blueprint, Fluent $command) @@ -62,8 +62,8 @@ public function compileAdd(Blueprint $blueprint, Fluent $command) /** * Compile a primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compilePrimary(Blueprint $blueprint, Fluent $command) @@ -76,8 +76,8 @@ public function compilePrimary(Blueprint $blueprint, Fluent $command) /** * Compile a unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileUnique(Blueprint $blueprint, Fluent $command) @@ -92,8 +92,8 @@ public function compileUnique(Blueprint $blueprint, Fluent $command) /** * Compile a plain index key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileIndex(Blueprint $blueprint, Fluent $command) @@ -106,8 +106,8 @@ public function compileIndex(Blueprint $blueprint, Fluent $command) /** * Compile a drop table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDrop(Blueprint $blueprint, Fluent $command) @@ -118,8 +118,8 @@ public function compileDrop(Blueprint $blueprint, Fluent $command) /** * Compile a drop table (if exists) command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) @@ -130,8 +130,8 @@ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) /** * Compile a drop column command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropColumn(Blueprint $blueprint, Fluent $command) @@ -146,8 +146,8 @@ public function compileDropColumn(Blueprint $blueprint, Fluent $command) /** * Compile a drop primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) @@ -160,8 +160,8 @@ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) /** * Compile a drop unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropUnique(Blueprint $blueprint, Fluent $command) @@ -174,8 +174,8 @@ public function compileDropUnique(Blueprint $blueprint, Fluent $command) /** * Compile a drop index command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIndex(Blueprint $blueprint, Fluent $command) @@ -186,8 +186,8 @@ public function compileDropIndex(Blueprint $blueprint, Fluent $command) /** * Compile a drop foreign key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropForeign(Blueprint $blueprint, Fluent $command) @@ -200,8 +200,8 @@ public function compileDropForeign(Blueprint $blueprint, Fluent $command) /** * Compile a rename table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileRename(Blueprint $blueprint, Fluent $command) @@ -214,7 +214,7 @@ public function compileRename(Blueprint $blueprint, Fluent $command) /** * Create the column definition for a string type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeString(Fluent $column) @@ -225,7 +225,7 @@ protected function typeString(Fluent $column) /** * Create the column definition for a text type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeText(Fluent $column) @@ -236,7 +236,7 @@ protected function typeText(Fluent $column) /** * Create the column definition for a integer type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeInteger(Fluent $column) @@ -247,7 +247,7 @@ protected function typeInteger(Fluent $column) /** * Create the column definition for a float type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeFloat(Fluent $column) @@ -258,7 +258,7 @@ protected function typeFloat(Fluent $column) /** * Create the column definition for a decimal type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDecimal(Fluent $column) @@ -269,7 +269,7 @@ protected function typeDecimal(Fluent $column) /** * Create the column definition for a boolean type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBoolean(Fluent $column) @@ -280,7 +280,7 @@ protected function typeBoolean(Fluent $column) /** * Create the column definition for an enum type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeEnum(Fluent $column) @@ -291,7 +291,7 @@ protected function typeEnum(Fluent $column) /** * Create the column definition for a date type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDate(Fluent $column) @@ -302,7 +302,7 @@ protected function typeDate(Fluent $column) /** * Create the column definition for a date-time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDateTime(Fluent $column) @@ -313,7 +313,7 @@ protected function typeDateTime(Fluent $column) /** * Create the column definition for a time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTime(Fluent $column) @@ -324,7 +324,7 @@ protected function typeTime(Fluent $column) /** * Create the column definition for a timestamp type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTimestamp(Fluent $column) @@ -335,7 +335,7 @@ protected function typeTimestamp(Fluent $column) /** * Create the column definition for a binary type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBinary(Fluent $column) @@ -346,8 +346,8 @@ protected function typeBinary(Fluent $column) /** * Get the SQL for a nullable column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) @@ -358,8 +358,8 @@ protected function modifyNullable(Blueprint $blueprint, Fluent $column) /** * Get the SQL for a default column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyDefault(Blueprint $blueprint, Fluent $column) @@ -373,8 +373,8 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column) /** * Get the SQL for an auto-increment column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyIncrement(Blueprint $blueprint, Fluent $column) diff --git a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php index af1fad4c343b..d8c6a2ae167e 100644 --- a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php @@ -32,8 +32,8 @@ public function compileTableExists() /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileCreate(Blueprint $blueprint, Fluent $command) @@ -55,7 +55,7 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) /** * Get the foreign key syntax for a table creation statement. * - * @param Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Database\Schema\Blueprint $blueprint * @return string|null */ protected function addForeignKeys(Blueprint $blueprint) @@ -84,7 +84,7 @@ protected function addForeignKeys(Blueprint $blueprint) /** * Get the primary key syntax for a table creation statement. * - * @param Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Database\Schema\Blueprint $blueprint * @return string|null */ protected function addPrimaryKeys(Blueprint $blueprint) @@ -102,8 +102,8 @@ protected function addPrimaryKeys(Blueprint $blueprint) /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileAdd(Blueprint $blueprint, Fluent $command) @@ -118,8 +118,8 @@ public function compileAdd(Blueprint $blueprint, Fluent $command) /** * Compile a unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileUnique(Blueprint $blueprint, Fluent $command) @@ -134,8 +134,8 @@ public function compileUnique(Blueprint $blueprint, Fluent $command) /** * Compile a plain index key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileIndex(Blueprint $blueprint, Fluent $command) @@ -150,8 +150,8 @@ public function compileIndex(Blueprint $blueprint, Fluent $command) /** * Compile a foreign key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileForeign(Blueprint $blueprint, Fluent $command) @@ -162,8 +162,8 @@ public function compileForeign(Blueprint $blueprint, Fluent $command) /** * Compile a drop table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDrop(Blueprint $blueprint, Fluent $command) @@ -174,8 +174,8 @@ public function compileDrop(Blueprint $blueprint, Fluent $command) /** * Compile a drop table (if exists) command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) @@ -186,8 +186,8 @@ public function compileDropIfExists(Blueprint $blueprint, Fluent $command) /** * Compile a drop column command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropColumn(Blueprint $blueprint, Fluent $command) @@ -198,8 +198,8 @@ public function compileDropColumn(Blueprint $blueprint, Fluent $command) /** * Compile a drop unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropUnique(Blueprint $blueprint, Fluent $command) @@ -210,8 +210,8 @@ public function compileDropUnique(Blueprint $blueprint, Fluent $command) /** * Compile a drop index command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIndex(Blueprint $blueprint, Fluent $command) @@ -222,8 +222,8 @@ public function compileDropIndex(Blueprint $blueprint, Fluent $command) /** * Compile a rename table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileRename(Blueprint $blueprint, Fluent $command) @@ -236,7 +236,7 @@ public function compileRename(Blueprint $blueprint, Fluent $command) /** * Create the column definition for a string type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeString(Fluent $column) @@ -247,7 +247,7 @@ protected function typeString(Fluent $column) /** * Create the column definition for a text type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeText(Fluent $column) @@ -258,7 +258,7 @@ protected function typeText(Fluent $column) /** * Create the column definition for a integer type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeInteger(Fluent $column) @@ -269,7 +269,7 @@ protected function typeInteger(Fluent $column) /** * Create the column definition for a float type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeFloat(Fluent $column) @@ -280,7 +280,7 @@ protected function typeFloat(Fluent $column) /** * Create the column definition for a decimal type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDecimal(Fluent $column) @@ -291,7 +291,7 @@ protected function typeDecimal(Fluent $column) /** * Create the column definition for a boolean type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBoolean(Fluent $column) @@ -302,7 +302,7 @@ protected function typeBoolean(Fluent $column) /** * Create the column definition for a enum type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeEnum(Fluent $column) @@ -313,7 +313,7 @@ protected function typeEnum(Fluent $column) /** * Create the column definition for a date type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDate(Fluent $column) @@ -324,7 +324,7 @@ protected function typeDate(Fluent $column) /** * Create the column definition for a date-time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDateTime(Fluent $column) @@ -335,7 +335,7 @@ protected function typeDateTime(Fluent $column) /** * Create the column definition for a time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTime(Fluent $column) @@ -346,7 +346,7 @@ protected function typeTime(Fluent $column) /** * Create the column definition for a timestamp type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTimestamp(Fluent $column) @@ -357,7 +357,7 @@ protected function typeTimestamp(Fluent $column) /** * Create the column definition for a binary type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBinary(Fluent $column) @@ -368,8 +368,8 @@ protected function typeBinary(Fluent $column) /** * Get the SQL for a nullable column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) @@ -380,8 +380,8 @@ protected function modifyNullable(Blueprint $blueprint, Fluent $column) /** * Get the SQL for a default column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyDefault(Blueprint $blueprint, Fluent $column) @@ -395,8 +395,8 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column) /** * Get the SQL for an auto-increment column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyIncrement(Blueprint $blueprint, Fluent $column) diff --git a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php index 12811ef5f48f..9f85a2ccf495 100644 --- a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php @@ -32,8 +32,8 @@ public function compileTableExists() /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileCreate(Blueprint $blueprint, Fluent $command) @@ -46,8 +46,8 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) /** * Compile a create table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileAdd(Blueprint $blueprint, Fluent $command) @@ -62,8 +62,8 @@ public function compileAdd(Blueprint $blueprint, Fluent $command) /** * Compile a primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compilePrimary(Blueprint $blueprint, Fluent $command) @@ -78,8 +78,8 @@ public function compilePrimary(Blueprint $blueprint, Fluent $command) /** * Compile a unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileUnique(Blueprint $blueprint, Fluent $command) @@ -94,8 +94,8 @@ public function compileUnique(Blueprint $blueprint, Fluent $command) /** * Compile a plain index key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileIndex(Blueprint $blueprint, Fluent $command) @@ -110,8 +110,8 @@ public function compileIndex(Blueprint $blueprint, Fluent $command) /** * Compile a drop table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDrop(Blueprint $blueprint, Fluent $command) @@ -122,8 +122,8 @@ public function compileDrop(Blueprint $blueprint, Fluent $command) /** * Compile a drop column command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropColumn(Blueprint $blueprint, Fluent $command) @@ -138,8 +138,8 @@ public function compileDropColumn(Blueprint $blueprint, Fluent $command) /** * Compile a drop primary key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) @@ -154,8 +154,8 @@ public function compileDropPrimary(Blueprint $blueprint, Fluent $command) /** * Compile a drop unique key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropUnique(Blueprint $blueprint, Fluent $command) @@ -168,8 +168,8 @@ public function compileDropUnique(Blueprint $blueprint, Fluent $command) /** * Compile a drop index command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropIndex(Blueprint $blueprint, Fluent $command) @@ -182,8 +182,8 @@ public function compileDropIndex(Blueprint $blueprint, Fluent $command) /** * Compile a drop foreign key command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileDropForeign(Blueprint $blueprint, Fluent $command) @@ -196,8 +196,8 @@ public function compileDropForeign(Blueprint $blueprint, Fluent $command) /** * Compile a rename table command. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $command + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $command * @return string */ public function compileRename(Blueprint $blueprint, Fluent $command) @@ -210,7 +210,7 @@ public function compileRename(Blueprint $blueprint, Fluent $command) /** * Create the column definition for a string type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeString(Fluent $column) @@ -221,7 +221,7 @@ protected function typeString(Fluent $column) /** * Create the column definition for a text type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeText(Fluent $column) @@ -232,7 +232,7 @@ protected function typeText(Fluent $column) /** * Create the column definition for a integer type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeInteger(Fluent $column) @@ -243,7 +243,7 @@ protected function typeInteger(Fluent $column) /** * Create the column definition for a float type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeFloat(Fluent $column) @@ -254,7 +254,7 @@ protected function typeFloat(Fluent $column) /** * Create the column definition for a decimal type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDecimal(Fluent $column) @@ -265,7 +265,7 @@ protected function typeDecimal(Fluent $column) /** * Create the column definition for a boolean type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBoolean(Fluent $column) @@ -276,7 +276,7 @@ protected function typeBoolean(Fluent $column) /** * Create the column definition for a enum type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeEnum(Fluent $column) @@ -287,7 +287,7 @@ protected function typeEnum(Fluent $column) /** * Create the column definition for a date type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDate(Fluent $column) @@ -298,7 +298,7 @@ protected function typeDate(Fluent $column) /** * Create the column definition for a date-time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeDateTime(Fluent $column) @@ -309,7 +309,7 @@ protected function typeDateTime(Fluent $column) /** * Create the column definition for a time type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTime(Fluent $column) @@ -320,7 +320,7 @@ protected function typeTime(Fluent $column) /** * Create the column definition for a timestamp type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeTimestamp(Fluent $column) @@ -331,7 +331,7 @@ protected function typeTimestamp(Fluent $column) /** * Create the column definition for a binary type. * - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Support\Fluent $column * @return string */ protected function typeBinary(Fluent $column) @@ -342,8 +342,8 @@ protected function typeBinary(Fluent $column) /** * Get the SQL for a nullable column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyNullable(Blueprint $blueprint, Fluent $column) @@ -354,8 +354,8 @@ protected function modifyNullable(Blueprint $blueprint, Fluent $column) /** * Get the SQL for a default column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyDefault(Blueprint $blueprint, Fluent $column) @@ -369,8 +369,8 @@ protected function modifyDefault(Blueprint $blueprint, Fluent $column) /** * Get the SQL for an auto-increment column modifier. * - * @param Illuminate\Database\Schema\Blueprint $blueprint - * @param Illuminate\Support\Fluent $column + * @param \Illuminate\Database\Schema\Blueprint $blueprint + * @param \Illuminate\Support\Fluent $column * @return string|null */ protected function modifyIncrement(Blueprint $blueprint, Fluent $column) diff --git a/src/Illuminate/Database/Seeder.php b/src/Illuminate/Database/Seeder.php index 3f5847f84757..cfadb7f6bbb3 100644 --- a/src/Illuminate/Database/Seeder.php +++ b/src/Illuminate/Database/Seeder.php @@ -8,14 +8,14 @@ class Seeder { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispatcher + * @var \Illuminate\Events\Dispatcher */ protected $events; @@ -29,8 +29,8 @@ class Seeder { /** * Create a new database seeder instance. * - * @param Illuminate\Filesystem $files - * @param Illuminate\Events\Dispatcher $events + * @param \Illuminate\Filesystem\Filesystem $files + * @param \Illuminate\Events\Dispatcher $events * @return void */ public function __construct(Filesystem $files, Dispatcher $events = null) @@ -42,7 +42,7 @@ public function __construct(Filesystem $files, Dispatcher $events = null) /** * Seed the given connection from the given path. * - * @param Illuminate\Database\Connection $connection + * @param \Illuminate\Database\Connection $connection * @param string $path * @return int */ diff --git a/src/Illuminate/Database/SqlServerConnection.php b/src/Illuminate/Database/SqlServerConnection.php index 50c0b1126669..9ddd34e2dff5 100644 --- a/src/Illuminate/Database/SqlServerConnection.php +++ b/src/Illuminate/Database/SqlServerConnection.php @@ -5,7 +5,7 @@ class SqlServerConnection extends Connection { /** * Get the default query grammar instance. * - * @return Illuminate\Database\Query\Grammars\Grammars\Grammar + * @return \Illuminate\Database\Query\Grammars\Grammar */ protected function getDefaultQueryGrammar() { @@ -15,7 +15,7 @@ protected function getDefaultQueryGrammar() /** * Get the default schema grammar instance. * - * @return Illuminate\Database\Schema\Grammars\Grammar + * @return \Illuminate\Database\Schema\Grammars\Grammar */ protected function getDefaultSchemaGrammar() { diff --git a/src/Illuminate/Events/Dispatcher.php b/src/Illuminate/Events/Dispatcher.php index 86796be3df3d..d8cba2d9fd9e 100644 --- a/src/Illuminate/Events/Dispatcher.php +++ b/src/Illuminate/Events/Dispatcher.php @@ -1,121 +1,121 @@ -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) - { - return $this->addListener($event, $listener, $priority); - } - - /** - * Fire an event and call the listeners. - * - * @param string $eventName - * @param mixed $payload - * @return Symfony\Component\EventDispatcher\Event - */ - public function fire($eventName, $payload = array()) - { - if ( ! $payload instanceof SymfonyEvent) - { - $payload = new Event($payload); - } - - return parent::dispatch($eventName, $payload); - } - - /** - * Register an event subscriber class. - * - * @param Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber - * @return void - */ - public function subscribe(EventSubscriberInterface $subscriber) - { - return parent::addSubscriber($subscriber); - } - - /** - * Remove an event subscriber. - * - * @param Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber - * @return void - */ - public function unsubscribe(EventSubscriberInterface $subscriber) - { - return parent::removeSubscriber($subscriber); - } - - /** - * Register an event listener with the dispatcher. - * - * @param string $event - * @param mixed $listener - * @param int $priority - * @return void - */ - public function addListener($eventName, $listener, $priority = 0) - { - if (is_string($listener)) - { - $listener = $this->createClassListener($listener); - } - - return parent::addListener($eventName, $listener, $priority); - } - - /** - * Create a class based listener using the IoC container. - * - * @param mixed $listener - * @return Closure - */ - public function createClassListener($listener) - { - $container = $this->container; - - return function(SymfonyEvent $event) 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'; - - $container->make($segments[0])->$method($event); - }; - } - +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) + { + return $this->addListener($event, $listener, $priority); + } + + /** + * Fire an event and call the listeners. + * + * @param string $eventName + * @param mixed $payload + * @return \Symfony\Component\EventDispatcher\Event + */ + public function fire($eventName, $payload = array()) + { + if ( ! $payload instanceof SymfonyEvent) + { + $payload = new Event($payload); + } + + return parent::dispatch($eventName, $payload); + } + + /** + * Register an event subscriber class. + * + * @param \Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber + * @return void + */ + public function subscribe(EventSubscriberInterface $subscriber) + { + return parent::addSubscriber($subscriber); + } + + /** + * Remove an event subscriber. + * + * @param \Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber + * @return void + */ + public function unsubscribe(EventSubscriberInterface $subscriber) + { + return parent::removeSubscriber($subscriber); + } + + /** + * Register an event listener with the dispatcher. + * + * @param string $event + * @param mixed $listener + * @param int $priority + * @return void + */ + public function addListener($eventName, $listener, $priority = 0) + { + if (is_string($listener)) + { + $listener = $this->createClassListener($listener); + } + + return parent::addListener($eventName, $listener, $priority); + } + + /** + * Create a class based listener using the IoC container. + * + * @param mixed $listener + * @return \Closure + */ + public function createClassListener($listener) + { + $container = $this->container; + + return function(SymfonyEvent $event) 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'; + + $container->make($segments[0])->$method($event); + }; + } + } diff --git a/src/Illuminate/Exception/ExceptionServiceProvider.php b/src/Illuminate/Exception/ExceptionServiceProvider.php index 6d8bc783785f..7656398fe5aa 100644 --- a/src/Illuminate/Exception/ExceptionServiceProvider.php +++ b/src/Illuminate/Exception/ExceptionServiceProvider.php @@ -1,130 +1,130 @@ -setExceptionHandler($app['exception.function']); - - // By registering the error handler with a level of -1, we state that we want - // all PHP errors converted into ErrorExceptions and thrown which provides - // a very strict development environment but prevents any unseen errors. - $app['kernel.error']->register(-1); - - if (isset($app['env']) and $app['env'] != 'testing') - { - $this->registerShutdownHandler(); - } - } - - /** - * Register the service provider. - * - * @return void - */ - public function register() - { - $this->registerKernelHandlers(); - - $this->app['exception'] = $this->app->share(function() - { - return new Handler; - }); - - $this->registerExceptionHandler(); - } - - /** - * Register the HttpKernel error and exception handlers. - * - * @return void - */ - protected function registerKernelHandlers() - { - $app = $this->app; - - $app['kernel.error'] = function() - { - return new ErrorHandler; - }; - - $this->app['kernel.exception'] = function() use ($app) - { - return new KernelHandler($app['config']['app.debug']); - }; - } - - /** - * Register the PHP exception handler function. - * - * @return void - */ - protected function registerExceptionHandler() - { - $app = $this->app; - - $app['exception.function'] = function() use ($app) - { - return function($exception) use ($app) - { - $response = $app['exception']->handle($exception); - - // If one of the custom error handlers returned a response, we will send that - // response back to the client after preparing it. This allows a specific - // type of exceptions to handled by a Closure giving great flexibility. - if ( ! is_null($response)) - { - $response = $app->prepareResponse($response, $app['request']); - - $response->send(); - } - else - { - $app['kernel.exception']->handle($exception); - } - }; - }; - } - - /** - * Register the shutdown handler Closure. - * - * @return void - */ - protected function registerShutdownHandler() - { - $app = $this->app; - - register_shutdown_function(function() use ($app) - { - set_exception_handler(array(new StubShutdownHandler($app), 'handle')); - - $app['kernel.error']->handleFatal(); - }); - } - - /** - * Set the given Closure as the exception handler. - * - * This function is mainly needed for mocking purposes. - * - * @param Closure $handler - * @return mixed - */ - protected function setExceptionHandler(Closure $handler) - { - return set_exception_handler($handler); - } - +setExceptionHandler($app['exception.function']); + + // By registering the error handler with a level of -1, we state that we want + // all PHP errors converted into ErrorExceptions and thrown which provides + // a very strict development environment but prevents any unseen errors. + $app['kernel.error']->register(-1); + + if (isset($app['env']) and $app['env'] != 'testing') + { + $this->registerShutdownHandler(); + } + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->registerKernelHandlers(); + + $this->app['exception'] = $this->app->share(function() + { + return new Handler; + }); + + $this->registerExceptionHandler(); + } + + /** + * Register the HttpKernel error and exception handlers. + * + * @return void + */ + protected function registerKernelHandlers() + { + $app = $this->app; + + $app['kernel.error'] = function() + { + return new ErrorHandler; + }; + + $this->app['kernel.exception'] = function() use ($app) + { + return new KernelHandler($app['config']['app.debug']); + }; + } + + /** + * Register the PHP exception handler function. + * + * @return void + */ + protected function registerExceptionHandler() + { + $app = $this->app; + + $app['exception.function'] = function() use ($app) + { + return function($exception) use ($app) + { + $response = $app['exception']->handle($exception); + + // If one of the custom error handlers returned a response, we will send that + // response back to the client after preparing it. This allows a specific + // type of exceptions to handled by a Closure giving great flexibility. + if ( ! is_null($response)) + { + $response = $app->prepareResponse($response, $app['request']); + + $response->send(); + } + else + { + $app['kernel.exception']->handle($exception); + } + }; + }; + } + + /** + * Register the shutdown handler Closure. + * + * @return void + */ + protected function registerShutdownHandler() + { + $app = $this->app; + + register_shutdown_function(function() use ($app) + { + set_exception_handler(array(new StubShutdownHandler($app), 'handle')); + + $app['kernel.error']->handleFatal(); + }); + } + + /** + * Set the given Closure as the exception handler. + * + * This function is mainly needed for mocking purposes. + * + * @param Closure $handler + * @return mixed + */ + protected function setExceptionHandler(Closure $handler) + { + return set_exception_handler($handler); + } + } \ No newline at end of file diff --git a/src/Illuminate/Exception/Handler.php b/src/Illuminate/Exception/Handler.php index 41edcf4cc97e..fa66540136c4 100644 --- a/src/Illuminate/Exception/Handler.php +++ b/src/Illuminate/Exception/Handler.php @@ -1,6 +1,7 @@ default = $default; - $this->pheanstalk = $pheanstalk; - } - - /** - * Push a new job onto the queue. - * - * @param string $job - * @param mixed $data - * @param string $queue - * @return void - */ - public function push($job, $data = '', $queue = null) - { - $payload = $this->createPayload($job, $data); - - $this->pheanstalk->useTube($this->getQueue($queue))->put($payload); - } - - /** - * Push a new job onto the queue after a delay. - * - * @param int $delay - * @param string $job - * @param mixed $data - * @param string $queue - * @return void - */ - public function later($delay, $job, $data = '', $queue = null) - { - $payload = $this->createPayload($job, $data); - - $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue)); - - $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $delay); - } - - /** - * Pop the next job off of the queue. - * - * @param string $queue - * @return Illuminate\Queue\Jobs\Job|null - */ - public function pop($queue = null) - { - $job = $this->pheanstalk->watchOnly($this->getQueue($queue))->reserve(); - - if ( ! is_null($job)) - { - return new BeanstalkdJob($this->container, $this->pheanstalk, $job); - } - } - - /** - * Get the queue or return the default. - * - * @param string|null $queue - * @return string - */ - protected function getQueue($queue) - { - return $queue ?: $this->default; - } - - /** - * Get the underlying Pheanstalk instance. - * - * @return Pheanstalk - */ - public function getPheanstalk() - { - return $this->pheanstalk; - } - +default = $default; + $this->pheanstalk = $pheanstalk; + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function push($job, $data = '', $queue = null) + { + $payload = $this->createPayload($job, $data); + + $this->pheanstalk->useTube($this->getQueue($queue))->put($payload); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function later($delay, $job, $data = '', $queue = null) + { + $payload = $this->createPayload($job, $data); + + $pheanstalk = $this->pheanstalk->useTube($this->getQueue($queue)); + + $pheanstalk->put($payload, Pheanstalk::DEFAULT_PRIORITY, $delay); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Queue\Jobs\Job|null + */ + public function pop($queue = null) + { + $job = $this->pheanstalk->watchOnly($this->getQueue($queue))->reserve(); + + if ( ! is_null($job)) + { + return new BeanstalkdJob($this->container, $this->pheanstalk, $job); + } + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + protected function getQueue($queue) + { + return $queue ?: $this->default; + } + + /** + * Get the underlying Pheanstalk instance. + * + * @return Pheanstalk + */ + public function getPheanstalk() + { + return $this->pheanstalk; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php b/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php index cc0972d1aeab..c81416709464 100644 --- a/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php +++ b/src/Illuminate/Queue/Connectors/BeanstalkdConnector.php @@ -1,21 +1,21 @@ - $config['token'], 'project_id' => $config['project']); - - return new IronQueue(new IronMQ($config), $config['queue']); - } - + $config['token'], 'project_id' => $config['project']); + + return new IronQueue(new IronMQ($config), $config['queue']); + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Connectors/SyncConnector.php b/src/Illuminate/Queue/Connectors/SyncConnector.php index bb6389ccc9a1..8a81c9f26de6 100644 --- a/src/Illuminate/Queue/Connectors/SyncConnector.php +++ b/src/Illuminate/Queue/Connectors/SyncConnector.php @@ -1,18 +1,18 @@ -listener = $listener; - } - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $queue = $this->input->getOption('queue'); - - $delay = $this->input->getOption('delay'); - - // The memory limit is the amount of memory we will allow the script to occupy - // before killing it and letting a process manager restart it for us, which - // is to protect us against any memory leaks that will be in the scripts. - $memory = $this->input->getOption('memory'); - - $connection = $this->input->getArgument('connection'); - - $this->listener->listen($connection, $queue, $delay, $memory); - } - - /** - * Get the console command arguments. - * - * @return array - */ - protected function getArguments() - { - return array( - array('connection', InputArgument::OPTIONAL, 'The name of connection', null), - ); - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return array( - array('queue', null, InputOption::VALUE_OPTIONAL, 'The queue to listen on'), - - array('delay', null, InputOption::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0), - - array('memory', null, InputOption::VALUE_OPTIONAL, 'The memory limit in megabytes', 128), - ); - } - +listener = $listener; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $queue = $this->input->getOption('queue'); + + $delay = $this->input->getOption('delay'); + + // The memory limit is the amount of memory we will allow the script to occupy + // before killing it and letting a process manager restart it for us, which + // is to protect us against any memory leaks that will be in the scripts. + $memory = $this->input->getOption('memory'); + + $connection = $this->input->getArgument('connection'); + + $this->listener->listen($connection, $queue, $delay, $memory); + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return array( + array('connection', InputArgument::OPTIONAL, 'The name of connection', null), + ); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return array( + array('queue', null, InputOption::VALUE_OPTIONAL, 'The queue to listen on'), + + array('delay', null, InputOption::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0), + + array('memory', null, InputOption::VALUE_OPTIONAL, 'The memory limit in megabytes', 128), + ); + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/IronQueue.php b/src/Illuminate/Queue/IronQueue.php index 9ab85129723c..566a1cb8ecf9 100644 --- a/src/Illuminate/Queue/IronQueue.php +++ b/src/Illuminate/Queue/IronQueue.php @@ -1,107 +1,107 @@ -iron = $iron; - $this->default = $default; - } - - /** - * Push a new job onto the queue. - * - * @param string $job - * @param mixed $data - * @param string $queue - * @return void - */ - public function push($job, $data = '', $queue = null) - { - $payload = $this->createPayload($job, $data); - - $this->iron->postMessage($this->getQueue($queue), $payload); - } - - /** - * Push a new job onto the queue after a delay. - * - * @param int $delay - * @param string $job - * @param mixed $data - * @param string $queue - * @return void - */ - public function later($delay, $job, $data = '', $queue = null) - { - $payload = $this->createPayload($job, $data); - - $payload = array('body' => $payload, 'delay' => $delay); - - $this->iron->postMessage($this->getQueue($queue), $payload); - } - - /** - * Pop the next job off of the queue. - * - * @param string $queue - * @return Illuminate\Queue\Jobs\Job|null - */ - public function pop($queue = null) - { - $queue = $this->getQueue($queue); - - $job = $this->iron->getMessage($queue); - - if ( ! is_null($job)) - { - return new IronJob($this->container, $this->iron, $job, $queue); - } - } - - /** - * Get the queue or return the default. - * - * @param string|null $queue - * @return string - */ - protected function getQueue($queue) - { - return $queue ?: $this->default; - } - - /** - * Get the underlying IronMQ instance. - * - * @return IronMQ - */ - public function getIron() - { - return $this->iron; - } - +iron = $iron; + $this->default = $default; + } + + /** + * Push a new job onto the queue. + * + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function push($job, $data = '', $queue = null) + { + $payload = $this->createPayload($job, $data); + + $this->iron->postMessage($this->getQueue($queue), $payload); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function later($delay, $job, $data = '', $queue = null) + { + $payload = $this->createPayload($job, $data); + + $payload = array('body' => $payload, 'delay' => $delay); + + $this->iron->postMessage($this->getQueue($queue), $payload); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Queue\Jobs\Job|null + */ + public function pop($queue = null) + { + $queue = $this->getQueue($queue); + + $job = $this->iron->getMessage($queue); + + if ( ! is_null($job)) + { + return new IronJob($this->container, $this->iron, $job, $queue); + } + } + + /** + * Get the queue or return the default. + * + * @param string|null $queue + * @return string + */ + protected function getQueue($queue) + { + return $queue ?: $this->default; + } + + /** + * Get the underlying IronMQ instance. + * + * @return IronMQ + */ + public function getIron() + { + return $this->iron; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Jobs/BeanstalkdJob.php b/src/Illuminate/Queue/Jobs/BeanstalkdJob.php index 0f9ba8aad40c..2bab6f951bf3 100644 --- a/src/Illuminate/Queue/Jobs/BeanstalkdJob.php +++ b/src/Illuminate/Queue/Jobs/BeanstalkdJob.php @@ -1,117 +1,117 @@ -job = $job; - $this->container = $container; - $this->pheanstalk = $pheanstalk; - } - - /** - * Fire the job. - * - * @return void - */ - public function fire() - { - $payload = unserialize($this->job->getData()); - - // Once we have the message payload, we can create the given class and fire - // it off with the given data. The data is in the messages serialized so - // we will unserialize it and pass into the jobs in its original form. - $this->instance = $this->container->make($payload['job']); - - $this->instance->fire($this, $payload['data']); - } - - /** - * Delete the job from the queue. - * - * @return void - */ - public function delete() - { - $this->pheanstalk->delete($this->job); - } - - /** - * Release the job back into the queue. - * - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - $priority = Pheanstalk::DEFAULT_PRIORITY; - - $this->pheanstalk->release($this->job, $priority, $delay); - } - - /** - * Get the IoC container instance. - * - * @return Illuminate\Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * Get the underlying Pheanstalk instance. - * - * @return Pheanstalk - */ - public function getPheanstalk() - { - return $this->pheanstalk; - } - - /** - * Get the underlying Pheanstalk job. - * - * @return Pheanstalk_Job - */ - public function getPheanstalkJob() - { - return $this->job; - } - +job = $job; + $this->container = $container; + $this->pheanstalk = $pheanstalk; + } + + /** + * Fire the job. + * + * @return void + */ + public function fire() + { + $payload = unserialize($this->job->getData()); + + // Once we have the message payload, we can create the given class and fire + // it off with the given data. The data is in the messages serialized so + // we will unserialize it and pass into the jobs in its original form. + $this->instance = $this->container->make($payload['job']); + + $this->instance->fire($this, $payload['data']); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + $this->pheanstalk->delete($this->job); + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + $priority = Pheanstalk::DEFAULT_PRIORITY; + + $this->pheanstalk->release($this->job, $priority, $delay); + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Container\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Get the underlying Pheanstalk instance. + * + * @return Pheanstalk + */ + public function getPheanstalk() + { + return $this->pheanstalk; + } + + /** + * Get the underlying Pheanstalk job. + * + * @return Pheanstalk_Job + */ + public function getPheanstalkJob() + { + return $this->job; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Jobs/IronJob.php b/src/Illuminate/Queue/Jobs/IronJob.php index 7b5aa4e73579..a5a5bf772f3e 100644 --- a/src/Illuminate/Queue/Jobs/IronJob.php +++ b/src/Illuminate/Queue/Jobs/IronJob.php @@ -1,124 +1,124 @@ -job = $job; - $this->iron = $iron; - $this->queue = $queue; - $this->container = $container; - } - - /** - * Fire the job. - * - * @return void - */ - public function fire() - { - $payload = unserialize($this->job->body); - - // Once we have the message payload, we can create the given class and fire - // it off with the given data. The data is in the messages serialized so - // we will unserialize it and pass into the jobs in its original form. - $this->instance = $this->container->make($payload['job']); - - $this->instance->fire($this, $payload['data']); - } - - /** - * Delete the job from the queue. - * - * @return void - */ - public function delete() - { - $this->iron->deleteMessage($this->queue, $this->job->id); - } - - /** - * Release the job back into the queue. - * - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - // - } - - /** - * Get the IoC container instance. - * - * @return Illuminate\Container - */ - public function getContainer() - { - return $this->container; - } - - /** - * Get the underlying IronMQ instance. - * - * @return IronMQ - */ - public function getIron() - { - return $this->iron; - } - - /** - * Get the underlying IronMQ job. - * - * @return array - */ - public function getIronJob() - { - return $this->job; - } - +job = $job; + $this->iron = $iron; + $this->queue = $queue; + $this->container = $container; + } + + /** + * Fire the job. + * + * @return void + */ + public function fire() + { + $payload = unserialize($this->job->body); + + // Once we have the message payload, we can create the given class and fire + // it off with the given data. The data is in the messages serialized so + // we will unserialize it and pass into the jobs in its original form. + $this->instance = $this->container->make($payload['job']); + + $this->instance->fire($this, $payload['data']); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + $this->iron->deleteMessage($this->queue, $this->job->id); + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + // + } + + /** + * Get the IoC container instance. + * + * @return \Illuminate\Container + */ + public function getContainer() + { + return $this->container; + } + + /** + * Get the underlying IronMQ instance. + * + * @return IronMQ + */ + public function getIron() + { + return $this->iron; + } + + /** + * Get the underlying IronMQ job. + * + * @return array + */ + public function getIronJob() + { + return $this->job; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Jobs/SyncJob.php b/src/Illuminate/Queue/Jobs/SyncJob.php index 31431d45b13e..9ca6e145b78f 100644 --- a/src/Illuminate/Queue/Jobs/SyncJob.php +++ b/src/Illuminate/Queue/Jobs/SyncJob.php @@ -1,76 +1,76 @@ -job = $job; - $this->data = $data; - $this->container = $container; - } - - /** - * Fire the job. - * - * @return void - */ - public function fire() - { - $this->instance = $this->container->make($this->job); - - $this->instance->fire($this, $this->data); - } - - /** - * Delete the job from the queue. - * - * @return void - */ - public function delete() - { - // - } - - /** - * Release the job back into the queue. - * - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - // - } - +job = $job; + $this->data = $data; + $this->container = $container; + } + + /** + * Fire the job. + * + * @return void + */ + public function fire() + { + $this->instance = $this->container->make($this->job); + + $this->instance->fire($this, $this->data); + } + + /** + * Delete the job from the queue. + * + * @return void + */ + public function delete() + { + // + } + + /** + * Release the job back into the queue. + * + * @param int $delay + * @return void + */ + public function release($delay = 0) + { + // + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Listener.php b/src/Illuminate/Queue/Listener.php index efc461237f6b..c00f4f8b6e8a 100644 --- a/src/Illuminate/Queue/Listener.php +++ b/src/Illuminate/Queue/Listener.php @@ -1,147 +1,147 @@ -manager = $manager; - } - - /** - * Listen to the given queue. - * - * @param string $connection - * @param string $queue - * @param int $delay - * @param int $memory - * @return void - */ - public function listen($connection, $queue = null, $delay = 0, $memory = 128) - { - $connection = $this->manager->connection($connection); - - while (true) - { - $job = $connection->pop($queue); - - // If we're able to pull a job off of the stack, we will process it and - // then make sure we are not exceeding our memory limits for the run - // which is to protect against run-away memory leakages from here. - if ( ! is_null($job)) - { - $this->process($job, $delay); - } - else - { - $this->sleep(1); - } - - // Once we have run the job we'll go check if the memory limit has been - // exceeded for the script. If it has, we will kill this script so a - // process managers will restart this with a clean slate of memory. - if ($this->memoryExceeded($memory)) - { - $this->stop(); return; - } - } - } - - /** - * Process a given job from the queue. - * - * @param Illuminate\Queue\Jobs\Job $job - * @param int $delay - * @return void - */ - public function process(Job $job, $delay) - { - try - { - // First we will fire off the job. Once it is done we will see if it will - // be auto-deleted after processing and if so we will go ahead and run - // the delete method on the job. Otherwise we will just keep moving. - $job->fire(); - - if ($job->autoDelete()) $job->delete(); - } - - catch (\Exception $e) - { - // If we catch an exception, we will attempt to release the job back onto - // the queue so it is not lost. This will let is be retried at a later - // time by another listener (or the same one). We will do that here. - $job->release($delay); - - throw $e; - } - } - - /** - * Determine if the memory limit has been exceeded. - * - * @param int $memoryLimit - * @return bool - */ - public function memoryExceeded($memoryLimit) - { - return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; - } - - /** - * Sleep the script for a given number of seconds. - * - * @param int $seconds - * @return void - */ - public function sleep($seconds) - { - sleep($seconds); - } - - /** - * Stop listening and bail out of the script. - * - * @return void - */ - public function stop() - { - die; - } - - /** - * Get the queue manager instance. - * - * @return Illuminate\Queue\QueueManager - */ - public function getManager() - { - return $this->manager; - } - - /** - * Set the queue manager instance. - * - * @param Illuminate\Queue\QueueManager $manager - * @return void - */ - public function setManager(QueueManager $manager) - { - $this->manager = $manager; - } - +manager = $manager; + } + + /** + * Listen to the given queue. + * + * @param string $connection + * @param string $queue + * @param int $delay + * @param int $memory + * @return void + */ + public function listen($connection, $queue = null, $delay = 0, $memory = 128) + { + $connection = $this->manager->connection($connection); + + while (true) + { + $job = $connection->pop($queue); + + // If we're able to pull a job off of the stack, we will process it and + // then make sure we are not exceeding our memory limits for the run + // which is to protect against run-away memory leakages from here. + if ( ! is_null($job)) + { + $this->process($job, $delay); + } + else + { + $this->sleep(1); + } + + // Once we have run the job we'll go check if the memory limit has been + // exceeded for the script. If it has, we will kill this script so a + // process managers will restart this with a clean slate of memory. + if ($this->memoryExceeded($memory)) + { + $this->stop(); return; + } + } + } + + /** + * Process a given job from the queue. + * + * @param \Illuminate\Queue\Jobs\Job $job + * @param int $delay + * @return void + */ + public function process(Job $job, $delay) + { + try + { + // First we will fire off the job. Once it is done we will see if it will + // be auto-deleted after processing and if so we will go ahead and run + // the delete method on the job. Otherwise we will just keep moving. + $job->fire(); + + if ($job->autoDelete()) $job->delete(); + } + + catch (\Exception $e) + { + // If we catch an exception, we will attempt to release the job back onto + // the queue so it is not lost. This will let is be retried at a later + // time by another listener (or the same one). We will do that here. + $job->release($delay); + + throw $e; + } + } + + /** + * Determine if the memory limit has been exceeded. + * + * @param int $memoryLimit + * @return bool + */ + public function memoryExceeded($memoryLimit) + { + return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; + } + + /** + * Sleep the script for a given number of seconds. + * + * @param int $seconds + * @return void + */ + public function sleep($seconds) + { + sleep($seconds); + } + + /** + * Stop listening and bail out of the script. + * + * @return void + */ + public function stop() + { + die; + } + + /** + * Get the queue manager instance. + * + * @return \Illuminate\Queue\QueueManager + */ + public function getManager() + { + return $this->manager; + } + + /** + * Set the queue manager instance. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + public function setManager(QueueManager $manager) + { + $this->manager = $manager; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/Queue.php b/src/Illuminate/Queue/Queue.php index cba4d0b080a9..2629f9bdb65f 100644 --- a/src/Illuminate/Queue/Queue.php +++ b/src/Illuminate/Queue/Queue.php @@ -1,37 +1,37 @@ - $job, 'data' => $data)); - } - - /** - * Set the IoC container instance. - * - * @param Illuminate\Container $container - * @return void - */ - public function setContainer(Container $container) - { - $this->container = $container; - } - + $job, 'data' => $data)); + } + + /** + * Set the IoC container instance. + * + * @param \Illuminate\Container\Container $container + * @return void + */ + public function setContainer(Container $container) + { + $this->container = $container; + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/QueueInterface.php b/src/Illuminate/Queue/QueueInterface.php index e0985034c933..42cc7a939d17 100644 --- a/src/Illuminate/Queue/QueueInterface.php +++ b/src/Illuminate/Queue/QueueInterface.php @@ -1,34 +1,34 @@ -app = $app; - } - - /** - * Resolve a queue connection instance. - * - * @param string $name - * @return Illuminate\Queue\QueueInterface - */ - public function connection($name = null) - { - $name = $name ?: $this->getDefault(); - - // If the connection has not been resolved yet we will resolve it now as all - // of the connections are resolved when they are actually needed so we do - // not make any unnecessary connection to the various queue end-points. - if ( ! isset($this->connections[$name])) - { - $this->connections[$name] = $this->resolve($name); - - $this->connections[$name]->setContainer($this->app); - } - - return $this->connections[$name]; - } - - /** - * Resolve a queue connection. - * - * @param string $name - * @return Illuminate\Queue\QueueInterface - */ - protected function resolve($name) - { - $config = $this->getConfig($name); - - return $this->getConnector($config['driver'])->connect($config); - } - - /** - * Get the connector for a given driver. - * - * @param string $driver - * @return Illuminate\Queue\Connectors\ConnectorInterface - */ - protected function getConnector($driver) - { - if (isset($this->connectors[$driver])) - { - return call_user_func($this->connectors[$driver]); - } - - throw new \InvalidArgumentException("No connector for [$driver]"); - } - - /** - * Add a queue connection resolver. - * - * @param string $driver - * @param Closure $resolver - * @return void - */ - public function addConnector($driver, Closure $resolver) - { - $this->connectors[$driver] = $resolver; - } - - /** - * Get the queue connection configuration. - * - * @param string $name - * @return array - */ - protected function getConfig($name) - { - return $this->app['config']["queue.connections.{$name}"]; - } - - /** - * Get the name of the default queue connection. - * - * @return string - */ - protected function getDefault() - { - return $this->app['config']['queue.default']; - } - - /** - * Dyncamially pass calls to the default connection. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - $callable = array($this->connection(), $method); - - return call_user_func_array($callable, $parameters); - } - +app = $app; + } + + /** + * Resolve a queue connection instance. + * + * @param string $name + * @return \Illuminate\Queue\QueueInterface + */ + public function connection($name = null) + { + $name = $name ?: $this->getDefault(); + + // If the connection has not been resolved yet we will resolve it now as all + // of the connections are resolved when they are actually needed so we do + // not make any unnecessary connection to the various queue end-points. + if ( ! isset($this->connections[$name])) + { + $this->connections[$name] = $this->resolve($name); + + $this->connections[$name]->setContainer($this->app); + } + + return $this->connections[$name]; + } + + /** + * Resolve a queue connection. + * + * @param string $name + * @return \Illuminate\Queue\QueueInterface + */ + protected function resolve($name) + { + $config = $this->getConfig($name); + + return $this->getConnector($config['driver'])->connect($config); + } + + /** + * Get the connector for a given driver. + * + * @param string $driver + * @return \Illuminate\Queue\Connectors\ConnectorInterface + */ + protected function getConnector($driver) + { + if (isset($this->connectors[$driver])) + { + return call_user_func($this->connectors[$driver]); + } + + throw new \InvalidArgumentException("No connector for [$driver]"); + } + + /** + * Add a queue connection resolver. + * + * @param string $driver + * @param Closure $resolver + * @return void + */ + public function addConnector($driver, Closure $resolver) + { + $this->connectors[$driver] = $resolver; + } + + /** + * Get the queue connection configuration. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + return $this->app['config']["queue.connections.{$name}"]; + } + + /** + * Get the name of the default queue connection. + * + * @return string + */ + protected function getDefault() + { + return $this->app['config']['queue.default']; + } + + /** + * Dyncamially pass calls to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + $callable = array($this->connection(), $method); + + return call_user_func_array($callable, $parameters); + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/QueueServiceProvider.php b/src/Illuminate/Queue/QueueServiceProvider.php index c43be5f647a9..0369dffcb2e2 100644 --- a/src/Illuminate/Queue/QueueServiceProvider.php +++ b/src/Illuminate/Queue/QueueServiceProvider.php @@ -1,133 +1,133 @@ -registerManager(); - - $this->registerListener(); - } - - /** - * Register the queue manager. - * - * @return void - */ - protected function registerManager() - { - $me = $this; - - $this->app['queue'] = $this->app->share(function($app) use ($me) - { - // Once we have an instance of the queue manager, we will register the various - // resolvers for the queue connectors. These connectors are responsible for - // creating the classes that accept queue configs and instantiate queues. - $manager = new QueueManager($app); - - $me->registerConnectors($manager); - - return $manager; - }); - } - - /** - * Register the queue listener. - * - * @return void - */ - protected function registerListener() - { - $this->registerListenerCommand(); - - $this->app['queue.listener'] = $this->app->share(function($app) - { - return new Listener($app['queue']); - }); - } - - /** - * Register the queue listener console command. - * - * @return void - */ - protected function registerListenerCommand() - { - $app = $this->app; - - $app['command.queue.listen'] = $app->share(function($app) - { - return new ListenCommand($app['queue.listener']); - }); - } - - /** - * Register the connectors on the queue manager. - * - * @param Illuminate\Queue\QueueManager $manager - * @return void - */ - public function registerConnectors($manager) - { - foreach (array('Sync', 'Beanstalkd') as $connector) - { - $this->{"register{$connector}Connector"}($manager); - } - } - - /** - * Register the Sync queue connector. - * - * @param Illuminate\Queue\QueueManager $manager - * @return void - */ - protected function registerSyncConnector($manager) - { - $manager->addConnector('sync', function() - { - return new SyncConnector; - }); - } - - /** - * Register the Beanstalkd queue connector. - * - * @param Illuminate\Queue\QueueManager $manager - * @return void - */ - protected function registerBeanstalkdConnector($manager) - { - $manager->addConnector('beanstalkd', function() - { - return new BeanstalkdConnector; - }); - } - - /** - * Get the services provided by the provider. - * - * @return array - */ - public function provides() - { - return array('queue', 'queue.listener', 'command.queue.listen'); - } - +registerManager(); + + $this->registerListener(); + } + + /** + * Register the queue manager. + * + * @return void + */ + protected function registerManager() + { + $me = $this; + + $this->app['queue'] = $this->app->share(function($app) use ($me) + { + // Once we have an instance of the queue manager, we will register the various + // resolvers for the queue connectors. These connectors are responsible for + // creating the classes that accept queue configs and instantiate queues. + $manager = new QueueManager($app); + + $me->registerConnectors($manager); + + return $manager; + }); + } + + /** + * Register the queue listener. + * + * @return void + */ + protected function registerListener() + { + $this->registerListenerCommand(); + + $this->app['queue.listener'] = $this->app->share(function($app) + { + return new Listener($app['queue']); + }); + } + + /** + * Register the queue listener console command. + * + * @return void + */ + protected function registerListenerCommand() + { + $app = $this->app; + + $app['command.queue.listen'] = $app->share(function($app) + { + return new ListenCommand($app['queue.listener']); + }); + } + + /** + * Register the connectors on the queue manager. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + public function registerConnectors($manager) + { + foreach (array('Sync', 'Beanstalkd') as $connector) + { + $this->{"register{$connector}Connector"}($manager); + } + } + + /** + * Register the Sync queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerSyncConnector($manager) + { + $manager->addConnector('sync', function() + { + return new SyncConnector; + }); + } + + /** + * Register the Beanstalkd queue connector. + * + * @param \Illuminate\Queue\QueueManager $manager + * @return void + */ + protected function registerBeanstalkdConnector($manager) + { + $manager->addConnector('beanstalkd', function() + { + return new BeanstalkdConnector; + }); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array('queue', 'queue.listener', 'command.queue.listen'); + } + } \ No newline at end of file diff --git a/src/Illuminate/Queue/SyncQueue.php b/src/Illuminate/Queue/SyncQueue.php index 7c2c2d260fb2..af085d04829e 100644 --- a/src/Illuminate/Queue/SyncQueue.php +++ b/src/Illuminate/Queue/SyncQueue.php @@ -1,52 +1,52 @@ -resolveJob($job, $data)->fire(); - } - - /** - * Push a new job onto the queue after a delay. - * - * @param int $delay - * @param string $job - * @param mixed $data - * @param string $queue - * @return void - */ - public function later($delay, $job, $data = '', $queue = null) - { - return $this->push($job, $data, $queue); - } - - /** - * Pop the next job off of the queue. - * - * @param string $queue - * @return Illuminate\Queue\Jobs\Job|null - */ - public function pop($queue = null) {} - - /** - * Resolve a Sync job instance. - * - * @param string $job - * @param string $data - * @return Illuminate\Queue\Jobs\SyncJob - */ - protected function resolveJob($job, $data) - { - return new Jobs\SyncJob($this->container, $job, $data); - } - +resolveJob($job, $data)->fire(); + } + + /** + * Push a new job onto the queue after a delay. + * + * @param int $delay + * @param string $job + * @param mixed $data + * @param string $queue + * @return void + */ + public function later($delay, $job, $data = '', $queue = null) + { + return $this->push($job, $data, $queue); + } + + /** + * Pop the next job off of the queue. + * + * @param string $queue + * @return \Illuminate\Queue\Jobs\Job|null + */ + public function pop($queue = null) {} + + /** + * Resolve a Sync job instance. + * + * @param string $job + * @param string $data + * @return \Illuminate\Queue\Jobs\SyncJob + */ + protected function resolveJob($job, $data) + { + return new Jobs\SyncJob($this->container, $job, $data); + } + } \ No newline at end of file diff --git a/src/Illuminate/Redis/RedisManager.php b/src/Illuminate/Redis/RedisManager.php index 0cf5cb8ff3d9..8208ad99b905 100644 --- a/src/Illuminate/Redis/RedisManager.php +++ b/src/Illuminate/Redis/RedisManager.php @@ -1,110 +1,110 @@ -app = $app; - } - - /** - * Get a Redis connection instance. - * - * @param string $name - * @return Illuminate\Redis\Database - */ - public function connection($name = null) - { - if ( ! isset($this->connections[$name])) - { - $this->connections[$name] = $this->createConnection($name); - } - - return $this->connections[$name]; - } - - /** - * Create the given connection by name. - * - * @param string $name - * @return Illuminate\Redis\Database - */ - protected function createConnection($name) - { - $config = $this->getConfig($name); - - $connection = new Database($config['host'], $config['port'], $config['database']); - - $connection->connect(); - - return $connection; - } - - /** - * Get the configuration for a connection. - * - * @param string $name - * @return array - */ - protected function getConfig($name) - { - $name = $name ?: $this->getDefaultConnection(); - - // To get the database connection configuration, we will just pull each of the - // connection configurations and get the configurations for the given name. - // If the configuration doesn't exist, we'll throw an exception and bail. - $connections = $this->app['config']['database.redis']; - - if (is_null($config = array_get($connections, $name))) - { - throw new \InvalidArgumentException("Redis [$name] not configured."); - } - - return $config; - } - - /** - * Get the default connection name. - * - * @return string - */ - protected function getDefaultConnection() - { - return 'default'; - } - - /** - * Dynamically pass methods to the default connection. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return call_user_func_array(array($this->connection(), $method), $parameters); - } - +app = $app; + } + + /** + * Get a Redis connection instance. + * + * @param string $name + * @return \Illuminate\Redis\Database + */ + public function connection($name = null) + { + if ( ! isset($this->connections[$name])) + { + $this->connections[$name] = $this->createConnection($name); + } + + return $this->connections[$name]; + } + + /** + * Create the given connection by name. + * + * @param string $name + * @return \Illuminate\Redis\Database + */ + protected function createConnection($name) + { + $config = $this->getConfig($name); + + $connection = new Database($config['host'], $config['port'], $config['database']); + + $connection->connect(); + + return $connection; + } + + /** + * Get the configuration for a connection. + * + * @param string $name + * @return array + */ + protected function getConfig($name) + { + $name = $name ?: $this->getDefaultConnection(); + + // To get the database connection configuration, we will just pull each of the + // connection configurations and get the configurations for the given name. + // If the configuration doesn't exist, we'll throw an exception and bail. + $connections = $this->app['config']['database.redis']; + + if (is_null($config = array_get($connections, $name))) + { + throw new \InvalidArgumentException("Redis [$name] not configured."); + } + + return $config; + } + + /** + * Get the default connection name. + * + * @return string + */ + protected function getDefaultConnection() + { + return 'default'; + } + + /** + * Dynamically pass methods to the default connection. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + return call_user_func_array(array($this->connection(), $method), $parameters); + } + } \ No newline at end of file diff --git a/src/Illuminate/Routing/Console/MakeControllerCommand.php b/src/Illuminate/Routing/Console/MakeControllerCommand.php index cf87b6faae58..924181b37300 100644 --- a/src/Illuminate/Routing/Console/MakeControllerCommand.php +++ b/src/Illuminate/Routing/Console/MakeControllerCommand.php @@ -24,7 +24,7 @@ class MakeControllerCommand extends Command { /** * The controller generator instance. * - * @var Illuminate\Routing\Generators\ControllerGenerator + * @var \Illuminate\Routing\Generators\ControllerGenerator */ protected $generator; @@ -38,7 +38,7 @@ class MakeControllerCommand extends Command { /** * Create a new make controller command instance. * - * @param Illuminate\Routing\Generators\ControllerGenerator $generator + * @param \Illuminate\Routing\Generators\ControllerGenerator $generator * @param string $path * @return void */ diff --git a/src/Illuminate/Routing/Controllers/Controller.php b/src/Illuminate/Routing/Controllers/Controller.php index 8adf98d3fbb3..e51165ef42b1 100644 --- a/src/Illuminate/Routing/Controllers/Controller.php +++ b/src/Illuminate/Routing/Controllers/Controller.php @@ -12,7 +12,7 @@ class Controller { /** * The controller filter parser. * - * @var Illuminate\Routing\FilterParser + * @var \Illuminate\Routing\Controllers\FilterParser */ protected $filterParser; @@ -33,7 +33,7 @@ class Controller { /** * The layout used by the controller. * - * @var Illuminate\View\View + * @var \Illuminate\View\View */ protected $layout; @@ -94,11 +94,11 @@ protected function prepareFilter($filter, $options) /** * Execute an action on the controller. * - * @param Illuminate\Container $container - * @param Illuminate\Routing\Router $router + * @param \Illuminate\Container\Container $container + * @param \Illuminate\Routing\Router $router * @param string $method * @param array $parameters - * @return Symfony\Component\HttpFoundation\Response + * @return \Symfony\Component\HttpFoundation\Response */ public function callAction(Container $container, Router $router, $method, $parameters) { @@ -142,10 +142,10 @@ protected function directCallAction($method, $parameters) /** * Process a controller action response. * - * @param Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * @param string $method * @param mixed $response - * @return Symfony\Component\HttpFoundation\Response + * @return \Symfony\Component\HttpFoundation\Response */ protected function processResponse($router, $method, $response) { @@ -164,7 +164,7 @@ protected function processResponse($router, $method, $response) /** * Call the before filters on the controller. * - * @param Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * @param string $method * @return mixed */ @@ -192,7 +192,7 @@ protected function callBeforeFilters($router, $method) /** * Get the before filters for the controller. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return array */ @@ -206,9 +206,9 @@ protected function getBeforeFilters($request, $method) /** * Call the after filters on the controller. * - * @param Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * @param string $method - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return mixed */ protected function callAfterFilters($router, $method, $response) @@ -231,7 +231,7 @@ protected function callAfterFilters($router, $method, $response) /** * Get the after filters for the controller. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return array */ @@ -245,9 +245,9 @@ protected function getAfterFilters($request, $method) /** * Call the given route filter. * - * @param Illuminate\Routing\Route $route + * @param \Illuminate\Routing\Route $route * @param string $filter - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param array $parameters * @return mixed */ diff --git a/src/Illuminate/Routing/Controllers/Filter.php b/src/Illuminate/Routing/Controllers/Filter.php index ad92b482a317..563139892415 100644 --- a/src/Illuminate/Routing/Controllers/Filter.php +++ b/src/Illuminate/Routing/Controllers/Filter.php @@ -73,7 +73,7 @@ protected function prepareValues($values) /** * Determine if the filter applies to a request and method. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return bool */ @@ -95,7 +95,7 @@ public function applicable(Request $request, $method) /** * Determine if the filter applies based on the "on" rule. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return bool */ @@ -109,7 +109,7 @@ protected function excludedByRequest($request, $method) /** * Determine if the filter applies based on the "only" rule. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return bool */ @@ -121,7 +121,7 @@ protected function excludedByOnlyMethod($request, $method) /** * Determine if the filter applies based on the "except" rule. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return bool */ diff --git a/src/Illuminate/Routing/Controllers/FilterParser.php b/src/Illuminate/Routing/Controllers/FilterParser.php index 2b5f8f6c9197..0f8b979ffd58 100644 --- a/src/Illuminate/Routing/Controllers/FilterParser.php +++ b/src/Illuminate/Routing/Controllers/FilterParser.php @@ -7,8 +7,8 @@ class FilterParser { /** * Parse the given filters from the controller. * - * @param Illuminate\Routing\Controllers\Controller $controller - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Illuminate\Routing\Controllers\Controller $controller + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @param string $filter * @return array @@ -21,8 +21,8 @@ public function parse(Controller $controller, Request $request, $method, $filter /** * Get the filters that were specified in code. * - * @param Illuminate\Routing\Controllers\Controller $controller - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Illuminate\Routing\Controllers\Controller $controller + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @param string $filter * @return array @@ -53,7 +53,7 @@ protected function filterByClass($filters, $filter) * Filter the annotations by request and method. * * @param array $filters - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $method * @return array */ diff --git a/src/Illuminate/Routing/Generators/ControllerGenerator.php b/src/Illuminate/Routing/Generators/ControllerGenerator.php index 3b17399dad48..ff5ff3a35b87 100644 --- a/src/Illuminate/Routing/Generators/ControllerGenerator.php +++ b/src/Illuminate/Routing/Generators/ControllerGenerator.php @@ -7,7 +7,7 @@ class ControllerGenerator { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; @@ -29,7 +29,7 @@ class ControllerGenerator { /** * Create a new controller generator instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(Filesystem $files) diff --git a/src/Illuminate/Routing/Redirector.php b/src/Illuminate/Routing/Redirector.php index 33df303946df..c5a02294a533 100644 --- a/src/Illuminate/Routing/Redirector.php +++ b/src/Illuminate/Routing/Redirector.php @@ -8,21 +8,21 @@ class Redirector { /** * The URL generator instance. * - * @var Illuminate\Routing\UrlGenerator + * @var \Illuminate\Routing\UrlGenerator */ protected $generator; /** * The session store instance. * - * @var Illuminate\Session\Store + * @var \Illuminate\Session\Store */ protected $session; /** * Create a new Redirector instance. * - * @param Illuminate\Routing\UrlGenerator $generator + * @param \Illuminate\Routing\UrlGenerator $generator * @return void */ public function __construct(UrlGenerator $generator) @@ -35,7 +35,7 @@ public function __construct(UrlGenerator $generator) * * @param int $status * @param array $headers - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function back($status = 302, $headers = array()) { @@ -51,7 +51,7 @@ public function back($status = 302, $headers = array()) * @param int $status * @param array $headers * @param bool $secure - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function to($path, $status = 302, $headers = array(), $secure = false) { @@ -66,7 +66,7 @@ public function to($path, $status = 302, $headers = array(), $secure = false) * @param string $path * @param int $status * @param array $headers - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function secure($path, $status = 302, $headers = array()) { @@ -80,7 +80,7 @@ public function secure($path, $status = 302, $headers = array()) * @param array $parameters * @param int $status * @param array $headers - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function route($route, $parameters = array(), $status = 302, $headers = array()) { @@ -96,7 +96,7 @@ public function route($route, $parameters = array(), $status = 302, $headers = a * @param array $parameters * @param int $status * @param array $headers - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function action($action, $parameters = array(), $status = 302, $headers = array()) { @@ -111,7 +111,7 @@ public function action($action, $parameters = array(), $status = 302, $headers = * @param string $path * @param int $status * @param array $headers - * @return Illuminate\Http\RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ protected function createRedirect($path, $status, $headers) { @@ -130,7 +130,7 @@ protected function createRedirect($path, $status, $headers) /** * Set the active session store. * - * @param Illuminate\Session\Store $session + * @param \Illuminate\Session\Store $session * @return void */ public function setSession(SessionStore $session) diff --git a/src/Illuminate/Routing/Route.php b/src/Illuminate/Routing/Route.php index 0dec3a037dec..cbd643dfc5c0 100644 --- a/src/Illuminate/Routing/Route.php +++ b/src/Illuminate/Routing/Route.php @@ -10,7 +10,7 @@ class Route extends BaseRoute implements ArrayAccess { /** * The router instance. * - * @var Illuminate\Routing\Router + * @var \Illuminate\Routing\Router */ protected $router; @@ -24,7 +24,7 @@ class Route extends BaseRoute implements ArrayAccess { /** * Execute the route and return the response. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @return mixed */ public function run(Request $request) @@ -67,7 +67,7 @@ protected function callCallable() /** * Call all of the before filters on the route. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @return mixed */ protected function callBeforeFilters(Request $request) @@ -90,7 +90,7 @@ protected function callBeforeFilters(Request $request) /** * Get all of the before filters to run on the route. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @return array */ protected function getAllBeforeFilters(Request $request) @@ -104,7 +104,7 @@ protected function getAllBeforeFilters(Request $request) * Call a given filter with the parameters. * * @param string $name - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param array $parameters * @return mixed */ @@ -248,7 +248,7 @@ public function getVariableKeys() * * @param string $name * @param string $expression - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function where($name, $expression) { @@ -262,7 +262,7 @@ public function where($name, $expression) * * @param string $key * @param mixed $value - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function defaults($key, $value) { @@ -275,7 +275,7 @@ public function defaults($key, $value) * Set the before filters on the route. * * @param dynamic - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function before() { @@ -292,7 +292,7 @@ public function before() * Set the after filters on the route. * * @param dynamic - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function after() { @@ -361,7 +361,7 @@ public function setParameters($parameters) /** * Set the Router instance on the route. * - * @param Illuminate\Routing\Router $router + * @param \Illuminate\Routing\Router $router * @return void */ public function setRouter(Router $router) diff --git a/src/Illuminate/Routing/Router.php b/src/Illuminate/Routing/Router.php index 2fa561fa42e1..d4f1694fb413 100644 --- a/src/Illuminate/Routing/Router.php +++ b/src/Illuminate/Routing/Router.php @@ -19,7 +19,7 @@ class Router { /** * The route collection instance. * - * @var Symfony\Component\Routing\RouteCollection + * @var \Symfony\Component\Routing\RouteCollection */ protected $routes; @@ -54,21 +54,21 @@ class Router { /** * The inversion of control container instance. * - * @var Illuminate\Container + * @var \Illuminate\Container\Container */ protected $container; /** * The current request being dispatched. * - * @var Symfony\Component\HttpFoundation\Request + * @var \Symfony\Component\HttpFoundation\Request */ protected $currentRequest; /** * The current route being executed. * - * @var Illuminate\Routing\Route + * @var \Illuminate\Routing\Route */ protected $currentRoute; @@ -82,7 +82,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) @@ -97,7 +97,7 @@ public function __construct(Container $container = null) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function get($pattern, $action) { @@ -109,7 +109,7 @@ public function get($pattern, $action) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function post($pattern, $action) { @@ -121,7 +121,7 @@ public function post($pattern, $action) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function put($pattern, $action) { @@ -133,7 +133,7 @@ public function put($pattern, $action) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function patch($pattern, $action) { @@ -145,7 +145,7 @@ public function patch($pattern, $action) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function delete($pattern, $action) { @@ -158,7 +158,7 @@ public function delete($pattern, $action) * @param string $method * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function match($method, $pattern, $action) { @@ -170,7 +170,7 @@ public function match($method, $pattern, $action) * * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function any($pattern, $action) { @@ -196,7 +196,7 @@ public function controllers(array $controllers) * * @param string $controller * @param string $uri - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function controller($controller, $uri) { @@ -352,7 +352,7 @@ public function group(array $attributes, Closure $callback) * @param string $method * @param string $pattern * @param mixed $action - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ protected function createRoute($method, $pattern, $action) { @@ -413,7 +413,7 @@ protected function parseAction($action) /** * Set the attributes and requirements on the route. * - * @param Illuminate\Routing\Route $route + * @param \Illuminate\Routing\Route $route * @param array $action * @param array $optional * @return void @@ -579,7 +579,7 @@ protected function createControllerCallback($attribute) /** * Replace any route back-references in a route. * - * @param Illuminate\Routing\Route $route + * @param \Illuminate\Routing\Route $route * @param string $original * @return void */ @@ -633,8 +633,8 @@ protected function formatMethod($method) /** * Get the response for a given request. * - * @param Symfony\Component\HttpFoundation\Request $request - * @return Symfony\Component\HttpFoundation\Response + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Symfony\Component\HttpFoundation\Response */ public function dispatch(Request $request) { @@ -665,8 +665,8 @@ public function dispatch(Request $request) /** * Match the given request to a route object. * - * @param Symfony\Component\HttpFoundation\Request $request - * @return Illuminate\Routing\Route + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Illuminate\Routing\Route */ protected function findRoute(Request $request) { @@ -826,7 +826,7 @@ public function matchFilter($pattern, $names) /** * Find the patterned filters matching a request. * - * @param Illuminate\Foundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @return array */ public function findPatternFilters(Request $request) @@ -850,8 +850,8 @@ public function findPatternFilters(Request $request) /** * Call the "after" global filters. * - * @param Symfony\Component\HttpFoundation\Request $request - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response * @return mixed */ protected function callAfterFilter(Request $request, SymfonyResponse $response) @@ -864,8 +864,8 @@ protected function callAfterFilter(Request $request, SymfonyResponse $response) /** * Call the "finish" global filter. * - * @param Symfony\Component\HttpFoundation\Request $request - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response * @return mixed */ public function callFinishFilter(Request $request, SymfonyResponse $response) @@ -876,7 +876,7 @@ public function callFinishFilter(Request $request, SymfonyResponse $response) /** * Call a given global filter with the parameters. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @param string $name * @param array $parameters * @return mixed @@ -905,8 +905,8 @@ protected function callGlobalFilter(Request $request, $name, array $parameters = * Prepare the given value as a Response object. * * @param mixed $value - * @param Illuminate\Foundation\Request $request - * @return Symfony\Component\HttpFoundation\Response + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Symfony\Component\HttpFoundation\Response */ public function prepare($value, Request $request) { @@ -918,7 +918,7 @@ public function prepare($value, Request $request) /** * Convert routing exception to HttpKernel version. * - * @param Exception $e + * @param \Exception $e * @return void */ protected function handleRoutingException(\Exception $e) @@ -996,7 +996,7 @@ public function disableFilters() /** * Get the current request being dispatched. * - * @return Symfony\Component\HttpFoundation\Request + * @return \Symfony\Component\HttpFoundation\Request */ public function getRequest() { @@ -1006,7 +1006,7 @@ public function getRequest() /** * Get the current route being executed. * - * @return Illuminate\Routing\Route + * @return \Illuminate\Routing\Route */ public function getCurrentRoute() { @@ -1016,7 +1016,7 @@ public function getCurrentRoute() /** * Set the current route on the router. * - * @param Illuminate\Routing\Route $route + * @param \Illuminate\Routing\Route $route * @return void */ public function setCurrentRoute(Route $route) @@ -1027,8 +1027,8 @@ public function setCurrentRoute(Route $route) /** * Create a new URL matcher instance. * - * @param Symfony\Component\HttpFoundation\Request $request - * @return Symfony\Component\Routing\Matcher\UrlMatcher + * @param \Symfony\Component\HttpFoundation\Request $request + * @return \Symfony\Component\Routing\Matcher\UrlMatcher */ protected function getUrlMatcher(Request $request) { @@ -1042,7 +1042,7 @@ protected function getUrlMatcher(Request $request) /** * Retrieve the entire route collection. * - * @return Symfony\Component\Routing\RouteCollection + * @return \Symfony\Component\Routing\RouteCollection */ public function getRoutes() { @@ -1052,7 +1052,7 @@ public function getRoutes() /** * Set the container instance on the router. * - * @param Illuminate\Container $container + * @param \Illuminate\Container\Container $container * @return void */ public function setContainer(Container $container) diff --git a/src/Illuminate/Routing/UrlGenerator.php b/src/Illuminate/Routing/UrlGenerator.php index 0dd0d24cfdb6..1dd269c26edc 100644 --- a/src/Illuminate/Routing/UrlGenerator.php +++ b/src/Illuminate/Routing/UrlGenerator.php @@ -10,29 +10,29 @@ class UrlGenerator { /** * The route collection. * - * @var Symfony\Component\Routing\RouteCollection + * @var \Symfony\Component\Routing\RouteCollection */ protected $routes; /** * The request instance. * - * @var Symfony\Component\HttpFoundation\Request + * @var \Symfony\Component\HttpFoundation\Request */ protected $request; /** * The Symfony routing URL generator. * - * @var Symfony\Component\Routing\Generator\UrlGenerator + * @var \Symfony\Component\Routing\Generator\UrlGenerator */ protected $generator; /** * Create a new URL Generator instance. * - * @param Symfony\Component\Routing\RouteCollection $routes - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\Routing\RouteCollection $routes + * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function __construct(RouteCollection $routes, Request $request) @@ -164,7 +164,7 @@ protected function usingQuickParameters(array $parameters) /** * Build the parameter list for short circuit parameters. * - * @param Illuminate\Routing\Route $route + * @param \Illuminate\Routing\Route $route * @param array $parameters * @return array */ @@ -245,7 +245,7 @@ public function isValidUrl($path) /** * Get the request instance. * - * @return Symfony\Component\HttpFoundation\Request + * @return \Symfony\Component\HttpFoundation\Request */ public function getRequest() { @@ -255,7 +255,7 @@ public function getRequest() /** * Set the current request instance. * - * @param Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function setRequest(Request $request) @@ -272,7 +272,7 @@ public function setRequest(Request $request) /** * Get the Symfony URL generator instance. * - * @return Symfony\Component\Routing\Generator\UrlGenerator + * @return \Symfony\Component\Routing\Generator\UrlGenerator */ public function getGenerator() { @@ -282,7 +282,7 @@ public function getGenerator() /** * Get the Symfony URL generator instance. * - * @param Symfony\Component\Routing\Generator\UrlGenerator $generator + * @param \Symfony\Component\Routing\Generator\UrlGenerator $generator * @return void */ public function setGenerator(SymfonyGenerator $generator) diff --git a/src/Illuminate/Session/CacheDrivenStore.php b/src/Illuminate/Session/CacheDrivenStore.php index f1f7ca897f06..f7ef150997fc 100644 --- a/src/Illuminate/Session/CacheDrivenStore.php +++ b/src/Illuminate/Session/CacheDrivenStore.php @@ -7,14 +7,14 @@ class CacheDrivenStore extends Store { /** * The cache store instance. * - * @var Illuminate\Cache\Store + * @var \Illuminate\Cache\Store */ protected $cache; /** * Create a new Memcache session instance. * - * @param Illuminate\Cache\Store $cache + * @param \Illuminate\Cache\Store $cache * @return void */ public function __construct(\Illuminate\Cache\Store $cache) @@ -38,7 +38,7 @@ public function retrieveSession($id) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function createSession($id, array $session, Response $response) @@ -51,7 +51,7 @@ public function createSession($id, array $session, Response $response) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function updateSession($id, array $session, Response $response) diff --git a/src/Illuminate/Session/CookieStore.php b/src/Illuminate/Session/CookieStore.php index 2d3bfe4fde37..edc8fdb9fc07 100644 --- a/src/Illuminate/Session/CookieStore.php +++ b/src/Illuminate/Session/CookieStore.php @@ -8,7 +8,7 @@ class CookieStore extends Store { /** * The Illuminate cookie creator. * - * @var Illuminate\CookieJar + * @var \Illuminate\Cookie\CookieJar */ protected $cookies; @@ -22,7 +22,7 @@ class CookieStore extends Store { /** * Create a new Cookie based session store. * - * @param Illuminate\CookieJar $cookies + * @param \Illuminate\Cookie\CookieJar $cookies * @return void */ public function __construct(CookieJar $cookies) @@ -46,7 +46,7 @@ public function retrieveSession($id) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function createSession($id, array $session, Response $response) @@ -61,7 +61,7 @@ public function createSession($id, array $session, Response $response) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function updateSession($id, array $session, Response $response) @@ -83,7 +83,7 @@ public function setPayloadName($name) /** * Get the cookie jar instance. * - * @return Illuminate\CookieJar + * @return \Illuminate\Cookie\CookieJar */ public function getCookieJar() { diff --git a/src/Illuminate/Session/DatabaseStore.php b/src/Illuminate/Session/DatabaseStore.php index 287adaa8280a..4904e63023a0 100644 --- a/src/Illuminate/Session/DatabaseStore.php +++ b/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\Encryption\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\Encryption\Encrypter $encrypter * @param string $table * @return void */ @@ -63,7 +63,7 @@ public function retrieveSession($id) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function createSession($id, array $session, Response $response) @@ -80,7 +80,7 @@ public function createSession($id, array $session, Response $response) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function updateSession($id, array $session, Response $response) @@ -106,7 +106,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() { @@ -116,7 +116,7 @@ protected function table() /** * Get the database connection instance. * - * @return Illuminate\Database\Connection + * @return \Illuminate\Database\Connection */ public function getConnection() { @@ -126,7 +126,7 @@ public function getConnection() /** * Get the encrypter instance. * - * @return Illuminate\Encrypter + * @return \Illuminate\Encryption\Encrypter */ public function getEncrypter() { diff --git a/src/Illuminate/Session/FileStore.php b/src/Illuminate/Session/FileStore.php index d67c40572748..e603b36bf3c2 100644 --- a/src/Illuminate/Session/FileStore.php +++ b/src/Illuminate/Session/FileStore.php @@ -8,7 +8,7 @@ class FileStore extends Store implements Sweeper { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\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\Filesystem $files * @param string $path */ public function __construct(Filesystem $files, $path) @@ -50,7 +50,7 @@ public function retrieveSession($id) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function createSession($id, array $session, Response $response) @@ -63,7 +63,7 @@ public function createSession($id, array $session, Response $response) * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ public function updateSession($id, array $session, Response $response) diff --git a/src/Illuminate/Session/SessionManager.php b/src/Illuminate/Session/SessionManager.php index 9081ba62d63d..539ac080cde7 100644 --- a/src/Illuminate/Session/SessionManager.php +++ b/src/Illuminate/Session/SessionManager.php @@ -1,115 +1,115 @@ -app['cookie']); - } - - /** - * Create an instance of the file session driver. - * - * @return Illuminate\Session\FileStore - */ - protected function createFileDriver() - { - $path = $this->app['config']['session.path']; - - return new FileStore($this->app['files'], $path); - } - - /** - * Create an instance of the APC session driver. - * - * @return Illuminate\Session\CacheDrivenStore - */ - protected function createApcDriver() - { - return $this->createCacheBased('apc'); - } - - /** - * Create an instance of the Memcached session driver. - * - * @return Illuminate\Session\CacheDrivenStore - */ - protected function createMemcachedDriver() - { - return $this->createCacheBased('memcached'); - } - - /** - * Create an instance of the Redis session driver. - * - * @return Illuminate\Session\CacheDrivenStore - */ - protected function createRedisDriver() - { - return $this->createCacheBased('redis'); - } - - /** - * Create an instance of the "array" session driver. - * - * @return Illuminate\Session\CacheDrivenStore - */ - protected function createArrayDriver() - { - return $this->createCacheBased('array'); - } - - /** - * Create an instance of the database session driver. - * - * @return Illuminate\Session\DatabaseStore - */ - protected function createDatabaseDriver() - { - $connection = $this->getDatabaseConnection(); - - $table = $this->app['config']['session.table']; - - return new DatabaseStore($connection, $this->app['encrypter'], $table); - } - - /** - * Get the database connection for the database driver. - * - * @return Illuminate\Database\Connection - */ - protected function getDatabaseConnection() - { - $connection = $this->app['config']['session.connection']; - - return $this->app['db']->connection($connection); - } - - /** - * Create an instance of a cache driven driver. - * - * @return Illuminate\Session\CacheDrivenStore - */ - protected function createCacheBased($driver) - { - return new CacheDrivenStore($this->app['cache']->driver($driver)); - } - - /** - * Get the default session driver name. - * - * @return string - */ - protected function getDefaultDriver() - { - return $this->app['config']['session.driver']; - } - +app['cookie']); + } + + /** + * Create an instance of the file session driver. + * + * @return \Illuminate\Session\FileStore + */ + protected function createFileDriver() + { + $path = $this->app['config']['session.path']; + + return new FileStore($this->app['files'], $path); + } + + /** + * Create an instance of the APC session driver. + * + * @return \Illuminate\Session\CacheDrivenStore + */ + protected function createApcDriver() + { + return $this->createCacheBased('apc'); + } + + /** + * Create an instance of the Memcached session driver. + * + * @return \Illuminate\Session\CacheDrivenStore + */ + protected function createMemcachedDriver() + { + return $this->createCacheBased('memcached'); + } + + /** + * Create an instance of the Redis session driver. + * + * @return \Illuminate\Session\CacheDrivenStore + */ + protected function createRedisDriver() + { + return $this->createCacheBased('redis'); + } + + /** + * Create an instance of the "array" session driver. + * + * @return \Illuminate\Session\CacheDrivenStore + */ + protected function createArrayDriver() + { + return $this->createCacheBased('array'); + } + + /** + * Create an instance of the database session driver. + * + * @return \Illuminate\Session\DatabaseStore + */ + protected function createDatabaseDriver() + { + $connection = $this->getDatabaseConnection(); + + $table = $this->app['config']['session.table']; + + return new DatabaseStore($connection, $this->app['encrypter'], $table); + } + + /** + * Get the database connection for the database driver. + * + * @return \Illuminate\Database\Connection + */ + protected function getDatabaseConnection() + { + $connection = $this->app['config']['session.connection']; + + return $this->app['db']->connection($connection); + } + + /** + * Create an instance of a cache driven driver. + * + * @return \Illuminate\Session\CacheDrivenStore + */ + protected function createCacheBased($driver) + { + return new CacheDrivenStore($this->app['cache']->driver($driver)); + } + + /** + * Get the default session driver name. + * + * @return string + */ + protected function getDefaultDriver() + { + return $this->app['config']['session.driver']; + } + } \ No newline at end of file diff --git a/src/Illuminate/Session/Store.php b/src/Illuminate/Session/Store.php index bf77ee3568ff..aeec2e49267f 100644 --- a/src/Illuminate/Session/Store.php +++ b/src/Illuminate/Session/Store.php @@ -62,7 +62,7 @@ abstract public function retrieveSession($id); * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ abstract public function createSession($id, array $session, Response $response); @@ -72,7 +72,7 @@ abstract public function createSession($id, array $session, Response $response); * * @param string $id * @param array $session - * @param Symfony\Component\HttpFoundation\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @return void */ abstract public function updateSession($id, array $session, Response $response); @@ -80,7 +80,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 * @return void */ public function start(CookieJar $cookies) @@ -358,8 +358,8 @@ public function regenerate() /** * Finish the session handling for the request. * - * @param Symfony\Component\HttpFoundation\Response $response - * @param Illuminate\CookieJar $cookie + * @param \Symfony\Component\HttpFoundation\Response $response + * @param \Illuminate\Cookie\CookieJar $cookie * @param int $lifetime * @return void */ @@ -435,8 +435,8 @@ public function hitsLottery() * Write the session cookie to the response. * * @param string $id - * @param Symfony\Component\HttpFoundation\Response $response - * @param Illuminate\Jar $cookie + * @param \Symfony\Component\HttpFoundation\Response $response + * @param \Illuminate\Cookie\CookieJar $cookie * @param int $lifetime * @return void */ diff --git a/src/Illuminate/Support/Contracts/MessageProviderInterface.php b/src/Illuminate/Support/Contracts/MessageProviderInterface.php index b0a7fdc35aa7..99febecc9739 100644 --- a/src/Illuminate/Support/Contracts/MessageProviderInterface.php +++ b/src/Illuminate/Support/Contracts/MessageProviderInterface.php @@ -1,12 +1,12 @@ -addFilter($name, $callback); - } - - /** - * Tie a registered middleware to a URI pattern. - * - * @param string $pattern - * @param string|array $name - * @return void - */ - public static function when($pattern, $name) - { - return static::$app['router']->matchFilter($pattern, $name); - } - - /** - * Determine if the current route matches a given name. - * - * @param string $name - * @return bool - */ - public static function is($name) - { - return static::$app['router']->currentRouteNamed($name); - } - - /** - * Determine if the current route uses a given controller action. - * - * @param string $action - * @return bool - */ - public static function uses($action) - { - return static::$app['router']->currentRouteUses($action); - } - - /** - * Get the registered name of the component. - * - * @return string - */ - protected static function getFacadeAccessor() { return 'router'; } - +addFilter($name, $callback); + } + + /** + * Tie a registered middleware to a URI pattern. + * + * @param string $pattern + * @param string|array $name + * @return void + */ + public static function when($pattern, $name) + { + return static::$app['router']->matchFilter($pattern, $name); + } + + /** + * Determine if the current route matches a given name. + * + * @param string $name + * @return bool + */ + public static function is($name) + { + return static::$app['router']->currentRouteNamed($name); + } + + /** + * Determine if the current route uses a given controller action. + * + * @param string $action + * @return bool + */ + public static function uses($action) + { + return static::$app['router']->currentRouteUses($action); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() { return 'router'; } + } \ No newline at end of file diff --git a/src/Illuminate/Support/Facades/Schema.php b/src/Illuminate/Support/Facades/Schema.php index 8d1476dba7c6..a3f101bef9c5 100644 --- a/src/Illuminate/Support/Facades/Schema.php +++ b/src/Illuminate/Support/Facades/Schema.php @@ -1,26 +1,26 @@ -connection($name)->getSchemaBuilder(); - } - - /** - * Get the registered name of the component. - * - * @return string - */ - protected static function getFacadeAccessor() - { - return static::$app['db']->connection()->getSchemaBuilder(); - } - +connection($name)->getSchemaBuilder(); + } + + /** + * Get the registered name of the component. + * + * @return string + */ + protected static function getFacadeAccessor() + { + return static::$app['db']->connection()->getSchemaBuilder(); + } + } \ No newline at end of file diff --git a/src/Illuminate/Support/Fluent.php b/src/Illuminate/Support/Fluent.php index 55990f2281ca..027ebd2e0436 100644 --- a/src/Illuminate/Support/Fluent.php +++ b/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) { diff --git a/src/Illuminate/Support/Manager.php b/src/Illuminate/Support/Manager.php index a56e6910fac0..e7f03f940b27 100644 --- a/src/Illuminate/Support/Manager.php +++ b/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) diff --git a/src/Illuminate/Support/MessageBag.php b/src/Illuminate/Support/MessageBag.php index 064fdddfa645..66559a3b724c 100644 --- a/src/Illuminate/Support/MessageBag.php +++ b/src/Illuminate/Support/MessageBag.php @@ -1,201 +1,201 @@ -:message'; - - /** - * Add a message to the bag. - * - * @param string $key - * @param string $message - * @return void - */ - public function add($key, $message) - { - if ($this->isUnique($key, $message)) - { - $this->messages[$key][] = $message; - } - } - - /** - * Determine if a key and message combination already exists. - * - * @param string $key - * @param string $message - * @return bool - */ - protected function isUnique($key, $message) - { - $messages = (array) $this->messages; - - return ! isset($messages[$key]) or ! in_array($message, $messages[$key]); - } - - /** - * Determine if messages exist for a given key. - * - * @param string $key - * @return bool - */ - public function has($key = null) - { - return $this->first($key) !== ''; - } - - /** - * Get the first message from the bag for a given key. - * - * @param string $key - * @param string $format - * @return string - */ - public function first($key = null, $format = null) - { - $messages = $this->get($key, $format); - - return (count($messages) > 0) ? $messages[0] : ''; - } - - /** - * Get all of the messages from the bag for a given key. - * - * @param string $key - * @param string $format - * @return array - */ - public function get($key, $format = null) - { - $format = $this->checkFormat($format); - - // If the message exists in the container, we will transform it and return - // the message. Otherwise, we'll return an empty array since the entire - // methods is to return back an array of messages in the first place. - if (array_key_exists($key, $this->messages)) - { - return $this->transform($this->messages[$key], $format); - } - - return array(); - } - - /** - * Get all of the messages for every key in the bag. - * - * @param string $format - * @return array - */ - public function all($format = null) - { - $format = $this->checkFormat($format); - - $all = array(); - - foreach ($this->messages as $messages) - { - $all = array_merge($all, $this->transform($messages, $format)); - } - - return $all; - } - - /** - * Format an array of messages. - * - * @param array $messages - * @param string $format - * @return array - */ - protected function transform($messages, $format) - { - $messages = (array) $messages; - - // We will simply spin through the given messages and transform each one - // replacing the :message place holder with the real message allowing - // the messages to be easily formatted to each developer's desires. - foreach ($messages as $key => &$message) - { - $message = str_replace(':message', $message, $format); - } - - return $messages; - } - - /** - * Get the appropriate format based on the given format. - * - * @param string $format - * @return string - */ - protected function checkFormat($format) - { - return ($format === null) ? $this->format : $format; - } - - /** - * Get the raw messages in the container. - * - * @return array - */ - public function getMessages() - { - return $this->messages; - } - - /** - * Get the messages for the instance. - * - * @return ILluminate\Support\MessageBag - */ - public function getMessageBag() - { - return $this; - } - - /** - * Get the default message format. - * - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Set the default message format. - * - * @param string $format - */ - public function setFormat($format = ':message') - { - $this->format = $format; - } - - /** - * Get the number of messages in the container. - * - * @return int - */ - public function count() - { - return count($this->messages); - } - +:message'; + + /** + * Add a message to the bag. + * + * @param string $key + * @param string $message + * @return void + */ + public function add($key, $message) + { + if ($this->isUnique($key, $message)) + { + $this->messages[$key][] = $message; + } + } + + /** + * Determine if a key and message combination already exists. + * + * @param string $key + * @param string $message + * @return bool + */ + protected function isUnique($key, $message) + { + $messages = (array) $this->messages; + + return ! isset($messages[$key]) or ! in_array($message, $messages[$key]); + } + + /** + * Determine if messages exist for a given key. + * + * @param string $key + * @return bool + */ + public function has($key = null) + { + return $this->first($key) !== ''; + } + + /** + * Get the first message from the bag for a given key. + * + * @param string $key + * @param string $format + * @return string + */ + public function first($key = null, $format = null) + { + $messages = $this->get($key, $format); + + return (count($messages) > 0) ? $messages[0] : ''; + } + + /** + * Get all of the messages from the bag for a given key. + * + * @param string $key + * @param string $format + * @return array + */ + public function get($key, $format = null) + { + $format = $this->checkFormat($format); + + // If the message exists in the container, we will transform it and return + // the message. Otherwise, we'll return an empty array since the entire + // methods is to return back an array of messages in the first place. + if (array_key_exists($key, $this->messages)) + { + return $this->transform($this->messages[$key], $format); + } + + return array(); + } + + /** + * Get all of the messages for every key in the bag. + * + * @param string $format + * @return array + */ + public function all($format = null) + { + $format = $this->checkFormat($format); + + $all = array(); + + foreach ($this->messages as $messages) + { + $all = array_merge($all, $this->transform($messages, $format)); + } + + return $all; + } + + /** + * Format an array of messages. + * + * @param array $messages + * @param string $format + * @return array + */ + protected function transform($messages, $format) + { + $messages = (array) $messages; + + // We will simply spin through the given messages and transform each one + // replacing the :message place holder with the real message allowing + // the messages to be easily formatted to each developer's desires. + foreach ($messages as $key => &$message) + { + $message = str_replace(':message', $message, $format); + } + + return $messages; + } + + /** + * Get the appropriate format based on the given format. + * + * @param string $format + * @return string + */ + protected function checkFormat($format) + { + return ($format === null) ? $this->format : $format; + } + + /** + * Get the raw messages in the container. + * + * @return array + */ + public function getMessages() + { + return $this->messages; + } + + /** + * Get the messages for the instance. + * + * @return \Illuminate\Support\MessageBag + */ + public function getMessageBag() + { + return $this; + } + + /** + * Get the default message format. + * + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Set the default message format. + * + * @param string $format + */ + public function setFormat($format = ':message') + { + $this->format = $format; + } + + /** + * Get the number of messages in the container. + * + * @return int + */ + public function count() + { + return count($this->messages); + } + } \ No newline at end of file diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index cabed2fba1b1..4375afb4dd40 100644 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/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) diff --git a/src/Illuminate/Translation/FileLoader.php b/src/Illuminate/Translation/FileLoader.php index 7691cbfdcf63..bf8880578782 100644 --- a/src/Illuminate/Translation/FileLoader.php +++ b/src/Illuminate/Translation/FileLoader.php @@ -7,7 +7,7 @@ class FileLoader implements LoaderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; @@ -28,7 +28,7 @@ class FileLoader implements LoaderInterface { /** * Create a new file loader instance. * - * @param Illuminate\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem $files * @return void */ public function __construct(Filesystem $files, $path) diff --git a/src/Illuminate/Translation/Translator.php b/src/Illuminate/Translation/Translator.php index ca66e68f8445..fce7862b278c 100644 --- a/src/Illuminate/Translation/Translator.php +++ b/src/Illuminate/Translation/Translator.php @@ -9,14 +9,14 @@ class Translator extends NamespacedItemResolver implements TranslatorInterface { /** * The loader implementation. * - * @var Illuminate\Translation\LoaderInterface + * @var \Illuminate\Translation\LoaderInterface */ protected $loader; /** * The Symfony translator instance. * - * @var Symfony\Translation\Translator + * @var \Symfony\Translation\Translator */ protected $trans; @@ -48,7 +48,7 @@ public function __construct(LoaderInterface $loader, $default, $fallback) * * @param string $default * @param string $fallback - * @return Symfony\Component\Translation\Translator + * @return \Symfony\Component\Translation\Translator */ protected function createSymfonyTranslator($default, $fallback) { @@ -258,7 +258,7 @@ public function setLocale($locale) /** * Get the base Symfony translator instance. * - * @return Symfony\Translation\Translator + * @return \Symfony\Translation\Translator */ public function getSymfonyTranslator() { @@ -268,7 +268,7 @@ public function getSymfonyTranslator() /** * Get the base Symfony translator instance. * - * @param Symfony\Translation\Translator $trans + * @param \Symfony\Translation\Translator $trans * @return void */ public function setSymfonyTranslator(SymfonyTranslator $trans) diff --git a/src/Illuminate/Validation/DatabasePresenceVerifier.php b/src/Illuminate/Validation/DatabasePresenceVerifier.php index a030bc0be3dd..f166c2f3a8ff 100644 --- a/src/Illuminate/Validation/DatabasePresenceVerifier.php +++ b/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) { diff --git a/src/Illuminate/Validation/Factory.php b/src/Illuminate/Validation/Factory.php index 57af0194ff1c..ba46e371a5ae 100644 --- a/src/Illuminate/Validation/Factory.php +++ b/src/Illuminate/Validation/Factory.php @@ -8,14 +8,14 @@ class Factory { /** * The Translator implementation. * - * @var Symfony\Component\Translator\TranslatorInterface + * @var \Symfony\Component\Translator\TranslatorInterface */ protected $translator; /** * The Presence Verifier implementation. * - * @var Illuminate\Validation\PresenceVerifierInterface + * @var \Illuminate\Validation\PresenceVerifierInterface */ protected $presenceVerifier; @@ -36,7 +36,7 @@ class Factory { /** * Create a new Validator factory instance. * - * @param Symfony\Component\Translation\TranslatorInterface $translator + * @param \Symfony\Component\Translation\TranslatorInterface $translator * @return void */ public function __construct(TranslatorInterface $translator) @@ -50,7 +50,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()) { @@ -72,7 +72,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) { @@ -112,7 +112,7 @@ public function resolver(Closure $resolver) /** * Get the Translator implementation. * - * @return Symfony\Component\Translation\TranslatorInterface + * @return \Symfony\Component\Translation\TranslatorInterface */ public function getTranslator() { @@ -122,7 +122,7 @@ public function getTranslator() /** * Get the Presence Verifier implementation. * - * @return Illuminate\Validation\PresenceVerifierInterface + * @return \Illuminate\Validation\PresenceVerifierInterface */ public function getPresenceVerifier() { @@ -132,7 +132,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) diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php index eb0bb2bd7af4..74c9a7dc5b9c 100644 --- a/src/Illuminate/Validation/Validator.php +++ b/src/Illuminate/Validation/Validator.php @@ -11,21 +11,21 @@ class Validator implements MessageProviderInterface { /** * The Translator implementation. * - * @var Symfony\Component\Translation\TranslatorInterface + * @var \Symfony\Component\Translation\TranslatorInterface */ protected $translator; /** * 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; @@ -1311,7 +1311,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) { @@ -1323,7 +1323,7 @@ public function setFiles(array $files) /** * Get the Presence Verifier implementation. * - * @return Illuminate\Validation\PresenceVerifierInterface + * @return \Illuminate\Validation\PresenceVerifierInterface */ public function getPresenceVerifier() { @@ -1338,7 +1338,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) @@ -1349,7 +1349,7 @@ public function setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) /** * Get the Translator implementation. * - * @return Symfony\Component\Translation\TranslatorInterface + * @return \Symfony\Component\Translation\TranslatorInterface */ public function getTranslator() { @@ -1359,7 +1359,7 @@ public function getTranslator() /** * Set the Translator implementation. * - * @param Symfony\Component\Translation\TranslatorInterface $translator + * @param \Symfony\Component\Translation\TranslatorInterface $translator * @return void */ public function setTranslator(TranslatorInterface $translator) @@ -1370,7 +1370,7 @@ public function setTranslator(TranslatorInterface $translator) /** * Get the message container for the validator. * - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function messages() { @@ -1380,7 +1380,7 @@ public function messages() /** * An alternative more semantic shortcut to the message container. * - * @return Illuminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function errors() { @@ -1390,7 +1390,7 @@ public function errors() /** * Get the messages for the instance. * - * @return ILluminate\Support\MessageBag + * @return \Illuminate\Support\MessageBag */ public function getMessageBag() { diff --git a/src/Illuminate/View/Compilers/Compiler.php b/src/Illuminate/View/Compilers/Compiler.php index f9e2f31d8b75..50ed7824afbb 100644 --- a/src/Illuminate/View/Compilers/Compiler.php +++ b/src/Illuminate/View/Compilers/Compiler.php @@ -7,7 +7,7 @@ abstract class Compiler { /** * The Filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\Filesystem */ protected $files; diff --git a/src/Illuminate/View/Engines/CompilerEngine.php b/src/Illuminate/View/Engines/CompilerEngine.php index ada6418f340e..952d6f137b50 100644 --- a/src/Illuminate/View/Engines/CompilerEngine.php +++ b/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() { diff --git a/src/Illuminate/View/Engines/EngineResolver.php b/src/Illuminate/View/Engines/EngineResolver.php index 026c12f8fb94..3ac4bbfb9b37 100644 --- a/src/Illuminate/View/Engines/EngineResolver.php +++ b/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) { diff --git a/src/Illuminate/View/Environment.php b/src/Illuminate/View/Environment.php index cb9cb59976e8..6fdc47faf221 100644 --- a/src/Illuminate/View/Environment.php +++ b/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\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 array $data - * @return Illuminate\View\View + * @return \Illuminate\View\View */ public function make($view, array $data = array()) { @@ -156,7 +156,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) { @@ -246,7 +246,7 @@ protected function addClassComposer($view, $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) @@ -429,7 +429,7 @@ public function addExtension($extension, $engine, $resolver = null) /** * Get the engine resolver instance. * - * @return Illuminate\View\Engines\EngineResolver + * @return \Illuminate\View\Engines\EngineResolver */ public function getEngineResolver() { @@ -439,7 +439,7 @@ public function getEngineResolver() /** * Get the view finder instance. * - * @return Illuminate\View\ViewFinder + * @return \Illuminate\View\ViewFinderInterface */ public function getFinder() { @@ -449,7 +449,7 @@ public function getFinder() /** * Get the event dispatcher instance. * - * @return Illuminate\Events\Dispatcher + * @return \Illuminate\Events\Dispatcher */ public function getDispatcher() { @@ -459,7 +459,7 @@ public function getDispatcher() /** * Get the IoC container instance. * - * @return Illuminate\Container + * @return \Illuminate\Container\Container */ public function getContainer() { @@ -469,7 +469,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) diff --git a/src/Illuminate/View/FileViewFinder.php b/src/Illuminate/View/FileViewFinder.php index d9581af12186..e93f51d15c78 100644 --- a/src/Illuminate/View/FileViewFinder.php +++ b/src/Illuminate/View/FileViewFinder.php @@ -7,7 +7,7 @@ class FileViewFinder implements ViewFinderInterface { /** * The filesystem instance. * - * @var Illuminate\Filesystem + * @var \Illuminate\Filesystem\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\Filesystem $files * @param array $paths * @param array $extensions * @return void @@ -182,7 +182,7 @@ public function addExtension($extension) /** * Get the filesystem instance. * - * @return Illuminate\Filesystem + * @return \Illuminate\Filesystem\Filesystem */ public function getFilesystem() { diff --git a/src/Illuminate/View/View.php b/src/Illuminate/View/View.php index 878c98014783..f5696402a9e6 100644 --- a/src/Illuminate/View/View.php +++ b/src/Illuminate/View/View.php @@ -9,14 +9,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; @@ -44,8 +44,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 @@ -123,7 +123,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) { @@ -145,7 +145,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()) { @@ -155,7 +155,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() { @@ -165,7 +165,7 @@ public function getEnvironment() /** * Get the view's rendering engine. * - * @return Illuminate\View\Engines\EngineInterface + * @return \Illuminate\View\Engines\EngineInterface */ public function getEngine() { diff --git a/src/Illuminate/View/ViewServiceProvider.php b/src/Illuminate/View/ViewServiceProvider.php index cf58d1f5f699..b7f0af3d6ad4 100644 --- a/src/Illuminate/View/ViewServiceProvider.php +++ b/src/Illuminate/View/ViewServiceProvider.php @@ -1,169 +1,169 @@ -registerEngineResolver(); - - $this->registerViewFinder(); - - $this->registerEnvironment(); - } - - /** - * Register the engine resolver instance. - * - * @return void - */ - public function registerEngineResolver() - { - list($me, $app) = array($this, $this->app); - - $app['view.engine.resolver'] = $app->share(function($app) use ($me) - { - $resolver = new EngineResolver; - - // Next we will register the various engines with the resolver so that the - // environment can resolve the engines it needs for various views based - // on the extension of view files. We call a method for each engines. - foreach (array('php', 'blade') as $engine) - { - $me->{'register'.ucfirst($engine).'Engine'}($resolver); - } - - return $resolver; - }); - } - - /** - * Register the PHP engine implementation. - * - * @param Illuminate\View\Engines\EngineResolver $resolver - * @return void - */ - public function registerPhpEngine($resolver) - { - $resolver->register('php', function() { return new PhpEngine; }); - } - - /** - * Register the Blade engine implementation. - * - * @param Illuminate\View\Engines\EngineResolver $resolver - * @return void - */ - public function registerBladeEngine($resolver) - { - $app = $this->app; - - $resolver->register('blade', function() use ($app) - { - $cache = $app['path'].'/storage/views'; - - // The Compiler engine requires an instance of the CompilerInterface, which in - // this case will be the Blade compiler, so we'll first create the compiler - // instance to pass into the engine so it can compile the views properly. - $compiler = new BladeCompiler($app['files'], $cache); - - return new CompilerEngine($compiler, $app['files']); - }); - } - - /** - * Register the view finder implementation. - * - * @return void - */ - public function registerViewFinder() - { - $this->app['view.finder'] = $this->app->share(function($app) - { - $paths = $app['config']['view.paths']; - - return new FileViewFinder($app['files'], $paths); - }); - } - - /** - * Register the view environment. - * - * @return void - */ - public function registerEnvironment() - { - $me = $this; - - $this->app['view'] = $this->app->share(function($app) use ($me) - { - // Next we need to grab the engine resolver instance that will be used by the - // environment. The resolver will be used by an environment to get each of - // the various engine implementations such as plain PHP or Blade engine. - $resolver = $app['view.engine.resolver']; - - $finder = $app['view.finder']; - - $events = $app['events']; - - $environment = new Environment($resolver, $finder, $events); - - // If the current session has an "errors" variable bound to it, we will share - // its value with all view instances so the views can easily access errors - // without having to bind. An empty bag is set when there aren't errors. - if ($me->sessionHasErrors($app)) - { - $errors = $app['session']->get('errors'); - - $environment->share('errors', $errors); - } - - // Putting the errors in the view for every view allows the developer to just - // assume that some errors are always available, which is convenient since - // they don't have to continually run checks for the presence of errors. - else - { - $environment->share('errors', new MessageBag); - } - - // We will also set the container instance on this view environment since the - // view composers may be classes registered in the container, which allows - // for great testable, flexible composers for the application developer. - $environment->setContainer($app); - - $environment->share('app', $app); - - return $environment; - }); - } - - /** - * Determine if the application session has errors. - * - * @param Illuminate\Foundation\Application $app - * @return bool - */ - public function sessionHasErrors($app) - { - $config = $app['config']['session']; - - if (isset($app['session']) and ! is_null($config['driver'])) - { - return $app['session']->has('errors'); - } - - } - +registerEngineResolver(); + + $this->registerViewFinder(); + + $this->registerEnvironment(); + } + + /** + * Register the engine resolver instance. + * + * @return void + */ + public function registerEngineResolver() + { + list($me, $app) = array($this, $this->app); + + $app['view.engine.resolver'] = $app->share(function($app) use ($me) + { + $resolver = new EngineResolver; + + // Next we will register the various engines with the resolver so that the + // environment can resolve the engines it needs for various views based + // on the extension of view files. We call a method for each engines. + foreach (array('php', 'blade') as $engine) + { + $me->{'register'.ucfirst($engine).'Engine'}($resolver); + } + + return $resolver; + }); + } + + /** + * Register the PHP engine implementation. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @return void + */ + public function registerPhpEngine($resolver) + { + $resolver->register('php', function() { return new PhpEngine; }); + } + + /** + * Register the Blade engine implementation. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @return void + */ + public function registerBladeEngine($resolver) + { + $app = $this->app; + + $resolver->register('blade', function() use ($app) + { + $cache = $app['path'].'/storage/views'; + + // The Compiler engine requires an instance of the CompilerInterface, which in + // this case will be the Blade compiler, so we'll first create the compiler + // instance to pass into the engine so it can compile the views properly. + $compiler = new BladeCompiler($app['files'], $cache); + + return new CompilerEngine($compiler, $app['files']); + }); + } + + /** + * Register the view finder implementation. + * + * @return void + */ + public function registerViewFinder() + { + $this->app['view.finder'] = $this->app->share(function($app) + { + $paths = $app['config']['view.paths']; + + return new FileViewFinder($app['files'], $paths); + }); + } + + /** + * Register the view environment. + * + * @return void + */ + public function registerEnvironment() + { + $me = $this; + + $this->app['view'] = $this->app->share(function($app) use ($me) + { + // Next we need to grab the engine resolver instance that will be used by the + // environment. The resolver will be used by an environment to get each of + // the various engine implementations such as plain PHP or Blade engine. + $resolver = $app['view.engine.resolver']; + + $finder = $app['view.finder']; + + $events = $app['events']; + + $environment = new Environment($resolver, $finder, $events); + + // If the current session has an "errors" variable bound to it, we will share + // its value with all view instances so the views can easily access errors + // without having to bind. An empty bag is set when there aren't errors. + if ($me->sessionHasErrors($app)) + { + $errors = $app['session']->get('errors'); + + $environment->share('errors', $errors); + } + + // Putting the errors in the view for every view allows the developer to just + // assume that some errors are always available, which is convenient since + // they don't have to continually run checks for the presence of errors. + else + { + $environment->share('errors', new MessageBag); + } + + // We will also set the container instance on this view environment since the + // view composers may be classes registered in the container, which allows + // for great testable, flexible composers for the application developer. + $environment->setContainer($app); + + $environment->share('app', $app); + + return $environment; + }); + } + + /** + * Determine if the application session has errors. + * + * @param \Illuminate\Foundation\Application $app + * @return bool + */ + public function sessionHasErrors($app) + { + $config = $app['config']['session']; + + if (isset($app['session']) and ! is_null($config['driver'])) + { + return $app['session']->has('errors'); + } + + } + } \ No newline at end of file diff --git a/src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php b/src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php index 6dd3bdcfb00d..39a62056f172 100644 --- a/src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php +++ b/src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php @@ -1,123 +1,123 @@ -creator = $creator; - } - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $package = $this->buildPackage(); - - $this->info('Creating workbench...'); - - $path = $this->laravel['path.base'].'/workbench'; - - // A "plain" package simply does not contain the "views", "config" or any other - // Laravel intended directories. Plain packages don't contain those types of - // directories as they are primarily just plain libraries for consumption. - $plain = $this->input->getOption('plain'); - - $workbench = $this->creator->create($package, $path, $plain); - - $this->info('Package workbench created!'); - - // If the "composer" option has been specified, we will call composer update for - // the workbench so the dependencies will be installed and the classmaps get - // generated for the package. This will allow the devs to start migrating. - if ($this->input->getOption('composer')) - { - $this->comment('Installing dependencies for workbench...'); - - $this->callComposerUpdate($workbench); - } - } - - /** - * Call the composer update routine on the path. - * - * @param string $path - * @return void - */ - protected function callComposerUpdate($path) - { - chdir($path); - - passthru('composer install --dev'); - } - - /** - * Build the package details from user input. - * - * @return Illuminate\Workbench\Package - */ - protected function buildPackage() - { - $vendor = camel_case($this->ask('What is vendor name of the package?')); - - $name = camel_case($this->ask('What is the package name?')); - - $author = $this->ask('What is your name?'); - - $email = $this->ask('What is your e-mail address?'); - - return new Package($vendor, $name, $author, $email); - } - - /** - * Get the console command options. - * - * @return array - */ - protected function getOptions() - { - return array( - array('composer', null, InputOption::VALUE_NONE, 'Call "composer update" after workbench creation.'), - - array('plain', null, InputOption::VALUE_NONE, 'Skip creation of Laravel specific directories.'), - ); - } - -} +creator = $creator; + } + + /** + * Execute the console command. + * + * @return void + */ + public function fire() + { + $package = $this->buildPackage(); + + $this->info('Creating workbench...'); + + $path = $this->laravel['path.base'].'/workbench'; + + // A "plain" package simply does not contain the "views", "config" or any other + // Laravel intended directories. Plain packages don't contain those types of + // directories as they are primarily just plain libraries for consumption. + $plain = $this->input->getOption('plain'); + + $workbench = $this->creator->create($package, $path, $plain); + + $this->info('Package workbench created!'); + + // If the "composer" option has been specified, we will call composer update for + // the workbench so the dependencies will be installed and the classmaps get + // generated for the package. This will allow the devs to start migrating. + if ($this->input->getOption('composer')) + { + $this->comment('Installing dependencies for workbench...'); + + $this->callComposerUpdate($workbench); + } + } + + /** + * Call the composer update routine on the path. + * + * @param string $path + * @return void + */ + protected function callComposerUpdate($path) + { + chdir($path); + + passthru('composer install --dev'); + } + + /** + * Build the package details from user input. + * + * @return \Illuminate\Workbench\Package + */ + protected function buildPackage() + { + $vendor = camel_case($this->ask('What is vendor name of the package?')); + + $name = camel_case($this->ask('What is the package name?')); + + $author = $this->ask('What is your name?'); + + $email = $this->ask('What is your e-mail address?'); + + return new Package($vendor, $name, $author, $email); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return array( + array('composer', null, InputOption::VALUE_NONE, 'Call "composer update" after workbench creation.'), + + array('plain', null, InputOption::VALUE_NONE, 'Skip creation of Laravel specific directories.'), + ); + } + +} diff --git a/src/Illuminate/Workbench/PackageCreator.php b/src/Illuminate/Workbench/PackageCreator.php index 83ec9fbeed35..2e0cfd33c706 100644 --- a/src/Illuminate/Workbench/PackageCreator.php +++ b/src/Illuminate/Workbench/PackageCreator.php @@ -1,305 +1,305 @@ -files = $files; - } - - /** - * Create a new package stub. - * - * @param Illuminate\Workbench\Package $package - * @param string $path - * @param bool $plain - * @return string - */ - public function create(Package $package, $path, $plain = false) - { - $directory = $this->createDirectory($package, $path); - - $blocks = $plain ? $this->basicBlocks : $this->blocks; - - foreach ($blocks as $block) - { - $this->{"write{$block}"}($package, $directory, $plain); - } - - return $directory; - } - - /** - * Write the support files to the package root. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - public function writeSupportFiles(Package $package, $directory, $plain) - { - foreach (array('PhpUnit', 'Travis', 'Composer') as $file) - { - $this->{"write{$file}File"}($package, $directory, $plain); - } - } - - /** - * Write the PHPUnit stub file. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - protected function writePhpUnitFile(Package $package, $directory) - { - $this->files->copy(__DIR__.'/stubs/phpunit.xml', $directory.'/phpunit.xml'); - } - - /** - * Write the Travis stub file. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - protected function writeTravisFile(Package $package, $directory) - { - $this->files->copy(__DIR__.'/stubs/.travis.yml', $directory.'/.travis.yml'); - } - - /** - * Write the Composer.json stub file. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - protected function writeComposerFile(Package $package, $directory, $plain) - { - $stub = $this->getComposerStub($plain); - - $stub = $this->formatPackageStub($stub, $package); - - $this->files->put($directory.'/composer.json', $stub); - } - - /** - * Get the Composer.json stub file contents. - * - * @param bool $plain - * @return string - */ - protected function getComposerStub($plain) - { - if ($plain) - { - return $this->files->get(__DIR__.'/stubs/plain.composer.json'); - } - else - { - return $this->files->get(__DIR__.'/stubs/composer.json'); - } - } - - /** - * Create the support directories for a package. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - public function writeSupportDirectories(Package $package, $directory) - { - foreach (array('config', 'lang', 'migrations', 'views') as $support) - { - // Once we create the source directory, we will write an empty file to the - // directory so that it will be kept in source control allowing the dev - // to go ahead and push these components to Github right on creation. - $path = $directory.'/src/'.$support; - - $this->files->makeDirectory($path, 0777, true); - - $this->files->put($path.'/.gitkeep', ''); - } - } - - /** - * Create the public directory for the pacakge. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - public function writePublicDirectory(Package $package, $directory, $plain) - { - if ($plain) return; - - $this->files->makeDirectory($directory.'/public'); - - $this->files->put($directory.'/public/.gitkeep', ''); - } - - /** - * Create the test directory for the pacakge. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - public function writeTestDirectory(Package $package, $directory) - { - $this->files->makeDirectory($directory.'/tests'); - - $this->files->put($directory.'/tests/.gitkeep', ''); - } - - /** - * Write the stub ServiceProvider for the package. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return void - */ - public function writeServiceProvider(Package $package, $directory, $plain) - { - // Once we have the service provider stub, we will need to format it and make - // the necessary replacements to the class, namespaces, etc. Then we'll be - // able to write it out into the package's workbench directory for them. - $stub = $this->getProviderStub($plain); - - $stub = $this->formatPackageStub($stub, $package); - - $path = $this->createClassDirectory($package, $directory); - - // The primary source directory where the package's classes will live may not - // exist yet, so we will need to create it before we write these providers - // out to that location. We'll go ahead and create now here before then. - $file = $path.'/'.$package->name.'ServiceProvider.php'; - - $this->files->put($file, $stub); - } - - /** - * Get the stub for a ServiceProvider. - * - * @param bool $plain - * @return string - */ - protected function getProviderStub($plain) - { - if ($plain) - { - return $this->files->get(__DIR__.'/stubs/plain.provider.php'); - } - else - { - return $this->files->get(__DIR__.'/stubs/provider.php'); - } - } - - /** - * Create the main source directory for the package. - * - * @param Illuminate\Workbench\Package $package - * @param string $directory - * @return string - */ - protected function createClassDirectory(Package $package, $directory) - { - $path = $directory.'/src/'.$package->vendor.'/'.$package->name; - - if ( ! $this->files->isDirectory($path)) - { - $this->files->makeDirectory($path, 0777, true); - } - - return $path; - } - - /** - * Format a generic package stub file. - * - * @param string $stub - * @param Illuminate\Workbench\Package $package - * @return string - */ - protected function formatPackageStub($stub, Package $package) - { - // When replacing values in the stub, we can just take the object vars of - // the package and snake case them. This should give us the array with - // all the necessary replacements variables present and ready to go. - foreach (get_object_vars($package) as $key => $value) - { - $key = '{{'.snake_case($key).'}}'; - - $stub = str_replace($key, $value, $stub); - } - - return $stub; - } - - /** - * Create a workbench directory for the package. - * - * @param Illuminate\Workbench\Package $package - * @param string $path - * @return string - */ - protected function createDirectory(Package $package, $path) - { - $fullPath = $path.'/'.$package->getFullName(); - - // If the directory doesn't exist, we will go ahead and create the package - // directory in the workbench location. We will use this entire package - // name when creating the directory to avoid any potential conflicts. - if ( ! $this->files->isDirectory($fullPath)) - { - $this->files->makeDirectory($fullPath, 0777, true); - - return $fullPath; - } - - throw new \InvalidArgumentException("Package exists."); - } - +files = $files; + } + + /** + * Create a new package stub. + * + * @param \Illuminate\Workbench\Package $package + * @param string $path + * @param bool $plain + * @return string + */ + public function create(Package $package, $path, $plain = false) + { + $directory = $this->createDirectory($package, $path); + + $blocks = $plain ? $this->basicBlocks : $this->blocks; + + foreach ($blocks as $block) + { + $this->{"write{$block}"}($package, $directory, $plain); + } + + return $directory; + } + + /** + * Write the support files to the package root. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writeSupportFiles(Package $package, $directory, $plain) + { + foreach (array('PhpUnit', 'Travis', 'Composer') as $file) + { + $this->{"write{$file}File"}($package, $directory, $plain); + } + } + + /** + * Write the PHPUnit stub file. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + protected function writePhpUnitFile(Package $package, $directory) + { + $this->files->copy(__DIR__.'/stubs/phpunit.xml', $directory.'/phpunit.xml'); + } + + /** + * Write the Travis stub file. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + protected function writeTravisFile(Package $package, $directory) + { + $this->files->copy(__DIR__.'/stubs/.travis.yml', $directory.'/.travis.yml'); + } + + /** + * Write the Composer.json stub file. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + protected function writeComposerFile(Package $package, $directory, $plain) + { + $stub = $this->getComposerStub($plain); + + $stub = $this->formatPackageStub($stub, $package); + + $this->files->put($directory.'/composer.json', $stub); + } + + /** + * Get the Composer.json stub file contents. + * + * @param bool $plain + * @return string + */ + protected function getComposerStub($plain) + { + if ($plain) + { + return $this->files->get(__DIR__.'/stubs/plain.composer.json'); + } + else + { + return $this->files->get(__DIR__.'/stubs/composer.json'); + } + } + + /** + * Create the support directories for a package. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writeSupportDirectories(Package $package, $directory) + { + foreach (array('config', 'lang', 'migrations', 'views') as $support) + { + // Once we create the source directory, we will write an empty file to the + // directory so that it will be kept in source control allowing the dev + // to go ahead and push these components to Github right on creation. + $path = $directory.'/src/'.$support; + + $this->files->makeDirectory($path, 0777, true); + + $this->files->put($path.'/.gitkeep', ''); + } + } + + /** + * Create the public directory for the pacakge. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writePublicDirectory(Package $package, $directory, $plain) + { + if ($plain) return; + + $this->files->makeDirectory($directory.'/public'); + + $this->files->put($directory.'/public/.gitkeep', ''); + } + + /** + * Create the test directory for the pacakge. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writeTestDirectory(Package $package, $directory) + { + $this->files->makeDirectory($directory.'/tests'); + + $this->files->put($directory.'/tests/.gitkeep', ''); + } + + /** + * Write the stub ServiceProvider for the package. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return void + */ + public function writeServiceProvider(Package $package, $directory, $plain) + { + // Once we have the service provider stub, we will need to format it and make + // the necessary replacements to the class, namespaces, etc. Then we'll be + // able to write it out into the package's workbench directory for them. + $stub = $this->getProviderStub($plain); + + $stub = $this->formatPackageStub($stub, $package); + + $path = $this->createClassDirectory($package, $directory); + + // The primary source directory where the package's classes will live may not + // exist yet, so we will need to create it before we write these providers + // out to that location. We'll go ahead and create now here before then. + $file = $path.'/'.$package->name.'ServiceProvider.php'; + + $this->files->put($file, $stub); + } + + /** + * Get the stub for a ServiceProvider. + * + * @param bool $plain + * @return string + */ + protected function getProviderStub($plain) + { + if ($plain) + { + return $this->files->get(__DIR__.'/stubs/plain.provider.php'); + } + else + { + return $this->files->get(__DIR__.'/stubs/provider.php'); + } + } + + /** + * Create the main source directory for the package. + * + * @param \Illuminate\Workbench\Package $package + * @param string $directory + * @return string + */ + protected function createClassDirectory(Package $package, $directory) + { + $path = $directory.'/src/'.$package->vendor.'/'.$package->name; + + if ( ! $this->files->isDirectory($path)) + { + $this->files->makeDirectory($path, 0777, true); + } + + return $path; + } + + /** + * Format a generic package stub file. + * + * @param string $stub + * @param \Illuminate\Workbench\Package $package + * @return string + */ + protected function formatPackageStub($stub, Package $package) + { + // When replacing values in the stub, we can just take the object vars of + // the package and snake case them. This should give us the array with + // all the necessary replacements variables present and ready to go. + foreach (get_object_vars($package) as $key => $value) + { + $key = '{{'.snake_case($key).'}}'; + + $stub = str_replace($key, $value, $stub); + } + + return $stub; + } + + /** + * Create a workbench directory for the package. + * + * @param \Illuminate\Workbench\Package $package + * @param string $path + * @return string + */ + protected function createDirectory(Package $package, $path) + { + $fullPath = $path.'/'.$package->getFullName(); + + // If the directory doesn't exist, we will go ahead and create the package + // directory in the workbench location. We will use this entire package + // name when creating the directory to avoid any potential conflicts. + if ( ! $this->files->isDirectory($fullPath)) + { + $this->files->makeDirectory($fullPath, 0777, true); + + return $fullPath; + } + + throw new \InvalidArgumentException("Package exists."); + } + } \ No newline at end of file diff --git a/src/Illuminate/Workbench/Starter.php b/src/Illuminate/Workbench/Starter.php index ea3396362d94..919f20cd1e48 100644 --- a/src/Illuminate/Workbench/Starter.php +++ b/src/Illuminate/Workbench/Starter.php @@ -1,29 +1,29 @@ -in($path)->files()->name('autoload.php'); - - foreach ($autoloads as $file) - { - $files->requireOnce($file->getRealPath()); - } - } - +in($path)->files()->name('autoload.php'); + + foreach ($autoloads as $file) + { + $files->requireOnce($file->getRealPath()); + } + } + }