Skip to content

Commit

Permalink
remove blank lines after class opening
Browse files Browse the repository at this point in the history
add the php-cs-fixer no_blank_lines_after_class_opening rule and apply to codebase
  • Loading branch information
brettmc committed Jan 7, 2025
1 parent b515b6b commit 4c60ca3
Show file tree
Hide file tree
Showing 118 changed files with 1 addition and 117 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'include' => true,
'lowercase_cast' => true,
'new_with_parentheses' => true,
'no_blank_lines_after_class_opening' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_trailing_whitespace' => true,
Expand Down
1 change: 0 additions & 1 deletion examples/src/Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

final class Example
{

public function test(): int
{
return 42;
Expand Down
1 change: 0 additions & 1 deletion examples/src/ExampleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

final class ExampleConfig implements InstrumentationConfiguration
{

public function __construct(
public readonly string $spanName,
public readonly bool $enabled = true,
Expand Down
1 change: 0 additions & 1 deletion examples/src/ExampleConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class ExampleConfigProvider implements ComponentProvider
{

/**
* @psalm-suppress MoreSpecificImplementedParamType
* @param array{
Expand Down
1 change: 0 additions & 1 deletion examples/src/ExampleInstrumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

final class ExampleInstrumentation implements Instrumentation
{

public function register(HookManagerInterface $hookManager, ConfigProperties $configuration, InstrumentationContext $context): void
{
$config = $configuration->get(ExampleConfig::class) ?? throw new Exception('example instrumentation must be configured');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

final class ConfigurationRegistry implements ConfigProperties
{

private array $configurations = [];

public function add(InstrumentationConfiguration $configuration): self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@

interface InstrumentationConfiguration
{

}
1 change: 0 additions & 1 deletion src/API/Metrics/CounterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

interface CounterInterface extends SynchronousInstrument
{

/**
* @param float|int $amount non-negative amount to increment by
* @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/GaugeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
interface GaugeInterface extends SynchronousInstrument
{

/**
* @param float|int $amount current absolute value
* @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/HistogramInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

interface HistogramInterface extends SynchronousInstrument
{

/**
* @param float|int $amount non-negative amount to record
* @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/MeterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface MeterInterface
{

/**
* Reports measurements for multiple asynchronous instrument from a single callback.
*
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/MeterProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface MeterProviderInterface
{

/**
* Returns a `Meter` for the given instrumentation scope.
*
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/ObservableCallbackInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
*/
interface ObservableCallbackInterface
{

/**
* Detaches the associated callback from the instrument.
*/
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/ObservableCounterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface ObservableCounterInterface extends AsynchronousInstrument
{

/**
* @param callable(ObserverInterface): void $callback function responsible for
* reporting the measurements (as absolute values)
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/ObservableGaugeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface ObservableGaugeInterface extends AsynchronousInstrument
{

/**
* @param callable(ObserverInterface): void $callback function responsible for
* reporting the measurements
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/ObservableUpDownCounterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface ObservableUpDownCounterInterface extends AsynchronousInstrument
{

/**
* @param callable(ObserverInterface): void $callback function responsible for
* reporting the measurements (as absolute values)
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/ObserverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

interface ObserverInterface
{

/**
* Records the given absolute datapoint.
*
Expand Down
1 change: 0 additions & 1 deletion src/API/Metrics/UpDownCounterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

interface UpDownCounterInterface extends SynchronousInstrument
{

/**
* @param float|int $amount amount to increment / decrement by
* @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class HttpConfigProvider implements ComponentProvider
{

public function createPlugin(array $properties, Context $context): GeneralInstrumentationConfiguration
{
return new HttpConfig($properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
final class LogRecordExporterConsole implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')]
final class LogRecordExporterOtlp implements ComponentProvider
{

/**
* @param array{
* protocol: 'http/protobuf'|'http/json'|'grpc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
final class LogRecordProcessorBatch implements ComponentProvider
{

/**
* @param array{
* schedule_delay: int<0, max>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
final class LogRecordProcessorSimple implements ComponentProvider
{

/**
* @param array{
* exporter: ComponentPlugin<LogRecordExporterInterface>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class AggregationResolverDefault implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class MetricExporterConsole implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')]
final class MetricExporterOtlp implements ComponentProvider
{

/**
* @param array{
* protocol: 'http/protobuf'|'http/json'|'grpc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
final class MetricReaderPeriodic implements ComponentProvider
{

/**
* @param array{
* interval: int<0, max>,
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/ComponentProvider/OpenTelemetrySdk.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
*/
final class OpenTelemetrySdk implements ComponentProvider
{

/**
* @param array{
* file_format: '0.3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#[PackageDependency('open-telemetry/extension-propagator-b3', '^1.0.1')]
final class TextMapPropagatorB3 implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#[PackageDependency('open-telemetry/extension-propagator-b3', '^1.0.1')]
final class TextMapPropagatorB3Multi implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class TextMapPropagatorBaggage implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
final class TextMapPropagatorComposite implements ComponentProvider
{

/**
* @param list<ComponentPlugin<TextMapPropagatorInterface>> $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#[PackageDependency('open-telemetry/extension-propagator-jaeger', '^0.0.2')]
final class TextMapPropagatorJaeger implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class TextMapPropagatorTraceContext implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class SamplerAlwaysOff implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/ComponentProvider/Trace/SamplerAlwaysOn.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class SamplerAlwaysOn implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
final class SamplerParentBased implements ComponentProvider
{

/**
* @param array{
* root: ComponentPlugin<SamplerInterface>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class SamplerTraceIdRatioBased implements ComponentProvider
{

/**
* @param array{
* ratio: float,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
final class SpanExporterConsole implements ComponentProvider
{

/**
* @param array{} $properties
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#[PackageDependency('open-telemetry/exporter-otlp', '^1.0.5')]
final class SpanExporterOtlp implements ComponentProvider
{

/**
* @param array{
* protocol: 'http/protobuf'|'http/json'|'grpc',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#[PackageDependency('open-telemetry/exporter-zipkin', '^1.0')]
final class SpanExporterZipkin implements ComponentProvider
{

/**
* @param array{
* endpoint: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/
final class SpanProcessorBatch implements ComponentProvider
{

/**
* @param array{
* schedule_delay: int<0, max>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
final class SpanProcessorSimple implements ComponentProvider
{

/**
* @param array{
* exporter: ComponentPlugin<SpanExporterInterface>,
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

final class Configuration
{

/**
* @param ComponentPlugin<SdkBuilder> $sdkPlugin
*/
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration/ComponentPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
interface ComponentPlugin
{

/**
* Creates the component that is provided by this plugin.
*
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration/ComponentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*/
interface ComponentProvider
{

/**
* @param array $properties properties provided for this component provider
* @param Context $context context that should be used to resolve component plugins
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration/ComponentProviderRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
interface ComponentProviderRegistry
{

/**
* Creates a node to specify a component plugin.
*
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
*/
final class ConfigurationFactory
{

private readonly CompiledConfigurationFactory $compiledFactory;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Config/SDK/Configuration/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
final class Context
{

/**
* @param TracerProviderInterface $tracerProvider tracer provider to use for self diagnostics
* @param MeterProviderInterface $meterProvider meter provider to use for self diagnostics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

final class ArrayEnvSource implements EnvSource
{

public function __construct(
private readonly array $env,
) {
Expand Down
Loading

0 comments on commit 4c60ca3

Please sign in to comment.