TmpInterface::tempnam()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
1
<?php
2
/*******************************************************************
3
 * Created by:  Marko Kungla @ OkramLabs on Aug 6, 2012 - 9:07:40
4
 * Contact:     [email protected] - https://okramlabs.com
5
 * @copyright   2015 OkramLabs - https://okramlabs.com
6
 * @license     MIT
7
 *
8
 * Package name:libhowi-filesystem
9
 * @category	HOWI3
10
 * @package		libhowi
11
 * @subpackage	filesystem
12
 * 
13
 * Lang:      PHP
14
 * Encoding:  UTF-8
15
 * File:      TmpInterface.inc
16
 * @link      https://
17
 ********************************************************************
18
 * Contributors:
19
 * @author Marko Kungla <[email protected]>
20
 *           Github: https://github.com/mkungla
21
 ********************************************************************
22
 * Comments:
23
 */
24
namespace HOWI3\libhowi\Filesystem\Commons\ObjectInterfaces;
25
26
interface TmpInterface
27
{
28
29
    /**
30
     * Set tmp path
31
     *
32
     * @param string $path            
0 ignored issues
show
Documentation introduced by
Should the type for parameter $path not be false|string?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
33
     */
34
    public function setTmp($path = false);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
35
36
    /**
37
     * Get tmp path
38
     *
39
     * @return string tmp path
40
     */
41
    public function getTmp();
42
43
    /**
44
     * * tempnam — Create file with unique file name
45
     *
46
     * @param string $dir            
0 ignored issues
show
Documentation introduced by
Should the type for parameter $dir not be false|string?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
47
     * @param string $prefix            
48
     *
49
     * @return string tmpname
50
     */
51
    public function tempnam($dir = false, $prefix = 'howi-fs-tmp-');
52
53
    /**
54
     * tmpfile — Creates a temporary file
55
     * 
56
     * @return filehandler
57
     */
58
    public function tmpfile();
59
}
60