| @@ 77-90 (lines=14) @@ | ||
| 74 | * @param array $data The data for the entry we're registering. |
|
| 75 | * @param array $path_map The path map to add the contents of the manifest to. |
|
| 76 | */ |
|
| 77 | protected function register_record( $key, $data, &$path_map ) { |
|
| 78 | if ( isset( $path_map[ $key ]['version'] ) ) { |
|
| 79 | $selected_version = $path_map[ $key ]['version']; |
|
| 80 | } else { |
|
| 81 | $selected_version = null; |
|
| 82 | } |
|
| 83 | ||
| 84 | if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) { |
|
| 85 | $path_map[ $key ] = array( |
|
| 86 | 'version' => $data['version'], |
|
| 87 | 'path' => $data['path'], |
|
| 88 | ); |
|
| 89 | } |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| @@ 93-106 (lines=14) @@ | ||
| 90 | * @param array $data The data for the entry we're registering. |
|
| 91 | * @param array $path_map The path map to add the contents of the manifest to. |
|
| 92 | */ |
|
| 93 | protected function register_record( $key, $data, &$path_map ) { |
|
| 94 | if ( isset( $path_map[ $key ]['version'] ) ) { |
|
| 95 | $selected_version = $path_map[ $key ]['version']; |
|
| 96 | } else { |
|
| 97 | $selected_version = null; |
|
| 98 | } |
|
| 99 | ||
| 100 | if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) { |
|
| 101 | $path_map[ $key ] = array( |
|
| 102 | 'version' => $data['version'], |
|
| 103 | 'path' => $data['path'], |
|
| 104 | ); |
|
| 105 | } |
|
| 106 | } |
|
| 107 | } |
|
| 108 | ||