Skip to content

Commit f46011c

Browse files
authored
Remove stray full stops from end of lines in inline comments (#185)
I've made a script to autofix all PHPCS complaints related to "all comments must end with a full stop" since the sniff complains but does not autofix. It seems like I haven't considered multiline comments :-) This PR removes a bunch of end-of-line full stops from places where they don't make any sense.
1 parent ab4f7fc commit f46011c

File tree

53 files changed

+214
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+214
-214
lines changed

components/Blueprints/DataReference/class-datareferenceresolver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ public function resolve( DataReference $reference ) {
8181
return $this->resolved_data_references[ $reference->id ];
8282
}
8383

84-
// @TODO: Clean up the semantics of this class. Resolve() and separate resolve_uncached() seem confusing. There's.
85-
// a bunch of implicit behaviors related to caching. Ideally we would either have a self-contained resolution.
86-
// method, or co-locate the resolution logic with the data reference classes and only use this class for.
84+
// @TODO: Clean up the semantics of this class. Resolve() and separate resolve_uncached() seem confusing. There's
85+
// a bunch of implicit behaviors related to caching. Ideally we would either have a self-contained resolution
86+
// method, or co-locate the resolution logic with the data reference classes and only use this class for
8787
// caching.
8888
public function resolve_uncached( DataReference $reference ) {
8989
$progress_tracker = $this->sub_trackers[ $reference->id ] ?? new Tracker();
@@ -123,7 +123,7 @@ public function resolve_uncached( DataReference $reference ) {
123123
$tracked_stream,
124124
$filename
125125
);
126-
// TODO: Consider a clearer name. Some not-so-great ballpark ideas:.
126+
// TODO: Consider a clearer name. Some not-so-great ballpark ideas:
127127
// BlueprintParentPath, BlueprintRootPath, BlueprintContextPath, BlueprintRelativePath.
128128
} elseif ( $reference instanceof ExecutionContextPath ) {
129129
$path = $reference->get_path();

components/Blueprints/Progress/class-progresstrackedreadstream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function consume_all(): string {
7676

7777
public function close_reading(): void {
7878
$this->stream->close_reading();
79-
// Optionally ensure tracker is set to 100% if not already.
79+
// Optionally ensure tracker is set to 100% if not already
8080
// This depends on whether closing implies completion.
8181
// For now, we rely on consume_all or reaching end of data.
8282
// If the stream is closed prematurely, the progress will reflect the last read amount.
@@ -102,7 +102,7 @@ private function updateProgress(): void {
102102
}
103103

104104
$progress = ( $this->stream->tell() / $this->stream_length ) * 100;
105-
// It's possible to seek() backwards. Let's make sure we never decrease.
105+
// It's possible to seek() backwards. Let's make sure we never decrease
106106
// the reported progress.
107107
if ( $progress > $this->tracker->getProgress() ) {
108108
$this->tracker->set( $progress );

components/Blueprints/SiteResolver/class-newsiteresolver.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public static function resolve( Runtime $runtime, Tracker $progress, ?VersionCon
104104
}
105105

106106
// 3. Install WordPress if not installed yet.
107-
// Technically, this is a "new site" resolver, but it's entirely possible.
108-
// the developer-provided WordPress zip already has a sqlite database with the.
109-
// a WordPress site installed..
107+
// Technically, this is a "new site" resolver, but it's entirely possible
108+
// the developer-provided WordPress zip already has a sqlite database with
109+
// a WordPress site installed.
110110
if ( ! self::is_wordpress_installed( $runtime, $progress ) ) {
111111
if ( ! $target_fs->exists( '/wp-config.php' ) ) {
112112
if ( $target_fs->exists( 'wp-config-sample.php' ) ) {
@@ -128,7 +128,7 @@ public static function resolve( Runtime $runtime, Tracker $progress, ?VersionCon
128128
'install',
129129
'--path=' . $runtime->get_configuration()->get_target_site_root(),
130130

131-
// For Docker compatibility. If we got this far, Blueprint runner was already.
131+
// For Docker compatibility. If we got this far, Blueprint runner was already
132132
// allowed to run as root.
133133
'--allow-root',
134134
'--url=' . $runtime->get_configuration()->get_target_site_url(),
@@ -222,7 +222,7 @@ function ( $v ) {
222222
preg_match( '/^\d+\.\d+$/', $version_string ) &&
223223
$version_string === $api_version['partial_version']
224224
) {
225-
// When the Blueprint provides a version like 6.6, we must match on the partial.
225+
// When the Blueprint provides a version like 6.6, we must match on the partial
226226
// version, e.g. "6.6".
227227
return $api_version['download'];
228228
}

components/Blueprints/Steps/class-activatepluginstep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Represents the 'activatePlugin' step.
1010
*/
1111
class ActivatePluginStep implements StepInterface {
12-
// Inline PHP script to avoid reading a static script.php file via.
12+
// Inline PHP script to avoid reading a static script.php file via
1313
// file_get_contents() inside the built blueprints.phar file.
1414
const ACTIVATE_PLUGIN_SCRIPT = <<<'PHP'
1515
<?php

components/Blueprints/Steps/class-activatethemestep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class ActivateThemeStep implements StepInterface {
1212

13-
// Inline PHP script to avoid reading a static script.php file via.
13+
// Inline PHP script to avoid reading a static script.php file via
1414
// file_get_contents() inside the built blueprints.phar file.
1515
const ACTIVATE_THEME_SCRIPT = <<<'PHP'
1616
<?php

components/Blueprints/Steps/class-defineconstantsstep.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct( array $constants ) {
2828
*/
2929
public function run( Runtime $runtime, Tracker $tracker ) {
3030
$tracker->setCaption( 'Defining wp-config constants' );
31-
// Inline PHP script to avoid reading a static script.php file via.
31+
// Inline PHP script to avoid reading a static script.php file via
3232
// file_get_contents() inside the built blueprints.phar file.
3333
$runtime->eval_php_code_in_subprocess(
3434
<<<'PHP'
@@ -296,7 +296,7 @@ function rewrite_wp_config_to_define_constants( $content, $constants = array() )
296296
continue;
297297
}
298298
299-
// We now have a define() call that defines a constant we're looking for.
299+
// We now have a define() call that defines a constant we're looking for
300300
// Let's rewrite its value to the one
301301
$output = array_merge(
302302
$output,

components/Blueprints/Steps/class-importcontentstep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function importWxr( Runtime $runtime, array $content_definition, Tracker
8989
foreach ( $this->output_lines( $output ) as $line ) {
9090
$data = @json_decode( $line, true );
9191
if ( ! is_array( $data ) ) {
92-
// Non-JSON output is treated as a crash. We use a dedicated file pipe.
92+
// Non-JSON output is treated as a crash. We use a dedicated file pipe
9393
// for communication and it should never contain a non-JSON line.
9494
$import_process->stop();
9595
throw new ProcessFailedException( $import_process );

components/Blueprints/Steps/class-importmediastep.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ function ( $media ) {
107107
if ( ! $resolved instanceof File ) {
108108
// TODO: What if the schema specifies a resource type that can only be resolved to a file?
109109
// Then the resolver could throw the error instead of requiring each step to check.
110-
// But since the resolve interface can return either a File or Directory,.
110+
// But since the resolve interface can return either a File or Directory,
111111
// would we have to check anyway?
112-
// Would there be any value in the runtime having specific methods like resolveFile().
112+
// Would there be any value in the runtime having specific methods like resolveFile()
113113
// and resolveDirectory() that throw if they cannot resolve the requested type?
114114
throw new RuntimeException( "Failed to resolve media file: $human_readable_name" );
115115
}

components/Blueprints/Steps/class-importthemestartercontentstep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct( ?string $theme_slug = null ) {
2323

2424
public function run( Runtime $runtime, Tracker $tracker ) {
2525
$tracker->setCaption( 'Importing theme starter content' . ( $this->theme_slug ? ' for ' . $this->theme_slug : '' ) );
26-
// Inline PHP script to avoid reading a static script.php file via.
26+
// Inline PHP script to avoid reading a static script.php file via
2727
// file_get_contents() inside the built blueprints.phar file.
2828
$runtime->eval_php_code_in_subprocess(
2929
<<<'PHP'

components/Blueprints/Steps/class-installthemestep.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function ( $temp_dir ) use ( $runtime, $tracker ) {
9393

9494
$tracker->set( 50 );
9595

96-
// Inline PHP script to avoid reading a static script.php file via.
96+
// Inline PHP script to avoid reading a static script.php file via
9797
// file_get_contents() inside the built blueprints.phar file.
9898
$output = $runtime->eval_php_code_in_subprocess(
9999
<<<'PHP'

0 commit comments

Comments
 (0)