• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / php-sdk / 13883417585

16 Mar 2025 12:37PM UTC coverage: 97.336%. Remained the same
13883417585

push

github

web-flow
[FSSDK-10015] chore: Prepare release 4.0.2

EventBuilder.php -> Updated SDK version to 4.0.2 
EventBuilderTest.php -> Updated client version to 4.0.2
CHANGELOG.md -> Added version 4.0.2 details (#291)

2704 of 2778 relevant lines covered (97.34%)

109.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/Optimizely/OptimizelyConfig/OptimizelyAttribute.php
1
<?php
2
/**
3
 * Copyright 2021, Optimizely Inc and Contributors
4
 *
5
 * Licensed under the Apache License, Version 2.0 (the "License");
6
 * you may not use this file except in compliance with the License.
7
 * You may obtain a copy of the License at
8
 *
9
 * http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 */
17
namespace Optimizely\OptimizelyConfig;
18

19
class OptimizelyAttribute implements \JsonSerializable
20
{
21
    /**
22
     * @var string id representing attribute.
23
     */
24
    private $id;
25

26
    /**
27
     * @var string key representing attribute.
28
     */
29
    private $key;
30

31
    public function __construct($id, $key)
32
    {
33
        $this->id = $id;
12✔
34
        $this->key = $key;
12✔
35
    }
36

37
    /**
38
     * @return string attribute id.
39
     */
40
    public function getId()
41
    {
42
        return $this->id;
×
43
    }
44

45
    /**
46
     * @return string attribute key.
47
     */
48
    public function getKey()
49
    {
50
        return $this->key;
×
51
    }
52

53
    /**
54
     * @return string JSON representation of the object.
55
     */
56
    #[\ReturnTypeWillChange]
57
    public function jsonSerialize()
58
    {
59
        return get_object_vars($this);
2✔
60
    }
61
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc