Code Duplication    Length = 5-5 lines in 2 locations

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

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

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

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