-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fed28d
commit 2ab1a43
Showing
19 changed files
with
196 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ interface CriterionInterface | |
* @return mixed | ||
*/ | ||
public function apply($entity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,4 +135,4 @@ public function orderBy($column, $direction = 'asc') | |
|
||
return $this; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
class RepositoryException extends \Exception | ||
{ | ||
// | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,49 @@ | ||
<?php | ||
|
||
if (! function_exists('array_get')) { | ||
/** | ||
* Get an item from an array using "dot" notation. | ||
* | ||
* @see https://github.com/rappasoft/laravel-helpers/blob/c8dfa1e979437528262725ebe99c2e6383b24c16/src/helpers.php#L236 | ||
* @param array $array | ||
* @param string $key | ||
* @param mixed $default | ||
* @return mixed | ||
*/ | ||
function array_get(array $array, string $key, $default = null) | ||
{ | ||
if (is_null($key)) { | ||
return $array; | ||
} | ||
|
||
if (isset($array[$key])) { | ||
return $array[$key]; | ||
} | ||
|
||
foreach (explode('.', $key) as $segment) { | ||
if (! is_array($array) || ! array_key_exists($segment, $array)) { | ||
return value($default); | ||
} | ||
|
||
$array = $array[$segment]; | ||
} | ||
|
||
return $array; | ||
} | ||
} | ||
|
||
if (! function_exists('value')) { | ||
/** | ||
* Return the default value of the given value. | ||
* | ||
* @see https://github.com/rappasoft/laravel-helpers/blob/c8dfa1e979437528262725ebe99c2e6383b24c16/src/helpers.php#L1424 | ||
* @param mixed $value | ||
* @return mmixed | ||
*/ | ||
function value($value) | ||
{ | ||
return $value instanceof Closure ? $value() : $value; | ||
} | ||
} | ||
<?php | ||
|
||
if (! function_exists('array_get')) { | ||
/** | ||
* Get an item from an array using "dot" notation. | ||
* | ||
* @see https://github.com/rappasoft/laravel-helpers/blob/c8dfa1e979437528262725ebe99c2e6383b24c16/src/helpers.php#L236 | ||
* | ||
* @param array $array | ||
* @param string $key | ||
* @param mixed $default | ||
* @return mixed | ||
*/ | ||
function array_get(array $array, string $key, $default = null) | ||
{ | ||
if (is_null($key)) { | ||
return $array; | ||
} | ||
|
||
if (isset($array[$key])) { | ||
return $array[$key]; | ||
} | ||
|
||
foreach (explode('.', $key) as $segment) { | ||
if (! is_array($array) || ! array_key_exists($segment, $array)) { | ||
return value($default); | ||
} | ||
|
||
$array = $array[$segment]; | ||
} | ||
|
||
return $array; | ||
} | ||
} | ||
|
||
if (! function_exists('value')) { | ||
/** | ||
* Return the default value of the given value. | ||
* | ||
* @see https://github.com/rappasoft/laravel-helpers/blob/c8dfa1e979437528262725ebe99c2e6383b24c16/src/helpers.php#L1424 | ||
* | ||
* @param mixed $value | ||
* @return mmixed | ||
*/ | ||
function value($value) | ||
{ | ||
return $value instanceof Closure ? $value() : $value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.