<commit_before><?php

/*
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace Apigee\Edge\Api\Management\Controller;

use Apigee\Edge\ClientInterface;
use Psr\Http\Message\UriInterface;

/**
 * Class DeveloperAppCredentialController.
 */
class DeveloperAppCredentialController extends AppCredentialController implements DeveloperAppCredentialControllerInterface
{
    /** @var string Developer email or id. */
    protected $companyName;

    /** @var string App name. */
    protected $appName;

    /**
     * DeveloperAppCredentialController constructor.
     *
     * @param string $organization
     * @param string $developerId
     * @param string $appName
     * @param \Apigee\Edge\ClientInterface $client
     * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[]|\Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $entityNormalizers
     */
    public function __construct(
        string $organization,
        string $developerId,
        string $appName,
        ClientInterface $client,
        array $entityNormalizers = []
    ) {
        $this->companyName = $developerId;
        parent::__construct($organization, $appName, $client, $entityNormalizers);
    }

    /**
     * @inheritdoc
     */
    protected function getBaseEndpointUri(): UriInterface
    {
        return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/developers/{$this->companyName}/apps/{$this->appName}");
    }

    /**
     * @inheritdoc
     */
    protected function getEntityEndpointUri(string $entityId): UriInterface
    {
        return $this->getBaseEndpointUri()->withPath("{$this->getBaseEndpointUri()}/keys/{$entityId}");
    }
}<commit_msg>Remove incorrect usage of companyName.<commit_after><?php

/*
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace Apigee\Edge\Api\Management\Controller;

use Apigee\Edge\ClientInterface;
use Psr\Http\Message\UriInterface;

/**
 * Class DeveloperAppCredentialController.
 */
class DeveloperAppCredentialController extends AppCredentialController implements DeveloperAppCredentialControllerInterface
{
    /** @var string Developer email or id. */
    protected $developerId;

    /** @var string App name. */
    protected $appName;

    /**
     * DeveloperAppCredentialController constructor.
     *
     * @param string $organization
     * @param string $developerId
     * @param string $appName
     * @param \Apigee\Edge\ClientInterface $client
     * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[]|\Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $entityNormalizers
     */
    public function __construct(
        string $organization,
        string $developerId,
        string $appName,
        ClientInterface $client,
        array $entityNormalizers = []
    ) {
        $this->developerId = $developerId;
        parent::__construct($organization, $appName, $client, $entityNormalizers);
    }

    /**
     * @inheritdoc
     */
    protected function getBaseEndpointUri(): UriInterface
    {
        return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/developers/{$this->developerId}/apps/{$this->appName}");
    }

    /**
     * @inheritdoc
     */
    protected function getEntityEndpointUri(string $entityId): UriInterface
    {
        return $this->getBaseEndpointUri()->withPath("{$this->getBaseEndpointUri()}/keys/{$entityId}");
    }
}
{'fraction_non_alphanumeric': 0.10749615300065948, 'fraction_numerical': 0.003517256539898879, 'mean_word_length': 3.4783464566929134, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1565108', 'n_tokens_mistral': 1217, 'n_tokens_neox': 1168, 'n_words': 328}