@@ -15,6 +15,9 @@ discard block |
||
| 15 | 15 | protected $path = ''; |
| 16 | 16 | |
| 17 | 17 | |
| 18 | + /** |
|
| 19 | + * @return null|AbstractDictBody |
|
| 20 | + */ |
|
| 18 | 21 | abstract public function childParent(); |
| 19 | 22 | |
| 20 | 23 | |
@@ -74,7 +77,7 @@ discard block |
||
| 74 | 77 | /** |
| 75 | 78 | * @param $path |
| 76 | 79 | * |
| 77 | - * @return array|ChildDict|Mixed |
|
| 80 | + * @return callable |
|
| 78 | 81 | * @throws WrongArrayPathException |
| 79 | 82 | */ |
| 80 | 83 | public function get($path) |
@@ -184,7 +187,7 @@ discard block |
||
| 184 | 187 | |
| 185 | 188 | |
| 186 | 189 | /** |
| 187 | - * @param $rawPath |
|
| 190 | + * @param null|string $rawPath |
|
| 188 | 191 | * |
| 189 | 192 | * @return $this |
| 190 | 193 | */ |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | $this->get($path); |
| 64 | 64 | |
| 65 | 65 | return true; |
| 66 | - } |
|
| 67 | - catch (WrongArrayPathException $e) |
|
| 66 | + } catch (WrongArrayPathException $e) |
|
| 68 | 67 | { |
| 69 | 68 | return false; |
| 70 | 69 | } |
@@ -136,8 +135,7 @@ discard block |
||
| 136 | 135 | try |
| 137 | 136 | { |
| 138 | 137 | return $this->get($path); |
| 139 | - } |
|
| 140 | - catch (WrongArrayPathException $e) |
|
| 138 | + } catch (WrongArrayPathException $e) |
|
| 141 | 139 | { |
| 142 | 140 | if ( isset( $value ) ) |
| 143 | 141 | { |
@@ -51,8 +51,7 @@ |
||
| 51 | 51 | if ( is_null($offset) ) |
| 52 | 52 | { |
| 53 | 53 | $this->data[] = $value; |
| 54 | - } |
|
| 55 | - else |
|
| 54 | + } else |
|
| 56 | 55 | { |
| 57 | 56 | $this->data[$offset] = $value; |
| 58 | 57 | } |
@@ -127,13 +127,11 @@ |
||
| 127 | 127 | try |
| 128 | 128 | { |
| 129 | 129 | return call_user_func($targetFunction, $knot, $arguments, $functionName); |
| 130 | - } |
|
| 131 | - catch (\Exception $e) |
|
| 130 | + } catch (\Exception $e) |
|
| 132 | 131 | { |
| 133 | 132 | throw new FunctionExecuteException($functionName); |
| 134 | 133 | } |
| 135 | - } |
|
| 136 | - else |
|
| 134 | + } else |
|
| 137 | 135 | { |
| 138 | 136 | throw new WrongFunctionException($functionName); |
| 139 | 137 | } |
@@ -75,8 +75,7 @@ discard block |
||
| 75 | 75 | if ( array_key_exists($key, $this->data) ) |
| 76 | 76 | { |
| 77 | 77 | $target =& $this->data[$key]; |
| 78 | - } |
|
| 79 | - else |
|
| 78 | + } else |
|
| 80 | 79 | { |
| 81 | 80 | throw new WrongArrayPathException($key); |
| 82 | 81 | } |
@@ -115,8 +114,7 @@ discard block |
||
| 115 | 114 | $arguments = array_merge([ &$this->data ], $arguments); |
| 116 | 115 | |
| 117 | 116 | return call_user_func_array($function, $arguments); |
| 118 | - } |
|
| 119 | - catch (\Exception $e) |
|
| 117 | + } catch (\Exception $e) |
|
| 120 | 118 | { |
| 121 | 119 | throw new FunctionExecuteException($methodPath); |
| 122 | 120 | } |
@@ -137,8 +135,7 @@ discard block |
||
| 137 | 135 | try |
| 138 | 136 | { |
| 139 | 137 | return $this->getHelperManager()->execute($method, $arguments, $this); |
| 140 | - } |
|
| 141 | - catch (\Exception $e) |
|
| 138 | + } catch (\Exception $e) |
|
| 142 | 139 | { |
| 143 | 140 | throw $e; |
| 144 | 141 | } |