src/ReflectionClass.php
public function getDefinedMethods() : Collection
    {
        return collect($this->getMethods())
            ->filter(function ($method) {
                return $method->getFileName() == $this->getFileName();
            });
    }
public function getDefinedMethods() : Collection
    {
        return collect($this->getMethods())
            ->filter(function ($method) {
                return $method->getFileName() == $this->getFileName();
            });
    }
public function getDefinedMethods ( ) : Collection { return collect ( $ this -> getMethods ( ) ) -> filter ( function ( $ method ) { return $ method -> getFileName ( ) == $ this -> getFileName ( ) ; } ) ; }
Return a collection of methods defined on the given class.
This ignores methods defined in parent class, traits etc.

@return Collection
Return a collection of methods defined on the given class . This ignores methods defined in parent class traits etc .