Firestore/src/PathTrait.php
private function randomName($parent)
    {
        // UUIDs are a pre-existing library dependency, so we'll use that instead
        // of adding random_compat or something similar.
        // Generate a UUID, then strip `-` and trim to expected length.
        // @todo revisit once library requires php >= 7.0 and random_int() can be used without dependency.
        $rand = substr(str_replace('-', '', Uuid::uuid4()), 0, 20);

        return $this->childPath($parent, $rand);
    }
private function randomName($parent)
    {
        // UUIDs are a pre-existing library dependency, so we'll use that instead
        // of adding random_compat or something similar.
        // Generate a UUID, then strip `-` and trim to expected length.
        // @todo revisit once library requires php >= 7.0 and random_int() can be used without dependency.
        $rand = substr(str_replace('-', '', Uuid::uuid4()), 0, 20);

        return $this->childPath($parent, $rand);
    }
private function randomName ( $ parent ) { // UUIDs are a pre-existing library dependency, so we'll use that instead // of adding random_compat or something similar. // Generate a UUID, then strip `-` and trim to expected length. // @todo revisit once library requires php >= 7.0 and random_int() can be used without dependency. $ rand = substr ( str_replace ( '-' , '' , Uuid :: uuid4 ( ) ) , 0 , 20 ) ; return $ this -> childPath ( $ parent , $ rand ) ; }
Create a random name.

@param string $parent
@return string
Create a random name .