file = realpath("${directory}/composer.json"); } /** * Return the --dev requirements. * * @return array * A requirements array, keyed by requirement string. */ public function getDev() { return $this->dev; } /** * Return the non- --dev requirements. * * @return array * A requirements array, keyed by requirement string. */ public function getRun() { return $this->run; } /** * {@inheritdoc} */ public function load() { $json = json_decode(file_get_contents($this->file), TRUE); $this->run = $json['require'] ?? []; $this->dev = $json['require-dev'] ?? []; } }