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

WIP: Helpers keep default config for robustness #195

Open
wants to merge 1 commit into
base: cake4-bs4-1.0.0
Choose a base branch
from

Conversation

Erwane
Copy link
Collaborator

@Erwane Erwane commented Nov 16, 2020

It's a try to prevent addition in Cake helpers will break the code.

Bootstrap helper is in $helperConfig and merged to $_defaultConfig. This way, templates and widgets always have a correct default and follow framework.

Work in progress, need to do all helpers if good way.

@codecov
Copy link

codecov bot commented Nov 16, 2020

Codecov Report

Merging #195 (96ef936) into cake4-bs4-1.0.0 (2767409) will increase coverage by 0.68%.
The diff coverage is 73.33%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##             cake4-bs4-1.0.0     #195      +/-   ##
=====================================================
+ Coverage              86.63%   87.32%   +0.68%     
- Complexity               380      382       +2     
=====================================================
  Files                     19       19              
  Lines                   1190     1183       -7     
=====================================================
+ Hits                    1031     1033       +2     
+ Misses                   159      150       -9     
Impacted Files Coverage Δ Complexity Δ
src/View/Helper/FormHelper.php 85.32% <73.33%> (+0.16%) 60.00 <24.00> (+2.00)
src/View/Widget/ColumnSelectBoxWidget.php 0.00% <0.00%> (ø) 3.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2767409...96ef936. Read the comment docs.

@@ -282,7 +265,7 @@ public function setColumnSizes(array $columns): array
* @param string $what The type of the column (`'label'`, `'input'`, `'error'`).
* @return string The classes for the size or offset of the specified column.
*/
protected function _getColumnClass(string $what): string
public function getColumnClass(string $what): string
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any reason for this to be made public? And the _ prefix is CakePHP convention for protected methods, any reason you removed it from most methods?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My phpcs was misconfigured in my IDE. Sorry

public function testCreate()
{
// Standard form
$this->assertHtml([
self::assertHtml([
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants