<?php declare(strict_types=1);

namespace /*HEHE*/ Imanghafoori\LaravelMicroscope\FileReaders;

use Illuminate\Contracts\HalfImported;
use Symfony\Component\Finder\Exception\DirectoryNotFoundException; // comment
use Symfony\Component\Finder\Symfony\Component\Finder\Finder;
use function foo\bar_func;
class Paths extends \A\ParentClass implements InterF1, InterF2, \Inline\InterF3
{
    use Trait1, Trait2;

    use Trait3;
    const NEW = 1;


    public static function getAbsFilePaths(TypeHint1 $dirs, ?TypeHint2 $dir3, $arg = [1, 2])
    {
        if (! $dirs) {
            return [];
        }
        try {
            $files = Finder::create()->files()->name('*.php')->in($dirs);

            $paths = [];
            foreach ($files as $f) {
                $paths[] = $f->getRealPath();
            }

            return $paths;
        } catch (DirectoryNotFoundException $e) {
            return [];
        }

        try {
            $files = Finder::create()->in($dirs);
        } catch (\Exception | \ErrorException $e) {
            return [];
        }

        MyAmIClass::con; // a comment
        \YetAnotherclass::koo();$goo::koo();
        HalfImported\TheRest::class;
    }

    public function returny_Method(string $string): int // a comment
    {
        new $tt; // a comment
    }

    public function returny_nullable(TypeHint1 $dirs): ?ReturnyType2 // a comment
    {
        new class {};
    }

    public function returny_string(?string $string, iterable $t): self // a comment
    {
        $tt = '';
        new Newed();
        new A\Newed;
        new $tt;
    }

    public function __constructor(?string $string): self
    {
        parent::hello();
        InConstructor::$method();
    }

    public function foo (iterable $t) : /*comment*/ \A\ReturnType
    {
        $r = function (F $f) use ($g) {};
        true ? new a\a : new b\b;
    }

    public function foo4 (iteable|countable $t, Y&R $e)
    {
    }
}
