Browse Source

Fix psalm better

Mark Story 6 years ago
parent
commit
f186f7d5fe
2 changed files with 1 additions and 5 deletions
  1. 0 5
      psalm-baseline.xml
  2. 1 0
      src/Event/EventDispatcherTrait.php

+ 0 - 5
psalm-baseline.xml

@@ -1079,11 +1079,6 @@
       <code>object|null</code>
     </ImplementedReturnTypeMismatch>
   </file>
-  <file src="src/Event/EventDispatcherTrait.php">
-    <MoreSpecificReturnType occurrences="1">
-      <code>Cake\Event\EventInterface</code>
-    </MoreSpecificReturnType>
-  </file>
   <file src="src/Form/Form.php">
     <PropertyNotSetInConstructor occurrences="3">
       <code>$_schema</code>

+ 1 - 0
src/Event/EventDispatcherTrait.php

@@ -88,6 +88,7 @@ trait EventDispatcherTrait
             $subject = $this;
         }
 
+        /** @var \Cake\Event\Event $event */
         $event = new $this->_eventClass($name, $subject, $data);
         $this->getEventManager()->dispatch($event);