public function width() {
        return $this->_cache(__FUNCTION__, function($file) {
            /** @type \Transit\File $file */

            if (!$file->isImage()) {
                return null;
            }

            $width = 0;

            if ($dims = $file->dimensions()) {
                $width = $dims['width'];
            }

            return $width;
        });
    }
public function width() {
        return $this->_cache(__FUNCTION__, function($file) {
            /** @type \Transit\File $file */

            if (!$file->isImage()) {
                return null;
            }

            $width = 0;

            if ($dims = $file->dimensions()) {
                $width = $dims['width'];
            }

            return $width;
        });
    }
public function width ( ) { return $ this -> _cache ( __FUNCTION__ , function ( $ file ) { /** @type \Transit\File $file */ if ( ! $ file -> isImage ( ) ) { return null ; } $ width = 0 ; if ( $ dims = $ file -> dimensions ( ) ) { $ width = $ dims [ 'width' ] ; } return $ width ; } ) ; }
Return the image width.

@return int
Return the image width .