Skip to content

Instantly share code, notes, and snippets.

View pilif's full-sized avatar

Philip Hofstetter pilif

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.pilif.KeyRemapping</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
diff --git a/src/Analyser/Ignore/IgnoredErrorHelper.php b/src/Analyser/Ignore/IgnoredErrorHelper.php
index 068114767..bff07c108 100644
--- a/src/Analyser/Ignore/IgnoredErrorHelper.php
+++ b/src/Analyser/Ignore/IgnoredErrorHelper.php
@@ -68,9 +68,9 @@ class IgnoredErrorHelper
continue;
}
- $key = '';
+ $key = $ignoreError['path'];
diff --git a/src/Analyser/Ignore/IgnoredErrorHelper.php b/src/Analyser/Ignore/IgnoredErrorHelper.php
index 068114767..bff07c108 100644
--- a/src/Analyser/Ignore/IgnoredErrorHelper.php
+++ b/src/Analyser/Ignore/IgnoredErrorHelper.php
@@ -68,9 +68,9 @@ class IgnoredErrorHelper
continue;
}
- $key = '';
+ $key = $ignoreError['path'];
diff --git a/src/Psalm/Issue/PropertyIssue.php b/src/Psalm/Issue/PropertyIssue.php
index f64cd6cc4..4d0befda1 100644
--- a/src/Psalm/Issue/PropertyIssue.php
+++ b/src/Psalm/Issue/PropertyIssue.php
@@ -4,6 +4,8 @@ namespace Psalm\Issue;
use Psalm\CodeLocation;
+use function get_class;
+
diff --git a/lib/modbase.php b/lib/modbase.php
index 64617bf5fe..806ab0bc15 100644
--- a/lib/modbase.php
+++ b/lib/modbase.php
@@ -690,9 +690,9 @@ abstract class PopScanModBase implements PopScanModule
) {
$md = true;
}
- if (!Customization::callHook("AlwaysDisplayVendorMessages")) {
+ #if (!Customization::callHook("AlwaysDisplayVendorMessages")) {
diff --git a/lib/catalog/tag_node.php b/lib/catalog/tag_node.php
index 2054e5faf1..6fc9cc182e 100644
--- a/lib/catalog/tag_node.php
+++ b/lib/catalog/tag_node.php
@@ -320,7 +320,7 @@ class TagNode extends RootParentedVirtualNode
/** @psalm-suppress PossiblyUnusedParam */
public function getProductFinderConstraints(bool $cascade): ?array
{
- return [$this->tag['tag_name'] => true, 'vendor' => $this->getVendor()->getId()];
+ return array_merge($this->getVendor()->getTagNodeConstraints(), ['vendor' => $this->getVendor()->getId()]);
@pilif
pilif / times.sql
Last active December 5, 2018 06:51
create table times (
id bigserial not null primary key,
ts timestamp without time zone not null,
z text not null
);
insert into times (ts, z) values ('2018-12-05 8:00', 'Europe/Zurich');
insert into times (ts, z) values ('2018-12-05 7:00', 'UTC');
insert into times (ts, z) values ('2018-12-05 7:00', 'Europe/Zurich');
create table times (
id bigserial not null primary key,
ts timestamp without time zone not null,
zone text not null
);
insert into times (ts, zone) values ('2018-12-05 8:00', 'Europe/Zurich');
insert into times (ts, zone) values ('2018-12-05 7:00', 'UTC');
insert into times (ts, zone) values ('2018-12-05 7:00', 'Europe/Zurich');
HTTP/2 200
server: nginx/1.10.3
date: Mon, 30 Jul 2018 13:01:16 GMT
content-type: text/html
content-length: 2303
last-modified: Mon, 08 Apr 2013 08:07:14 GMT
etag: "51627ab2-8ff"
strict-transport-security: max-age=15552001
accept-ranges: bytes
HTTP/2 200
server: nginx/1.10.3
date: Mon, 30 Jul 2018 13:00:51 GMT
content-type: text/html
content-length: 2303
last-modified: Mon, 08 Apr 2013 08:07:14 GMT
etag: "51627ab2-8ff"
strict-transport-security: max-age=15552001
accept-ranges: bytes