File tree Expand file tree Collapse file tree 6 files changed +21
-22
lines changed Expand file tree Collapse file tree 6 files changed +21
-22
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* phpDocumentor
4
6
*
Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* This file is part of phpDocumentor.
4
6
*
Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* phpDocumentor
4
6
*
@@ -31,11 +33,9 @@ final class Fqsen
31
33
/**
32
34
* Initializes the object.
33
35
*
34
- * @param string $fqsen
35
- *
36
- * @throws \InvalidArgumentException when $fqsen is not matching the format.
36
+ * @throws InvalidArgumentException when $fqsen is not matching the format.
37
37
*/
38
- public function __construct ($ fqsen )
38
+ public function __construct (string $ fqsen )
39
39
{
40
40
$ matches = [];
41
41
$ result = preg_match (
@@ -62,20 +62,16 @@ public function __construct($fqsen)
62
62
63
63
/**
64
64
* converts this class to string.
65
- *
66
- * @return string
67
65
*/
68
- public function __toString ()
66
+ public function __toString (): string
69
67
{
70
68
return $ this ->fqsen ;
71
69
}
72
70
73
71
/**
74
72
* Returns the name of the element without path.
75
- *
76
- * @return string
77
73
*/
78
- public function getName ()
74
+ public function getName (): string
79
75
{
80
76
return $ this ->name ;
81
77
}
Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* This file is part of phpDocumentor.
4
6
*
@@ -25,32 +27,25 @@ final class Location
25
27
26
28
/**
27
29
* Initializes the location for an element using its line number in the file and optionally the column number.
28
- *
29
- * @param int $lineNumber
30
- * @param int $columnNumber
31
30
*/
32
- public function __construct ($ lineNumber , $ columnNumber = 0 )
31
+ public function __construct (int $ lineNumber , int $ columnNumber = 0 )
33
32
{
34
33
$ this ->lineNumber = $ lineNumber ;
35
34
$ this ->columnNumber = $ columnNumber ;
36
35
}
37
36
38
37
/**
39
38
* Returns the line number that is covered by this location.
40
- *
41
- * @return integer
42
39
*/
43
- public function getLineNumber ()
40
+ public function getLineNumber (): int
44
41
{
45
42
return $ this ->lineNumber ;
46
43
}
47
44
48
45
/**
49
46
* Returns the column number (character position on a line) for this location object.
50
- *
51
- * @return integer
52
47
*/
53
- public function getColumnNumber ()
48
+ public function getColumnNumber (): int
54
49
{
55
50
return $ this ->columnNumber ;
56
51
}
Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* phpDocumentor
4
6
*
@@ -21,5 +23,5 @@ interface Project
21
23
*
22
24
* @return string
23
25
*/
24
- public function getName ();
26
+ public function getName (): string ;
25
27
}
Original file line number Diff line number Diff line change 1
1
<?php
2
+ declare (strict_types=1 );
3
+
2
4
/**
3
5
* phpDocumentor
4
6
*
@@ -24,5 +26,5 @@ interface ProjectFactory
24
26
* @param File[] $files
25
27
* @return Project
26
28
*/
27
- public function create ($ name , array $ files );
29
+ public function create ($ name , array $ files ): Project ;
28
30
}
You can’t perform that action at this time.
0 commit comments