Code Duplication    Length = 5-5 lines in 2 locations

projects/packages/changelogger/src/VersionCommand.php 1 location

@@ 103-107 (lines=5) @@
100
			Utils::error_clear_last();
101
			$contents = quietCall( 'file_get_contents', $file );
102
			// @codeCoverageIgnoreStart
103
			if ( ! is_string( $contents ) ) {
104
				$err = error_get_last();
105
				$output->writeln( "<error>Failed to read $file: {$err['message']}</>" );
106
				return 1;
107
			}
108
			// @codeCoverageIgnoreEnd
109
110
			try {

projects/packages/changelogger/src/WriteCommand.php 1 location

@@ 155-159 (lines=5) @@
152
			Utils::error_clear_last();
153
			$contents = quietCall( 'file_get_contents', $file );
154
			// @codeCoverageIgnoreStart
155
			if ( ! is_string( $contents ) ) {
156
				$err = error_get_last();
157
				$output->writeln( "<error>Failed to read $file: {$err['message']}</>" );
158
				return self::FATAL_EXIT;
159
			}
160
			// @codeCoverageIgnoreEnd
161
			try {
162
				$changelog = $this->formatter->parse( $contents );