Skip to content

Commit

Permalink
Merge pull request #4 from ablunier/scrutinizer-patch-2
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
ablunier committed Feb 5, 2016
2 parents 2527094 + 15c0296 commit a30575a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
8 changes: 7 additions & 1 deletion src/Console/Commands/SchemaUpdate.php
Expand Up @@ -84,7 +84,7 @@ public function handle()
}

if ($this->option('force')) {
DB::transaction(function () use ($diffStatements) {
DB::transaction(function() use ($diffStatements) {
foreach ($diffStatements as $statement) {
DB::statement($statement);
}
Expand Down Expand Up @@ -120,6 +120,9 @@ protected function createInMemoryDatabase()
$this->app['config']->set('database.default', $defaultConnection);
}

/**
* @param string $connection
*/
protected function getSchemaManager($connection = null)
{
if (isset($connection)) {
Expand All @@ -131,6 +134,9 @@ protected function getSchemaManager($connection = null)
return $connection->getDoctrineSchemaManager();
}

/**
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
*/
protected function getDatabasePlatform($connection = null)
{
if (isset($connection)) {
Expand Down
1 change: 0 additions & 1 deletion src/Dbal/Eloquent/AbstractionLayer.php
Expand Up @@ -13,7 +13,6 @@ class AbstractionLayer implements AbstractionLayerContract
protected $model;

/**
* @param App $app
*/
public function __construct(EloquentModel $model)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/Eloquent/ModelManager.php
Expand Up @@ -28,7 +28,7 @@ public function __construct(Application $app)
*
* @param string $modelName
*
* @return Illuminate\Database\Eloquent\Model
* @return EloquentModel
*/
public function getModelInstance($modelName)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Manager/ModelManagerServiceProvider.php
Expand Up @@ -30,7 +30,7 @@ public function register()
{
$this->mergeConfigFrom(__DIR__.'/../../config/laravel-database.php', 'laravel-database');

$this->app->bind('ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager', function ($app) {
$this->app->bind('ANavallaSuiza\Laravel\Database\Contracts\Manager\ModelManager', function($app) {
return new ModelManager($app);
});

Expand Down
4 changes: 2 additions & 2 deletions src/Repository/Eloquent/Cache.php
Expand Up @@ -53,7 +53,7 @@ public function __construct(RepositoryContract $repository, LaravelCache $cache)
*/
public function __call($method, $params)
{
if (! method_exists($this->repository, $method)) {
if (!method_exists($this->repository, $method)) {
throw new RepositoryException("Method $method not found on repository");
}

Expand All @@ -78,7 +78,7 @@ public function __call($method, $params)
$lifetime = $this->lifetime;
unset($this->lifetime);

return $this->cache->remember($key, $lifetime, function () use ($method, $params) {
return $this->cache->remember($key, $lifetime, function() use ($method, $params) {
return call_user_func_array(array($this->repository, $method), $params);
});
}
Expand Down
11 changes: 4 additions & 7 deletions src/Repository/Eloquent/Repository.php
Expand Up @@ -26,7 +26,6 @@ class Repository implements RepositoryContract, CriteriaPerformer
protected $skipCriteria = false;

/**
* @param App $app
*/
public function __construct(EloquentModel $model)
{
Expand All @@ -35,7 +34,7 @@ public function __construct(EloquentModel $model)
}

/**
* @return mixed
* @return EloquentModel
*/
public function getModel()
{
Expand Down Expand Up @@ -76,7 +75,7 @@ public function paginate($perPage = 15, array $with = array())

/**
* @param array $data
* @return mixed
* @return EloquentModel
*/
public function create(array $data)
{
Expand Down Expand Up @@ -104,7 +103,7 @@ public function update(array $data, $id, $field = "id")

/**
* @param $id
* @return mixed
* @return integer
*/
public function delete($id)
{
Expand Down Expand Up @@ -150,7 +149,6 @@ public function findOrFail($id, array $with = array())
/**
* @param $field
* @param $value
* @param array $columns
* @return mixed
*/
public function findBy($field, $value, array $with = array())
Expand All @@ -168,7 +166,6 @@ public function findBy($field, $value, array $with = array())
/**
* @param $field
* @param $value
* @param array $columns
* @return mixed
*/
public function findByOrFail($field, $value, array $with = array())
Expand Down Expand Up @@ -236,7 +233,7 @@ public function skipCriteria($status = true)
}

/**
* @return mixed
* @return Collection
*/
public function getCriteria()
{
Expand Down

0 comments on commit a30575a

Please sign in to comment.