| @@ 87-99 (lines=13) @@ | ||
| 84 | /** |
|
| 85 | * @return AbstractColumn[] |
|
| 86 | */ |
|
| 87 | public function addedColumns(): array |
|
| 88 | { |
|
| 89 | $difference = []; |
|
| 90 | ||
| 91 | $initialColumns = $this->initial->getColumns(); |
|
| 92 | foreach ($this->current->getColumns() as $name => $column) { |
|
| 93 | if (!isset($initialColumns[$name])) { |
|
| 94 | $difference[] = $column; |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| 98 | return $difference; |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * @return AbstractColumn[] |
|
| @@ 104-116 (lines=13) @@ | ||
| 101 | /** |
|
| 102 | * @return AbstractColumn[] |
|
| 103 | */ |
|
| 104 | public function droppedColumns(): array |
|
| 105 | { |
|
| 106 | $difference = []; |
|
| 107 | ||
| 108 | $currentColumns = $this->current->getColumns(); |
|
| 109 | foreach ($this->initial->getColumns() as $name => $column) { |
|
| 110 | if (!isset($currentColumns[$name])) { |
|
| 111 | $difference[] = $column; |
|
| 112 | } |
|
| 113 | } |
|
| 114 | ||
| 115 | return $difference; |
|
| 116 | } |
|
| 117 | ||
| 118 | /** |
|
| 119 | * Returns array where each value contain current and initial element state. |
|