| @@ 61-70 (lines=10) @@ | ||
| 58 | * |
|
| 59 | * @param object $dirty |
|
| 60 | */ |
|
| 61 | protected function setAllowed($dirty) |
|
| 62 | { |
|
| 63 | collect($this->allowed)->each(function ($property) use ($dirty) { |
|
| 64 | if ($this->isNested($property)) { |
|
| 65 | return $this->setNestedProperty($property, $dirty, 'property'); |
|
| 66 | } |
|
| 67 | ||
| 68 | $this->setProperty($dirty, $property, $this, 'property'); |
|
| 69 | }); |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * Set properties from methods on cleaner object. |
|
| @@ 77-86 (lines=10) @@ | ||
| 74 | * |
|
| 75 | * @param object $dirty |
|
| 76 | */ |
|
| 77 | protected function setMethods($dirty) |
|
| 78 | { |
|
| 79 | collect($this->methods)->each(function ($method) use ($dirty) { |
|
| 80 | if ($this->isNested($method)) { |
|
| 81 | return $this->setNestedProperty($method, $dirty, 'method'); |
|
| 82 | } |
|
| 83 | ||
| 84 | $this->setProperty($dirty, $method, $this, 'method'); |
|
| 85 | }); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * Property is a nested property. |
|