Skip to content

Commit 1e9d549

Browse files
committed
move device infor to PHP
1 parent 75c4631 commit 1e9d549

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SDK/Language/PHP.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ public function getFilters(): array
384384
return [
385385
new TwigFilter('getReturn', function ($value) {
386386
return $this->getReturn($value);
387-
})
387+
}),
388+
$this->twig->addFilter(new TwigFilter('deviceInfo', function ($value) {
389+
return php_uname('s') . ';' . php_uname('v') . ';' . php_uname('m');
390+
})),
388391
];
389392
}
390393
}

src/SDK/SDK.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ public function __construct(Language $language, Spec $spec)
103103
$this->twig->addFilter(new TwigFilter('caseUcfirst', function ($value) {
104104
return ucfirst($this->helperCamelCase($value));
105105
}));
106-
$this->twig->addFilter(new TwigFilter('deviceInfo', function ($value) {
107-
return php_uname('s') . ';' . php_uname('v') . ';' . php_uname('m');
108-
}));
109106
$this->twig->addFilter(new TwigFilter('caseUcwords', function ($value) {
110107
return ucwords($value, " -_");
111108
}));

0 commit comments

Comments
 (0)