public static function isFileEmpty($file)
    {
        if (!is_file($file)) {
            throw new RuntimeException(sprintf('Invalid file path supplied'));
        }

        return mb_strlen(file_get_contents($file, 2), 'UTF-8') > 0 ? false : true;
    }
public static function isFileEmpty($file)
    {
        if (!is_file($file)) {
            throw new RuntimeException(sprintf('Invalid file path supplied'));
        }

        return mb_strlen(file_get_contents($file, 2), 'UTF-8') > 0 ? false : true;
    }
public static function isFileEmpty ( $ file ) { if ( ! is_file ( $ file ) ) { throw new RuntimeException ( sprintf ( 'Invalid file path supplied' ) ) ; } return mb_strlen ( file_get_contents ( $ file , 2 ) , 'UTF-8' ) > 0 ? false : true ; }
Checks whether file is empty

@param string $file
@throws \RuntimeException if invalid file path supplied
@return boolean
Checks whether file is empty