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

sanmai / pipeline / 16436877530

22 Jul 2025 06:47AM UTC coverage: 98.695% (-1.3%) from 100.0%
16436877530

push

github

web-flow
Extend TypeInferenceTest (#227)

165 of 173 new or added lines in 6 files covered. (95.38%)

605 of 613 relevant lines covered (98.69%)

336.52 hits per line

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

50.0
/src/PHPStan/StrictModeDetector.php
1
<?php
2

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

19
declare(strict_types=1);
20

21
namespace Pipeline\PHPStan;
22

23
use PhpParser\Node\Arg;
24
use PHPStan\Analyser\Scope;
25

26
/**
27
 * Detects if strict mode is enabled for filter() method.
28
 */
29
class StrictModeDetector
30
{
31
    /**
32
     * Check if strict mode is enabled based on the argument.
33
     */
34
    public function isStrictMode(?Arg $strictArg, Scope $scope): bool
35
    {
36
        if (null === $strictArg) {
4✔
37
            return false;
4✔
38
        }
39

NEW
40
        $strictType = $scope->getType($strictArg->value);
×
NEW
41
        return $strictType->isTrue()->yes();
×
42
    }
43
}
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