Skip to content

Commit f5d4a61

Browse files
authored
Merge pull request #107 from phug-php/fix/strict-in-array
Use strict in_array checks in renderer split: 2c790252a91d64396e3daf6f9027bdb491c69b7e
1 parent 36cb776 commit f5d4a61

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

Renderer/Adapter/StreamAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function setRenderingFile($__pug_php)
3131
{
3232
$stream = $this->getOption('stream_name').$this->getOption('stream_suffix');
3333

34-
if (!in_array($stream, stream_get_wrappers())) {
34+
if (!in_array($stream, stream_get_wrappers(), true)) {
3535
stream_register_wrapper($stream, Template::class);
3636
}
3737

Renderer/Partial/AdapterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private function getSandboxCall(&$source, $method, $path, $input, callable $getS
145145
$adapter->displayCached($path, $input, $getSource, $parameters);
146146
};
147147

148-
return in_array($method, ['display', 'displayFile'])
148+
return in_array($method, ['display', 'displayFile'], true)
149149
? $display()
150150
: $adapter->captureBuffer($display);
151151
}

Renderer/Partial/RendererOptionsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function enableModule($moduleClassName, $className, ModuleContainerInt
6363
{
6464
/* @var ModuleContainerInterface $this */
6565

66-
if (in_array($className, class_implements($moduleClassName)) &&
66+
if (in_array($className, class_implements($moduleClassName), true) &&
6767
!$container->hasModule($moduleClassName)
6868
) {
6969
$container->addModule($moduleClassName);

Renderer/Profiler/Dump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function dumpValue($object, $deep, $maxDeep = 3)
102102
'string',
103103
'resource',
104104
'NULL',
105-
])) {
105+
], true)) {
106106
return var_export($object, true);
107107
}
108108

Renderer/Profiler/ProfilerModule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function initialize()
8585

8686
$this->eventDump = $this->getContainer()->getOption('profiler.dump_event');
8787

88-
if (in_array($this->eventDump, ['var_dump', 'print_r'])) {
88+
if (in_array($this->eventDump, ['var_dump', 'print_r'], true)) {
8989
$function = $this->eventDump;
9090
$this->eventDump = function ($value) use ($function) {
9191
return $this->getFunctionDump($value, $function);

0 commit comments

Comments
 (0)