src/Carbon/Language.php
public function getNames(): array
    {
        if (!$this->names) {
            $this->names = static::all()[$this->code] ?? [
                'isoName' => $this->code,
                'nativeName' => $this->code,
            ];
        }

        return $this->names;
    }
public function getNames(): array
    {
        if (!$this->names) {
            $this->names = static::all()[$this->code] ?? [
                'isoName' => $this->code,
                'nativeName' => $this->code,
            ];
        }

        return $this->names;
    }
public function getNames ( ) : array { if ( ! $ this -> names ) { $ this -> names = static :: all ( ) [ $ this -> code ] ?? [ 'isoName' => $ this -> code , 'nativeName' => $ this -> code , ] ; } return $ this -> names ; }
Get both isoName and nativeName as an array.

@return array
Get both isoName and nativeName as an array .