• 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

57.14
/src/Optimizely/OptimizelyConfig/OptimizelyEvent.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 OptimizelyEvent implements \JsonSerializable
20
{
21
    /**
22
     * @var string id representing event.
23
     */
24
    private $id;
25

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

31
    /**
32
     * @var array experimentIds representing event experiment ids.
33
     */
34
    private $experimentIds;
35

36

37
    public function __construct($id, $key, array $experimentIds)
38
    {
39
        $this->id = $id;
10✔
40
        $this->key = $key;
10✔
41
        $this->experimentIds = $experimentIds;
10✔
42
    }
43

44
    /**
45
     * @return string event ID.
46
     */
47
    public function getId()
48
    {
49
        return $this->id;
×
50
    }
51

52
    /**
53
     * @return string event Key.
54
     */
55
    public function getKey()
56
    {
57
        return $this->key;
×
58
    }
59

60
    /**
61
     * @return array experimentIds representing event experiment ids.
62
     */
63
    public function getExperimentIds()
64
    {
65
        return $this->experimentIds;
×
66
    }
67

68
    /**
69
     * @return string JSON representation of the object.
70
     */
71
    #[\ReturnTypeWillChange]
72
    public function jsonSerialize()
73
    {
74
        return get_object_vars($this);
2✔
75
    }
76
}
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