@@ -17,17 +17,17 @@ trait ParseArray
1717 * @param mixed $default
1818 * @return mixed
1919 */
20- public static function get ($ array , $ key , $ default = null )
20+ private static function parseArray ($ array , $ key , $ default = null )
2121 {
22- if (! static ::accessible ($ array )) {
22+ if (! static ::isValueAccessible ($ array )) {
2323 return value ($ default );
2424 }
2525
2626 if (is_null ($ key )) {
2727 return $ array ;
2828 }
2929
30- if (static ::exists ($ array , $ key )) {
30+ if (static ::isKeyExists ($ array , $ key )) {
3131 return $ array [$ key ];
3232 }
3333
@@ -36,7 +36,7 @@ public static function get($array, $key, $default = null)
3636 }
3737
3838 foreach (explode ('. ' , $ key ) as $ segment ) {
39- if (static ::accessible ($ array ) && static ::exists ($ array , $ segment )) {
39+ if (static ::isValueAccessible ($ array ) && static ::isKeyExists ($ array , $ segment )) {
4040 $ array = $ array [$ segment ];
4141 } else {
4242 return value ($ default );
@@ -52,7 +52,7 @@ public static function get($array, $key, $default = null)
5252 * @param mixed $value
5353 * @return bool
5454 */
55- public static function accessible ($ value )
55+ private static function isValueAccessible ($ value )
5656 {
5757 return is_array ($ value ) || $ value instanceof ArrayAccess;
5858 }
@@ -64,7 +64,7 @@ public static function accessible($value)
6464 * @param string|int $key
6565 * @return bool
6666 */
67- public static function exists ($ array , $ key )
67+ private static function isKeyExists ($ array , $ key )
6868 {
6969 if ($ array instanceof ArrayAccess) {
7070 return $ array ->offsetExists ($ key );
0 commit comments