File tree Expand file tree Collapse file tree 9 files changed +11
-20
lines changed 
apps/files_trashbin/lib/Trash Expand file tree Collapse file tree 9 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public function getPath() {
6969		return  $ this fileInfo ->getPath ();
7070	}
7171
72- 	public  function  getMimetype () {
72+ 	public  function  getMimetype ():  string  {
7373		return  $ this fileInfo ->getMimetype ();
7474	}
7575
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ public function getName() {
6565	}
6666
6767
68- 	public  function  getMimeType () {
69- 		return  $ this data ['mimetype ' ];
68+ 	public  function  getMimeType ():  string  {
69+ 		return  $ this data ['mimetype ' ] ??  ' application/octet-stream ' 
7070	}
7171
7272
Original file line number Diff line number Diff line change @@ -133,11 +133,8 @@ public function getId() {
133133		return  isset ($ this data ['fileid ' ]) ? (int )$ this data ['fileid ' ] : null ;
134134	}
135135
136- 	/** 
137- 	 * @return string 
138- 	 */ 
139- 	public  function  getMimetype () {
140- 		return  $ this data ['mimetype ' ];
136+ 	public  function  getMimetype (): string  {
137+ 		return  $ this data ['mimetype ' ] ?? 'application/octet-stream ' ;
141138	}
142139
143140	/** 
Original file line number Diff line number Diff line change @@ -314,10 +314,7 @@ public function getUserFolder($userId) {
314314		return  $ this __call (__FUNCTION__ , func_get_args ());
315315	}
316316
317- 	/** 
318- 	 * @inheritDoc 
319- 	 */ 
320- 	public  function  getMimetype () {
317+ 	public  function  getMimetype (): string  {
321318		if  (isset ($ this data ['mimetype ' ])) {
322319			return  $ this data ['mimetype ' ];
323320		}
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ public function isShared() {
339339		return  $ this getFileInfo (false )->isShared ();
340340	}
341341
342- 	public  function  getMimeType () {
342+ 	public  function  getMimeType ():  string  {
343343		return  $ this getFileInfo (false )->getMimetype ();
344344	}
345345
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public function putContent($data) {
122122		throw  new  NotFoundException ();
123123	}
124124
125- 	public  function  getMimeType () {
125+ 	public  function  getMimeType ():  string  {
126126		if  ($ this fileInfo ) {
127127			return  parent ::getMimeType ();
128128		} else  {
Original file line number Diff line number Diff line change @@ -60,10 +60,9 @@ public function getName();
6060	/** 
6161	 * Get the full mimetype 
6262	 * 
63- 	 * @return string 
6463	 * @since 9.0.0 
6564	 */ 
66- 	public  function  getMimeType ();
65+ 	public  function  getMimeType ():  string ;
6766
6867	/** 
6968	 * Get the first part of the mimetype 
Original file line number Diff line number Diff line change @@ -43,10 +43,9 @@ public function putContent($data);
4343	/** 
4444	 * Get the mimetype of the file 
4545	 * 
46- 	 * @return string 
4746	 * @since 6.0.0 
4847	 */ 
49- 	public  function  getMimeType ();
48+ 	public  function  getMimeType ():  string ;
5049
5150	/** 
5251	 * Open the file as stream, resulting resource can be operated as stream like the result from php's own fopen 
Original file line number Diff line number Diff line change @@ -103,10 +103,9 @@ public function getPath();
103103	/** 
104104	 * Get the full mimetype of the file or folder i.e. 'image/png' 
105105	 * 
106- 	 * @return string 
107106	 * @since 7.0.0 
108107	 */ 
109- 	public  function  getMimetype ();
108+ 	public  function  getMimetype ():  string ;
110109
111110	/** 
112111	 * Get the first part of the mimetype of the file or folder i.e. 'image' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments