Skip to content

Commit

Permalink
Fixed eloquent phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Nov 18, 2015
1 parent d7af214 commit bc63ea2
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public static function getGlobalScope($scope)
/**
* Get the global scopes for this class instance.
*
* @return \Illuminate\Database\Eloquent\ScopeInterface[]
* @return array
*/
public function getGlobalScopes()
{
Expand Down Expand Up @@ -465,7 +465,7 @@ protected function fillableFromArray(array $attributes)
* Create a new instance of the given model.
*
* @param array $attributes
* @param bool $exists
* @param bool $exists
* @return static
*/
public function newInstance($attributes = [], $exists = false)
Expand Down Expand Up @@ -1010,7 +1010,7 @@ public function belongsToMany($related, $table = null, $foreignKey = null, $othe
* @param string $table
* @param string $foreignKey
* @param string $otherKey
* @param bool $inverse
* @param bool $inverse
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany
*/
public function morphToMany($related, $name, $table = null, $foreignKey = null, $otherKey = null, $inverse = false)
Expand Down Expand Up @@ -1139,6 +1139,7 @@ public static function destroy($ids)
* Delete the model from the database.
*
* @return bool|null
*
* @throws \Exception
*/
public function delete()
Expand Down Expand Up @@ -1383,7 +1384,7 @@ public function removeObservableEvents($observables)
* Increment a column's value by a given amount.
*
* @param string $column
* @param int $amount
* @param int $amount
* @return int
*/
protected function increment($column, $amount = 1)
Expand All @@ -1395,7 +1396,7 @@ protected function increment($column, $amount = 1)
* Decrement a column's value by a given amount.
*
* @param string $column
* @param int $amount
* @param int $amount
* @return int
*/
protected function decrement($column, $amount = 1)
Expand All @@ -1407,7 +1408,7 @@ protected function decrement($column, $amount = 1)
* Run the increment or decrement method on the model.
*
* @param string $column
* @param int $amount
* @param int $amount
* @param string $method
* @return int
*/
Expand All @@ -1428,7 +1429,7 @@ protected function incrementOrDecrement($column, $amount, $method)
* Increment the underlying attribute value and sync with original.
*
* @param string $column
* @param int $amount
* @param int $amount
* @param string $method
* @return void
*/
Expand Down Expand Up @@ -1675,7 +1676,7 @@ public function touches($relation)
* Fire the given event for the model.
*
* @param string $event
* @param bool $halt
* @param bool $halt
* @return mixed
*/
protected function fireModelEvent($event, $halt = true)
Expand Down Expand Up @@ -1896,7 +1897,7 @@ public function removeGlobalScopes($builder)
/**
* Create a new Eloquent query builder for the model.
*
* @param \Illuminate\Database\Query\Builder $query
* @param \Illuminate\Database\Query\Builder $query
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function newEloquentBuilder($query)
Expand Down Expand Up @@ -1933,9 +1934,9 @@ public function newCollection(array $models = [])
* Create a new pivot model instance.
*
* @param \Illuminate\Database\Eloquent\Model $parent
* @param array $attributes
* @param array $attributes
* @param string $table
* @param bool $exists
* @param bool $exists
* @return \Illuminate\Database\Eloquent\Relations\Pivot
*/
public function newPivot(Model $parent, array $attributes, $table, $exists)
Expand Down Expand Up @@ -2101,7 +2102,7 @@ public function getPerPage()
/**
* Set the number of models to return per page.
*
* @param int $perPage
* @param int $perPage
* @return $this
*/
public function setPerPage($perPage)
Expand Down Expand Up @@ -2736,7 +2737,7 @@ public function hasGetMutator($key)
* Get the value of an attribute using its mutator.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return mixed
*/
protected function mutateAttribute($key, $value)
Expand All @@ -2748,7 +2749,7 @@ protected function mutateAttribute($key, $value)
* Get the value of an attribute using its mutator for array conversion.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return mixed
*/
protected function mutateAttributeForArray($key, $value)
Expand Down Expand Up @@ -2808,7 +2809,7 @@ protected function getCastType($key)
* Cast an attribute to a native PHP type.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return mixed
*/
protected function castAttribute($key, $value)
Expand Down Expand Up @@ -2849,7 +2850,7 @@ protected function castAttribute($key, $value)
* Set a given attribute on the model.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return $this
*/
public function setAttribute($key, $value)
Expand Down Expand Up @@ -3019,7 +3020,7 @@ public function fromJson($value, $asObject = false)
/**
* Clone the model into a new, non-existing instance.
*
* @param array $except
* @param array|null $except
* @return \Illuminate\Database\Eloquent\Model
*/
public function replicate(array $except = null)
Expand Down Expand Up @@ -3051,7 +3052,7 @@ public function getAttributes()
* Set the array of model attributes. No checking is done.
*
* @param array $attributes
* @param bool $sync
* @param bool $sync
* @return $this
*/
public function setRawAttributes(array $attributes, $sync = false)
Expand All @@ -3068,8 +3069,8 @@ public function setRawAttributes(array $attributes, $sync = false)
/**
* Get the model's original attribute values.
*
* @param string $key
* @param mixed $default
* @param string|null $key
* @param mixed $default
* @return array
*/
public function getOriginal($key = null, $default = null)
Expand Down Expand Up @@ -3201,7 +3202,7 @@ public function relationLoaded($key)
* Set the specific relationship in the model.
*
* @param string $relation
* @param mixed $value
* @param mixed $value
* @return $this
*/
public function setRelation($relation, $value)
Expand Down Expand Up @@ -3260,7 +3261,7 @@ public function setConnection($name)
/**
* Resolve a connection instance.
*
* @param string $connection
* @param string|null $connection
* @return \Illuminate\Database\Connection
*/
public static function resolveConnection($connection = null)
Expand Down Expand Up @@ -3349,7 +3350,7 @@ public function getMutatedAttributes()
/**
* Extract and cache all the mutated attributes of a class.
*
* @param string $class
* @param string $class
* @return void
*/
public static function cacheMutatedAttributes($class)
Expand Down Expand Up @@ -3387,7 +3388,7 @@ public function __get($key)
* Dynamically set attributes on the model.
*
* @param string $key
* @param mixed $value
* @param mixed $value
* @return void
*/
public function __set($key, $value)
Expand Down Expand Up @@ -3467,7 +3468,7 @@ public function __unset($key)
* Handle dynamic method calls into the model.
*
* @param string $method
* @param array $parameters
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
Expand All @@ -3485,7 +3486,7 @@ public function __call($method, $parameters)
* Handle dynamic static method calls into the method.
*
* @param string $method
* @param array $parameters
* @param array $parameters
* @return mixed
*/
public static function __callStatic($method, $parameters)
Expand Down

0 comments on commit bc63ea2

Please sign in to comment.