private function setProjectProfiles(EnvironmentInterface $environment)
    {
        $projectFs = $environment->getProjectFilesystem();
        if (!$projectFs->has(self::PROJECT_PHPCS)) {
            return;
        }

        $ideConfigFs = $environment->getIdeConfigFilesystem();

        $xml = simplexml_load_string(
            $ideConfigFs->read(self::INSPECTION_PROFILE)
        );

        $this->setProjectPhpCsProfile($xml);
        $ideConfigFs->put(self::INSPECTION_PROFILE, $xml->asXML());
    }