Skip to content

Make \OCP\Mail strict#8614

Merged
MorrisJobke merged 3 commits into
masterfrom
strict_mail
Mar 5, 2018
Merged

Make \OCP\Mail strict#8614
MorrisJobke merged 3 commits into
masterfrom
strict_mail

Conversation

@rullzer

@rullzer rullzer commented Mar 1, 2018

Copy link
Copy Markdown
Member
  • Fix typehints
  • Made strict

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@rullzer rullzer added 2. developing Work in progress technical debt 🧱 🤔🚀 labels Mar 1, 2018
@rullzer rullzer added this to the Nextcloud 14 milestone Mar 1, 2018
@codecov

codecov Bot commented Mar 1, 2018

Copy link
Copy Markdown

Codecov Report

Merging #8614 into master will increase coverage by <.01%.
The diff coverage is 64.58%.

@@             Coverage Diff              @@
##             master    #8614      +/-   ##
============================================
+ Coverage     51.93%   51.94%   +<.01%     
  Complexity    25422    25422              
============================================
  Files          1609     1609              
  Lines         95343    95343              
  Branches       1378     1378              
============================================
+ Hits          49521    49522       +1     
+ Misses        45822    45821       -1
Impacted Files Coverage Δ Complexity Δ
lib/private/Mail/Attachment.php 0% <0%> (ø) 5 <4> (ø) ⬇️
lib/private/Mail/EMailTemplate.php 60% <53.33%> (ø) 43 <32> (ø) ⬇️
lib/private/Mail/Mailer.php 60.91% <70%> (ø) 27 <22> (ø) ⬇️
lib/private/Mail/Message.php 79.16% <84.21%> (ø) 24 <21> (ø) ⬇️
lib/private/Security/CertificateManager.php 91% <0%> (-3%) 39% <0%> (ø)
lib/private/Server.php 83.3% <0%> (+0.09%) 282% <0%> (ø) ⬇️
lib/private/Files/Cache/Propagator.php 96.2% <0%> (+1.26%) 16% <0%> (ø) ⬇️
lib/private/Files/ObjectStore/SwiftFactory.php 56.32% <0%> (+2.29%) 35% <0%> (ø) ⬇️

@rullzer rullzer added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 2, 2018
Comment thread lib/private/Mail/Message.php Outdated
* @return $this
*/
public function setSubject($subject) {
public function setSubject($subject): IMessage {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess $subject should always be a string.

Comment thread lib/private/Mail/EMailTemplate.php Outdated
* @since 12.0.0
*/
public function addBodyListItem($text, $metaInfo = '', $icon = '', $plainText = '', $plainMetaInfo = '') {
public function addBodyListItem(string $text, string $metaInfo = '', string $icon = '', string $plainText = '', string $plainMetaInfo = '') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$plain* can also be false here, sorry

Comment thread lib/public/Mail/IEMailTemplate.php Outdated
* @since 12.0.0
*/
public function addBodyListItem($text, $metaInfo = '', $icon = '', $plainText = '', $plainMetaInfo = '');
public function addBodyListItem(string $text, string $metaInfo = '', string $icon = '', string $plainText = '', string $plainMetaInfo = '');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$plain* can also be false here, sorry

rullzer added 3 commits March 5, 2018 09:06
* Fix typehints
* Made strict

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer

rullzer commented Mar 5, 2018

Copy link
Copy Markdown
Member Author

Another round :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews technical debt 🧱 🤔🚀

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants