<?php

/*
 * OK.
 */
class FooA {}

class FooB extends Something {}

abstract class AbstractBarC implements MyInterface {}

$a = new MyClass() {}

class FooC {
    // Constant, not class (PHP 8.1).
    final const BAZ = 10;

    // Method, not class.
    final function bar() {}
}

/*
 * Bad.
 */
class FinalClass {}

class CheckHandlingOfSuperfluousWhitespace extends Something {}

    class CheckHandlingOfIndentation {}

/*comment*/ class CheckHandlingOfComments implements MyInterface {}

// Test fixer when combined with PHP 8.2 "readonly" modifier.
readonly class ReadonlyFinalClass {}

readonly class FinalReadonlyClass {}

// Parse error. Remove the final keyword.
abstract class ForbiddenAbstractFinal {}

// Parse error, but not one which concerns us. Remove the final keyword.
class UnfinishedDeclare

// Live coding. Ignore. This must be the last test in the file.
final class
