Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Strict Typing for all PHP code added in the scope of MSI poject #99

Closed
maghamed opened this issue Sep 17, 2017 · 2 comments
Closed

Comments

@maghamed
Copy link
Contributor

Based on the Community Poll we've conducted
https://twitter.com/iminyaylo/status/905049975175962624

it makes sense to add declare(strict_types=1); for all PHP code in the scope of MSI

@naydav
Copy link

naydav commented Sep 28, 2017

Also, need to add typecasting to Controllers and DataProviders

Example
https://github.com/magento-engcom/msi/blob/develop/app/code/Magento/Inventory/Controller/Adminhtml/Source/Edit.php#L51
In this case $sourceId is string

But expected type is integer
https://github.com/magento-engcom/msi/blob/develop/app/code/Magento/InventoryApi/Api/SourceRepositoryInterface.php#L51

After enabling Strict typing we will have got \TypeError
So need to add typecasting to all Controllers and DataProviders

chrom pushed a commit that referenced this issue Nov 3, 2017
chrom added a commit that referenced this issue Nov 17, 2017
naydav pushed a commit that referenced this issue Dec 8, 2017
naydav pushed a commit that referenced this issue Dec 8, 2017
naydav pushed a commit that referenced this issue Dec 8, 2017
naydav pushed a commit that referenced this issue Dec 8, 2017
@naydav
Copy link

naydav commented Dec 8, 2017

#192

@naydav naydav closed this as completed Dec 8, 2017
okolesnyk pushed a commit that referenced this issue Mar 6, 2018
…ix #99

 - Merge Pull Request magento-engcom/import-export-improvements#99 from umarch06/import-export-improvements:50-product-images-import-path-fix
 - Merged commits:
   1. 7803eed
   2. 0c6120e
   3. 768d1d7
magento-cicd2 pushed a commit that referenced this issue Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants