1 | <?php |
||
22 | class ComposerPackage implements ReaderInterface |
||
23 | { |
||
24 | /** |
||
25 | * The page name to look for |
||
26 | * |
||
27 | * @var string |
||
28 | **/ |
||
29 | private $package; |
||
30 | |||
31 | /** |
||
32 | * Constructor |
||
33 | * |
||
34 | * @param string $package |
||
35 | * @return void |
||
|
|||
36 | **/ |
||
37 | public function __construct($package) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | **/ |
||
45 | public function canRead($directory) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | **/ |
||
63 | public function read($directory) |
||
69 | |||
70 | /** |
||
71 | * Get the package |
||
72 | * |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getPackage() |
||
79 | |||
80 | /** |
||
81 | * Set the package |
||
82 | * |
||
83 | * @param string $package |
||
84 | * @return ComposerPackage |
||
85 | */ |
||
86 | public function setPackage($package) |
||
92 | |||
93 | /** |
||
94 | * Get the package from the lockfile |
||
95 | * |
||
96 | * @return stdClass|bool returns false when package can not be found |
||
97 | **/ |
||
98 | private function getPackageFromLockFile($directory) |
||
113 | } |
||
114 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.