# |
Dec 19th 2017, 12:22 |
dereuromark |
it does if you teach it :slightly_smiling_face: We have a lot of those at spryker: https://github.com/spryker/demoshop/tree/master/tests/PhpStan/DynamicType |
# |
Dec 19th 2017, 12:22 |
admad |
any static analyzer if going to have trouble with dynamic stuff :slightly_smiling_face: |
# |
Dec 19th 2017, 12:21 |
neon1024 |
PHP Stan doesn’t like magic methods :) |
# |
Dec 19th 2017, 12:02 |
neon1024 |
Wahoo! My code passed level 1 of PHP Stan :slightly_smiling_face: `[OK] No errors` |
# |
Dec 19th 2017, 11:59 |
joop |
i get "ModelName" is not associated with tests |
# |
Dec 19th 2017, 11:59 |
joop |
if i try like: $userId = $this->_tests->get('id'); |
# |
Dec 19th 2017, 11:58 |
admad |
absolutely |
# |
Dec 19th 2017, 11:58 |
neon1024 |
I should edit my post! |
# |
Dec 19th 2017, 11:58 |
neon1024 |
:) |
# |
Dec 19th 2017, 11:58 |
admad |
That why i added the paginator class to avoid having to use hacks :slightly_smiling_face: |
# |
Dec 19th 2017, 11:57 |
neon1024 |
Well you can, but it’s hacky. http://jedistirfry.co.uk/blog/2016-11/pagination-inside-a-view-cell/ |
# |
Dec 19th 2017, 11:57 |
admad |
@braeden What blog post? You can use the new paginator class in cell but not paginator component. |
# |
Dec 19th 2017, 11:55 |
joop |
i tried to use this description |
# |
Dec 19th 2017, 11:55 |
joop |
http://josediazgonzalez.com/2015/12/16/custom-validation-rule-classes/ |
# |
Dec 19th 2017, 11:54 |
dereuromark |
yes please |
# |
Dec 19th 2017, 11:54 |
dereuromark |
mixin requires phpstan Extension :) then should work |
# |
Dec 19th 2017, 11:53 |
joop |
because we are in the "model level" and not "entity" |
# |
Dec 19th 2017, 11:53 |
neon1024 |
Would you like me to open a ticket @dereuromark? |
# |
Dec 19th 2017, 11:52 |
joop |
how can i pass an entity value for it?for example iam writing the function in the Tests model,how should i use "$this->Tests->Reviews->id"? |
# |
Dec 19th 2017, 11:52 |
dereuromark |
Regex needs adjusting. |
# |
Dec 19th 2017, 11:52 |
dereuromark |
i guess the / in plugin name breaks it. |
# |
Dec 19th 2017, 11:52 |
neon1024 |
Ooh, it’s missing! |
# |
Dec 19th 2017, 11:51 |
neon1024 |
Also, is there a shell command for Cells? |
# |
Dec 19th 2017, 11:51 |
joop |
if i am declaring anonymus function for costum validation rule |
# |
Dec 19th 2017, 11:51 |
neon1024 |
At least if I can make a failing test case we can see if it’s me or not ;) |
# |
Dec 19th 2017, 11:50 |
neon1024 |
Let me finish this and I’ll look into the plugin to see if I can add a test case |
# |
Dec 19th 2017, 11:50 |
joop |
working wit anonymus function is a bit harder than the previus task demands |
# |
Dec 19th 2017, 11:50 |
neon1024 |
Perhaps I’ve got a bug in my code, but adding the annotation makes PHP Stan pass |
# |
Dec 19th 2017, 11:49 |
neon1024 |
File uploaded https://cakesf.slack.com/files/U1BT622HW/F8GP4EPS6/php_stan.txt / https://slack-files.com/T053DPNCM-F8GP4EPS6-781ed3a9ef |
# |
Dec 19th 2017, 11:48 |
neon1024 |
Sorry that’s not what I meant. I meant PHP Stan gives me an error |
# |
Dec 19th 2017, 11:48 |
neon1024 |
For search manager at least |
# |
Dec 19th 2017, 11:48 |
neon1024 |
Seems to be required according to my PHPStorm |
# |
Dec 19th 2017, 11:48 |
dereuromark |
method would not be needed with mixin. |
# |
Dec 19th 2017, 11:48 |
neon1024 |
Perhaps because it has a strange prefix namespace? |
# |
Dec 19th 2017, 11:47 |
neon1024 |
Instead of `* @mixin \Muffin\Slug\Model\Behavior\SlugBehavior` |
# |
Dec 19th 2017, 11:47 |
neon1024 |
`* @mixin \Muffin\Slug.Slug` |
# |
Dec 19th 2017, 11:47 |
neon1024 |
Plus it seems to have incorrectly detected the UseMuffin/Slug plugin |
# |
Dec 19th 2017, 11:45 |
neon1024 |
I’ve had to add `* @method \Search\Model\Behavior\SearchBehavior searchManager()` for my PHP Stan to pass |
# |
Dec 19th 2017, 11:45 |
neon1024 |
@dereuromark Have I done something wrong? The ide helper isn’t generating a `@method` docblock for my call to `$this->searchManager()` in my table classes |
# |
Dec 19th 2017, 10:51 |
neon1024 |
Cool, I’m over here though ;) https://github.com/dereuromark/cakephp-ide-helper/blob/master/docs/Annotations.md#view |
# |
Dec 19th 2017, 10:44 |
dereuromark |
Thought this was clear, I added a note: https://github.com/dereuromark/cakephp-ide-helper/commit/41151c5ea1e635d785b1c3d27e07936a8a79ccdb |