Skip to content

Commit

Permalink
rename is_assoc_array to comply with PSR-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulkave committed Oct 19, 2014
1 parent 1634b84 commit 5651d65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Vinelab/NeoEloquent/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ public function createWith(array $attributes, array $relations)
// In the case of a model Id or an associative array or a Model instance it means that
// this is probably a One-To-One relationship or the dev decided not to add
// multiple records as relations so we'll wrap it up in an array.
if ( ! is_array($values) || Helpers::is_assoc_array($values) || $values instanceof Model) $values = [$values];
if ( ! is_array($values) || Helpers::isAssocArray($values) || $values instanceof Model) $values = [$values];

$label = $relationship->getRelated()->getTable();
$direction = $relationship->getEdgeDirection();
Expand Down
2 changes: 1 addition & 1 deletion src/Vinelab/NeoEloquent/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Helpers {
* @param array $array
* @return boolean
*/
public static function is_assoc_array($array)
public static function isAssocArray($array)
{
return is_array($array) && array_keys($array) !== range(0, count($array) - 1);
}
Expand Down

0 comments on commit 5651d65

Please sign in to comment.