public function getPackages() : PackageCollection
    {
        if (null === $this->packages) {
            $packages = array_merge(
                array(
                    $this->getName() => $this,
                ),
                $this->getInstalledPackagesFile()->getPackages()->toArray()
            );

            $this->packages = new PackageCollection($packages);
        }

        return $this->packages;
    }
public function getPackages() : PackageCollection
    {
        if (null === $this->packages) {
            $packages = array_merge(
                array(
                    $this->getName() => $this,
                ),
                $this->getInstalledPackagesFile()->getPackages()->toArray()
            );

            $this->packages = new PackageCollection($packages);
        }

        return $this->packages;
    }
public function getPackages ( ) : PackageCollection { if ( null === $ this -> packages ) { $ packages = array_merge ( array ( $ this -> getName ( ) => $ this , ) , $ this -> getInstalledPackagesFile ( ) -> getPackages ( ) -> toArray ( ) ) ; $ this -> packages = new PackageCollection ( $ packages ) ; } return $ this -> packages ; }
Returns all packages in the project, including the root one
Returns all packages in the project including the root one