12345678910111213141516171819202122232425 |
- <?php
- namespace Fgm\ComposerCheck;
- /**
- * Class RequirementsLoader loads a composer.json file.
- */
- class RequirementsLoader extends LoaderBase implements LoaderInterface {
- /**
- * {@inheritdoc}
- */
- public function __construct(string $directory) {
- $this->file = realpath("${directory}/composer.json");
- }
- /**
- * {@inheritdoc}
- */
- public function parse() {
- $this->run = $this->contents['require'] ?? [];
- $this->dev = $this->contents['require-dev'] ?? [];
- }
- }
|