Extend instead of redefining functions

For methods that are not a facade (like Eloquent/Controller), avoids
duplicate code and better autocomplete (also variables etc).
No more need for extra config settings, only the magic calls still.
This commit is contained in:
Barry vd. Heuvel
2013-06-21 11:01:13 +02:00
parent c4de6e80c9
commit 15bf867658
2 changed files with 56 additions and 90 deletions
+2 -39
View File
@@ -13,18 +13,6 @@ return array(
'filename' => '_ide_helper.php',
/*
|--------------------------------------------------------------------------
| Sublime version
|--------------------------------------------------------------------------
|
| Use a different code format, better for SublimeText (instead of Netbeans/phpStorm)
| Can also be used with the --sublime (-S) option.
|
*/
'sublime' => false,
/*
|--------------------------------------------------------------------------
| Helper files to include
@@ -55,35 +43,10 @@ return array(
'Auth' => array('Illuminate\Auth\Guard'),
'Cache' => array('Illuminate\Cache\StoreInterface', 'Illuminate\Cache\Repository'),
'DB' => array('Illuminate\Database\Connection'),
'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
'Queue' => array('Illuminate\Queue\QueueInterface'),
),
/*
|--------------------------------------------------------------------------
| Non-static methods
|--------------------------------------------------------------------------
|
| These functions aren't actually facade calls, so don't make them static
|
*/
'nonstatic' => array(
'Eloquent' => array('freshTimestamp', 'newCollection', 'toArray', 'toJson', 'toSql', 'delete'),
),
/*
|--------------------------------------------------------------------------
| Only extend
|--------------------------------------------------------------------------
|
| These implementations aren't called static, so only extend them.
|
*/
'only_extend' => array(
'Seeder',
'extra_nonstatic' => array(
'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
),
);